-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 - Modal with statusBarTranslucent
has wrong height
#35804
Comments
The same issue. For me, the previous view has a layout flash when the The
the code snippets as follows:
You can see the component the video demo(gif): gif.mov |
This is still an issue in react-native 0.71.7. I'm getting the impression that the Modal has a number of issues surrounding animations in the new architecture, since there's also an issue with callbacks not firing when the Modal has a slide animation (I'm pretty sure now that issue I filed has nothing to do with NativeBase). |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is still an issue |
I can confirm the problem. Modal height is less by the height of status bar than it should be. |
Still an issue in RN 0.73.3 |
I have the same issue. In my case, both the status bar and the navigation bar are hidden, and it looks like The behavior potentially depends on the Android version. As per documentation,
|
cc @j-piasecki to please cross check if this still happens on 0.74 |
It's still a problem, here's the code from the issue running on RNTester: Screen.Recording.2024-05-28.at.17.19.55.movcc @cortinico |
0.74.2 new arch +1 |
Description
On the old architecture, when using a
Modal
with no animation and translucent status bar, a layout flash is noticeable when the modal is opened. Here's the video of this happening (it's visible for one frame):old_arch.mov
On the new architecture, the issue is more problematic as the modal keeps the wrong height:
new_arch.mov
I believe the problem may be with this line as the
windowFullscreen
will be true only when the relevant property is set on the app's theme, and not when theView.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
flag is set on view (which is the case here).The flash on the old arch comes from the fact that the height is updated here to the correct value. This is also the case for the new arch, however, the correct values get overwritten with every state update.
This also happens on 0.71.0-rc.6.
Simply removing the state updates here and here, which I've done in #35803, seems to be solving the problem (at the cost of the modal appearing one frame later), however, I'm not that familiar with the code so it may have some unintended consequences.
Version
0.70.5
Output of
npx react-native info
Steps to reproduce
Create a
Modal
withanimationType="none"
andstatusBarTranslucent={true}
and open it.Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: