Similar to how it's possible to hide or show the NavBar on specific scenes, it would be great to have the ability to hide or toggle the theme/color/visibility of StatusBar in a similar manner.
While it is totally doable and reasonable to expect people to do this themselves in componentDidMount or something similar, it is difficult to keep track of what state the StatusBar is in and account for all possible transitions across the app. It also just feels like this library is the "right" place to put this functionality.
I would love to build this out myself and make a PR eventually, but it probably wouldn't be for a decent while so I thought I would just put this out there and see what others thought/if they wanted to have a go at it.
Feel free to close this as I'm already not positive this is the right place for it.
+1 for this !
I think this has merit and would welcome a PR containing this functionality.
Not sure if this is helpful, but you can sorta hack the statusbar to be your own color. You just set the navbar to something like 20 and play with the other style and title style settings.
Here is what I did to produce this: [Screenshot]
I'm sure you can change the leftButton bgcolor and get this lookin pretty good.
const navBarStyle = {
backgroundColor:'red',
height:20,
padding:10,
}
const navBarTitleStyle = {
backgroundColor:'green',
color:'#ccc'
}
I'm encountering the same issue/limitation during the development of my navbar-native component. While provinding a "theme" prop (dark or light) to different scenes, when a dark scene moves to a light one (StatusBar style changes from white to black). But when the second scene pops back to first again, the StatusBar style keeps the black because it sets it globally and the pop action doesn't re-render the first scene.
Any suggestion about how to change/avoid this?
Thanks
I can get around this by create a scene for all 8 versions of a particular scene that I can normally handle with a single scene and different store states, but that seems HUGELY inefficient. It sucks that there isn't a way to do this programmatically with a single scene.
Ok, ok we need some action here it's been too long; who's up to implement that?
Still no way around this?
Most helpful comment
I'm encountering the same issue/limitation during the development of my navbar-native component. While provinding a "theme" prop (dark or light) to different scenes, when a dark scene moves to a light one (StatusBar style changes from white to black). But when the second scene pops back to first again, the StatusBar style keeps the black because it sets it globally and the pop action doesn't re-render the first scene.
Any suggestion about how to change/avoid this?
Thanks