-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
[Android] Fix wrong modal size in fullscreen #11928
Conversation
Display.getCurrentSizeRange() doesn't include the size of the status bar, so Modal windows on Android have a gap in the bottom that is the same size as the status bar. This checks the current theme and adds the size of status bar to the modal window height if necessary.
By analyzing the blame information on this pull request, we identified @andreicoman11 and @davepack to be potential reviewers. |
This doesn't look correct to me, I'm fairly certain this was fixed a few months back. |
Yes, I tested with android devices with different themes and different configurations(with hw buttons and on screen navigation bar). I can reproduce the issue in #11872 on all. The documentation for
|
@andreicoman11 I was wondering if there is actually a way to tell the first child inside |
@andreicoman11 any comments? I can provide a small test app to show that this is broken. |
I need to have some free time to play with some of the Modals we already have. I'm fairly certain that they'll be working correctly. |
I tried setting Here's a small test app: https://github.com/rgngl/gaptest It uses the branch I created for the PR #11958 so you can try out both things at once. |
I have noticed one thing: If the modal view gets an From what I can see, modal sizing was fixed in 4941cbc where you removed the shadow node for modal host view but then it got broken again in 922cd6d where you brought it back. |
Hi @andreicoman11 , I have already provided an example where it's not working. You can check the example I provided above. You can also see the screenshots I posted in #11872. In the screenshot you shared the status bar is there, so yes, in that situation there is no problem. The gap under the model window appears when the status bar is not visible.
Please let me know if I am missing a point here. |
@andreicoman11 this is definitely still an issue, please note as described by @rgngl the issue pertains to the status bar visibility. |
This needs to get reopened and merged asap, the maintainer was arrogant to not fully read what is happening and test it for him self in the wrong way. This only happens in fullscreen without the status bar. |
👍 |
Thanks @christopherdro ! |
Hi @christopherdro, is this going to merge after all? |
Yes I just wanted to do one last test myself to make sure everything was working as expected. |
@facebook-github-bot shipit |
@christopherdro has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Display.getCurrentSizeRange() doesn't include the size of the status
bar, so Modal windows on Android have a gap in the bottom that is the
same size as the status bar. This checks the current theme and adds the
size of status bar to the modal window height if necessary.
Test plan (required)
Run a React Native app on Android with a theme that doesn't show status bar and launch a modal dialog. See issue #11872 for an example.