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

Question: transluscent vs transparent #49

Open
mekwall opened this issue Apr 26, 2023 · 6 comments
Open

Question: transluscent vs transparent #49

mekwall opened this issue Apr 26, 2023 · 6 comments

Comments

@mekwall
Copy link

mekwall commented Apr 26, 2023

It seems like setting the color to transluscent also changes some underlyign behavior in how the content behind it is rendered, while transparent doesn't do the same. Is this expected behavior and is it possible to make transparent work like transluscent in that it is rendered on top of the content behind it?

@kadiraydinli
Copy link
Owner

Hey @mekwall, this is a behavior that is expected to change the screen size when the color is set to translucent. You can see that React Native behaves the same way by using <Status Bar translucent={true} backgroundColor={"transparent"} /> in its own StatusBar. I think this is actually a situation related to React Native.

@mekwall
Copy link
Author

mekwall commented Apr 29, 2023

Thanks for the quick reply @kadiraydinli! It's kinda what I figured. Would it be possible to add an option to act like translucent but for all colors? So, that when you use a color with transparency the content behind would be partly visible.

@kadiraydinli
Copy link
Owner

@mekwall As far as I have researched, it seems that it is not possible to make bar colors both translucent and colored. If you can find any examples where this has been done, it would be great if you could share it with me.

@aaronkingdom
Copy link

aaronkingdom commented Apr 11, 2024

@mekwall As far as I have researched, it seems that it is not possible to make bar colors both translucent and colored. If you can find any examples where this has been done, it would be great if you could share it with me.

thanks your compent, now i can use like facebook, home page transparent and other page with translucent。。。

full transparent (fullscreen mode, gesture)
transparent
transparent2

not tranparent。。。
not translucent
transluscent

just setting:
SystemNavigationBar.setNavigationColor('translucent'); or
SystemNavigationBar.setNavigationColor('transparent');

in your case, setting ,transparent in the navigationbar, and other compent with translucent color will do the same, i think

@aaronkingdom
Copy link

but a problem, it seems the stautsBar also become transparent no matter what it setting, when setting the navigationbar to transparent。。。 but its not a big problem

@pouyaemami
Copy link

I'm seeing the same issue on my end. Using setNavigationColor('transparent', 'light', 'navigation') will also make the status bar transparent and will actually push my content under the camera notch. When I use the React Native StatusBar component to do the same thing, the content is not being pushed under the camera. All I am trying to do is to set the background of the bottom navigation to transparent so that it looks better (rather than having a slight dark opacity)

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

4 participants