-
Notifications
You must be signed in to change notification settings - Fork 71
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
Alert overlay doesn't fit the entire screen when the navigation bar is hidden (Android Only) #69
Comments
@Princeofgame I'll have a look. Downgrading to v1.3.2 should solve it temporarily. Pass Meanwhile, I'll look at it, seems to be a react modal related issue. |
Hey, thank you for the quick reply (and sorry for this late one, I wanted to test your solution before replying). Thank you for the temporary fix, downgrading the library seems to make things working perfectly now ! I tried the same code on the new version and it didn't work (I switched versions twice), so I guess the new version adds something that creates this problem, which is probably that Modal Component that wraps everything. So I tried experimenting with the Modal component to help out a bit, but i didn't manage to find anything conclusive (I really don't understand styling). Nonetheless, here's a basic code snippet for the modal component where i try to create an overlay and it takes the entire space. |
@Princeofgame I looked at the link you shared. Try importing For some reason the |
@rishabhbhatia Oh you're right, sorry i didn't notice the mistake in the import, i used the auto import function from VSCode... I have the error too, like i said in the first post, my guess is that the library is probably using some Android native code which snack doesn't support... ? (To be honest, I'm also very confused... xD) Anyway, it seems that you can make it work by testing on a real Android device. Edit : You're right ! I tried with the modal from React Native and it's stopping at the navigation bar. |
Yeah I know, it's a little annoying since the Modal doesn't support the styling prop. I'll try to figure out the best solution meanwhile stick with |
I will, thanks again for the help :D |
@toplongguodev what is alert and android version you're using? also, specify the navigation library/other device details, will have a look. |
Thanks for your reply. "@react-navigation/bottom-tabs": "^5.7.3", These are details. |
@toplongguodev awesome alert version? |
@toplongguodev I solved this problem using: |
I changed StatusBar opacity when alert is open and this solution worked for me `
` |
Add props
|
Hi everyone! I am facing the same issue. When the modal is open, the immersion mode of the android device is broken, and the bottom navbar shows up. After closing the modal, the navbar hides as well. Thank you in advance! |
Hey, I'm new to react native and I'm using this library for all the alerts in my project, and so far it's working great.
However when enabling full screen mode in Android (I just hide the navigation bar using this library https://github.com/thebylito/react-native-navigation-bar-color), the overlay surrounding the alert stops at the non-existant bottom navigation bar.
I couldn't get the expo snack to work since the navigation color library probably uses a lot of native code, but the code works in a normal react-native-app.
Here's the link for the code if you want to reproduce the issue. https://snack.expo.io/@moncefbkb/navigation-bar-awesome-alert
Note (What i tried) :
Referring to this SO question https://stackoverflow.com/questions/46126521/android-navigation-bar-height-react-native, it seems like there's a difference between getting the dimensions from the "screen" and for the "window", as, on Android, the former includes the height of the navigation bar and the status bar.
I thought that this was causing the issue so I changed the library's "styles.js" file to get the height from the "screen" instead of getting it from the "window", but nothing changed.
I even tried to set the height to an absurd amount (1000) and it still stops before the navigation bar. I then tried to do the same thing with a simple view (Giving it a background color, and giving it a height of 1000), and it covered all the screen just fine.
So it seems likely that the problem doesn't come from the other library, and this is why i'm posting the issue here.
The text was updated successfully, but these errors were encountered: