-
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
fix(android): status bar black strip fixed #46086
Conversation
@alanleedev has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@shubhamguptadream11 Thanks for fixing this issue. It seems to work great. |
@alanleedev Thank you! I'm glad the fix worked well. |
@shubhamguptadream11 I am making minor formatting change and fixing the version check as you used |
@alanleedev Ohh okay. Thanks for this. |
@alanleedev merged this pull request in f6b6d00. |
This pull request was successfully merged by @shubhamguptadream11 in f6b6d00 When will my fix make it into a release? | How to file a pick request? |
This didn't fix it for me. Running Pixel 8a |
@dgabriele How did you test? Which RN version did you use? |
Summary:
Fixes these issues:
Changelog:
[ANDROID] [FIXED] - Fixed black strip coming when hiding status bar
setHidden
function is responsible for hiding status barreact-native/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt
Line 122 in 25d6a15
What real issue is? For android devices with camera area on top a black strip is coming after hidding status bar.
Previous Implementation:
It seems that FLAG_FULLSCREEN flag are not enough to draw content in camera area.
Solution:
In order to tackle this, android exposes 2 flags:
By adding this flag we are now able to hide status bar properly.
Note: This will work above Android 11 and above
Test Plan:
Device Detail:
Oneplus9 5G OS 11
Before fix:
https://github.com/user-attachments/assets/589098ff-a3fa-4962-a15b-ceacbfd03d2d
After fix:
https://github.com/user-attachments/assets/a87dd8e4-3624-4e09-99da-a14f9e19fcc6