question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The statusbar turns white when the modal is open (only on certain devices)

See original GitHub issue

I have a component with status bar set to hidden like this:

<View style={ style.container } >
   <StatusBar hidden={true} />

        ...
        
   <Modal isVisible={this.state.isModalVisible}>
     <Text>Modal</Text>   
   </Modal>

</View>

When the modal is visible, status bar is hidden but instead there is an empty white block at the top with the exact height of the status bar:

screenshot

react-native : 0.45.1 react-native-moda l: 2.5.0 android : 5.1.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:33
  • Comments:70 (21 by maintainers)

github_iconTop GitHub Comments

198reactions
ifsnowcommented, Apr 1, 2020

statusBarTranslucent property has been added to Modal of RN 0.62

<Modal ... statusBarTranslucent>...</Modal>

I think this problem has been solved. 😃

67reactions
callmejmcommented, Jul 13, 2018

StatusBar put inside Modal wrap from a View worked for me

  <Modal>
    <View>
      <StatusBar backgroundColor="rgba(0,0,0,0.7)"  barStyle="light-content"/>
    </View>
  </Modal>
Read more comments on GitHub >

github_iconTop Results From Across the Web

react native modal status bar is white not transparent
This library doesn't completely hide the status bar but makes it transparent instead of white. No codes required.
Read more >
react native android 12 status bar text turns white - You.com
React Native with Expo Status Bar showing white on Android and content pushed ... statusbar turns white when the modal is open (only...
Read more >
Status bar stays black even when set to light - Apple Developer
Now I made app structured as master-detail control and set in split controller status bar to be light (white). In Storyboard, all controllers...
Read more >
Cannot Edit Text Inside A React Modal With State To Edit Task ...
Solvedreact native modal The statusbar turns white when the modal is open only on certain devices ; nidaorhan.138.I have a component with status...
Read more >
Light and dark modes - Expo Documentation
You can also configure specific platforms to support different appearance styles by ... theme only), and dark (restrict the app to support dark...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found