react-native-blur icon indicating copy to clipboard operation
react-native-blur copied to clipboard

Blurview does not retain in constraints in android

Open ibrar-web opened this issue 1 year ago • 16 comments

Blur view working in react native ios as expected but in android components cover whole screen. I have found way around to work in android. But for that I have to create two different components for Android and iOS. In ios creating component with blurview but in android I have to wrap it with outer and also use inner wrapper component to stop it taking full screen. Also outer wrapper overflow is hidden.

ibrar-web avatar May 25 '23 14:05 ibrar-web

Trying to debug this as well. I feel like it is working in some cases but not in others. Not sure what the difference is.

tslater avatar Jun 03 '23 05:06 tslater

I having the same issue

themaxsmith avatar Jun 20 '23 20:06 themaxsmith

This is the workaround you can use which will work both in android and ios. @themaxsmith ss1

Ragnar-Loth-brok avatar Jun 22 '23 17:06 Ragnar-Loth-brok

Legend @Ragnar-Loth-brok , for reference the styles are the same as the example 'absolute' and the hideOverflow is simply 'overflow :hidden'

JoeDareZone avatar Sep 06 '23 15:09 JoeDareZone

I need wrap my internal toast notifications with a blurview, but in android an opaque layer is created that does not allow the background to be seen, i need help please @ibrar-web @Ragnar-Loth-brok

davidgvf avatar Sep 19 '23 09:09 davidgvf

Have you tried above recommended solution? @davidgvf You can look to the image below for reference. ss1

Ragnar-Loth-brok avatar Sep 19 '23 09:09 Ragnar-Loth-brok

yes @Ragnar-Loth-brok

image image

blur is perfect but my screen is opaque: image

without blurview image

davidgvf avatar Sep 19 '23 10:09 davidgvf

In think maybe height: 'auto' is creating this issue. Try to remove height: 'auto' property from mainToast style. @davidgvf

Ragnar-Loth-brok avatar Sep 19 '23 10:09 Ragnar-Loth-brok

@Ragnar-Loth-brok i remove it, but problem continue

davidgvf avatar Sep 19 '23 10:09 davidgvf

Are you using ToastCustom on top of modal or overlay? @davidgvf

Ragnar-Loth-brok avatar Sep 19 '23 12:09 Ragnar-Loth-brok

ToastCustom wrap my app, if toast show, put in screen opacity @Ragnar-Loth-brok Your question: no, i dont use in top of modal or overlay

davidgvf avatar Sep 19 '23 12:09 davidgvf

Can you send screenshot of your code wherever you are calling this ToastCustom component. @davidgvf

Ragnar-Loth-brok avatar Sep 19 '23 12:09 Ragnar-Loth-brok

This is my provider of toast: @Ragnar-Loth-brok Untitled

And here use: Untitled (1)

davidgvf avatar Sep 19 '23 12:09 davidgvf

Actually problem is with ToastProvider not the BlurView. By default ToastProvider is adding a background color with some opacity. There may be some props to change the background color or opacity. Refer to react-native-toast-notifications documentation for help.

You can also cross-check whether this is a blurView issue or toast issue by replacing BlurView with View inside ToastView. If issue persists then it's a react-native-toast-notifications issue. @davidgvf

Ragnar-Loth-brok avatar Sep 19 '23 12:09 Ragnar-Loth-brok

If i don't use blur in toast, all is correct, but if i use blur inside toast, is when problem appear @Ragnar-Loth-brok And this case appear already if use blurview in a view, wrap a view, and then navigate other screen, put opacity

davidgvf avatar Sep 19 '23 13:09 davidgvf

I am not using any toast, but yes I can confirm @davidgvf issue: a full screen opac seems to be covering the screen when I use blurview (even if that blurview is in a small isolated area of the screen, as soon as it displays: entire screen is covered in a subtle dark opac view)

did you manage to fix your problem since @davidgvf ? or @ibrar-web ?

even with the solution provided by https://github.com/Kureev/react-native-blur/issues/561#issuecomment-1603021352 the issue still happens on android

pierroo avatar Feb 20 '24 15:02 pierroo