Reputation: 2674
I need to show status bars in all my main screens and need to hide the status bars in all subscreens.
I have tried with the component StatusBar in react-native, but it shows the status bar for entire screens also it not hiding the status bar.
<StatusBar backgroundColor='blue' barStyle='light-content' />
Also, I have added the above line in only one main screen. But it changed for all screens.
Any solution for this.
Upvotes: 0
Views: 432
Reputation: 966
add this to header component
<StatusBar hidden={this.props.hidden}/>
then you can pass prop {hidden} Boolean
Upvotes: 0
Reputation: 75
Kindly try with the following code.
<StatusBar hidden=true />
or
More details find here
Upvotes: 0