[Android 6.0+] StatusBar translucent={true} doesn't works
See original GitHub issueI’ve found a problem: on Android 6.0+ status bar doesn’t renders as it must with translucent={true}
enabled.
On Android 4.4+ and Android 5.0+ it works as expected.
Here is my status bar code:
<StatusBar
animated={true}
barStyle={barStyle}
backgroundColor={backgroundColor}
translucent={true}
showHideTransition={'fade'}
/>
Tested on: RN 0.31.0 Google Nexus 5x (Android 6.0) Google Nexus 4 (Android 5.0) Meizu MX (Android 4.4.4)
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (4 by maintainers)
Top Results From Across the Web
Android Completely transparent Status Bar? - Stack Overflow
I used the code and then added an image as background and then added android:fitsSystemWindows="true" to my activity_main.xml. The system bars are translucent...
Read more >Display content edge-to-edge in your app | Android Developers
Button modes: The system applies a translucent scrim behind the system bars (for API level 29 or higher) or a transparent system bar...
Read more >Android: Full Screen UI with Transparent Status Bar
This article talks about how to make the status bar transparent in any Android app. Also, it deals with how to make a...
Read more >Styling the StatusBar in React Native, Expo and ... - Aamnah
Set translucent on the status bar to make it behave consistently on iOS and Android. Doing so will make your life easier. Not...
Read more >Why would I want to fitsSystemWindows? | by Ian Lake - Medium
That's what the default behavior of the android:fitsSystemWindows="true" ... which needs to span the whole screen and appear under a transparent status bar....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To follow up – I also have no problems with
translucent
in Android 6.x / RN 0.31.0@alexHlebnikov To try and understand where @nihgwu and I differ from you, how do you use
<StatusBar/>
?I have a single
<StatusBar />
component that is rendered near the root view asI use a borderTop to give a color under the statusBar depending on the needs of the scene.
Yep, it worked! Huge thanks for help guys!