Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blurview does not retain in constraints in android #561

Open
ibrar-web opened this issue May 25, 2023 · 16 comments
Open

Blurview does not retain in constraints in android #561

ibrar-web opened this issue May 25, 2023 · 16 comments

Comments

@ibrar-web
Copy link

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.

@tslater
Copy link

tslater commented Jun 3, 2023

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.

@themaxsmith
Copy link

I having the same issue

@Ragnar-Loth-brok
Copy link

Ragnar-Loth-brok commented Jun 22, 2023

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

@JoeDareZone
Copy link

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

@davidgvf
Copy link

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

@Ragnar-Loth-brok
Copy link

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

@davidgvf
Copy link

davidgvf commented Sep 19, 2023

yes @Ragnar-Loth-brok

image
image

blur is perfect but my screen is opaque:
image

without blurview
image

@Ragnar-Loth-brok
Copy link

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

@davidgvf
Copy link

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

@Ragnar-Loth-brok
Copy link

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

@davidgvf
Copy link

davidgvf commented Sep 19, 2023

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

@Ragnar-Loth-brok
Copy link

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

@davidgvf
Copy link

davidgvf commented Sep 19, 2023

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

And here use:
Untitled (1)

@Ragnar-Loth-brok
Copy link

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

@davidgvf
Copy link

davidgvf commented Sep 19, 2023

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

@pierroo
Copy link

pierroo commented Feb 20, 2024

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 #561 (comment)
the issue still happens on android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants