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

Pop-up is too low on Android #35

Closed
rpander93 opened this issue Jan 11, 2021 · 4 comments · Fixed by #57
Closed

Pop-up is too low on Android #35

rpander93 opened this issue Jan 11, 2021 · 4 comments · Fixed by #57
Labels
enhancement New feature or request

Comments

@rpander93
Copy link

Hi there,

We found that the pop-up is too low on Android if not using the translucent statusbar. In our case, we switched from managing the statusbar with the component to letting Android manage it. We then saw that the pop-up was rendered with a top margin of approx. 1x the height of the statusbar. This is caused by:

StatusBar.currentHeight + 10); // Just to add a bit more padding

Setting this to 0 manually fixes the issue. Unfortunately it seems that this is not configurable, so we had do copy the whole file just to make this adjustment. Is this something that could be fixed?

@carsonwah
Copy link
Owner

@rpander93 Sorry for the late reply. Oh I overlooked this.
This is because if StatusBar is not translucent, the whole app will be rendered starting at the bottom of the StatusBar.

So the correct height should be:

  • iOS with notch: 44
  • iOS without notch: 20
  • Android with translucent StatusBar: StatusBar.currentHeight + 10
  • Android with non-translucent StatusBar: 10

Seems there is no way to determine in code whether StatusBar is translucent or not. I will opt for externalizing it as props. Will find a time to implement this. Thanks for reporting and sorry for the inconvenience caused.

@carsonwah carsonwah added the bug Something isn't working label Mar 17, 2021
@rpander93
Copy link
Author

No worries! That's indeed what's going on. Thanks for looking into it.

@carsonwah carsonwah added enhancement New feature or request and removed bug Something isn't working labels Sep 10, 2022
@NxsHbb
Copy link

NxsHbb commented Dec 24, 2022

Any update!

@carsonwah
Copy link
Owner

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

Successfully merging a pull request may close this issue.

3 participants