[v2]StatusBar color
Issue Description
I am setting my navbar's background, which works without a problem, however the background color change doesn't affect the statusbar background. Here's my default settings:
Navigation.setDefaultOptions({
topBar: {
background: {
color: '#0079f3'
}
},
statusBarStyle: 'light'
})
Here's what this generates: https://imgur.com/a/OHwLbD7
Environment
- React Native Navigation version: 2.0.2274
- React Native version: 0.55.3
- Platform(s) (iOS, Android, or both?): iOS
- Device info (Simulator/Device? OS version? Debug/Release?): Device, Debug
ios statusBar color Can not be changed . react native provided
@qiepeipei Not sure why it can't be changed, every app out there has the status bar color the same as the navbar color on ios, and a different color on android.
I am guessing you mean the text color, I know that can only be white or black. I am looking to change the background color
@heroic ios statusBar No background color . view style default Screen top . You can customize tabbar settings Background color
I'm getting the same problem. I'm trying to switch from React Navigation and It was setting my statusBar on iOS the same color as my topBar was.
Now I'm setting the color to the topBar but it does not reflect on the statusBar.
What it should be:

Here's what it is:

Same as #3136. And, as @ahmad2smile said, it is possible because react-navigation and react-native-navigation v1 allow you to control it and change colors.
@guyca Is this a missing feature or are we doing something wrong?
@gabrielvcbessa Will need to look into it, could be a missing feature. We're a bit busy migrating the Wix app to v2, so it might be a week (more or less) until we get to this.
Just a thought. It would be really important for ppl like me, when I'v it by default in my previous navigation lib I can't convince my team if its not in this one.
@ahmad2smile We're working on this project full time and tracking progress in the board. This issue has been prioritised, nothing more I can do. You're welcome to look into this and submit a PR
It is fixed on v2.0.2275, but just on iOS. On android it still not working.
Works like a charm.
1 thing I had to update. Event onAppLaunched isn't available on latest alpha Its switched with registerAppLaunchedListener I think. The Documentation doesn't reflect this I checked the source and It worked.
afaik, Docs are auto generated, If not I can submit a pr for this. @guyca ;)
Hey @ahmad2smile Only a small section of the docs is auto generated. You're more then welcome to PR the docs 👍
statusBarBackgroundColor is implemented for Android in 2.0.2286
Will address statusBarStyle soon
Hi. Is this resolved? I still can't change statusBar color on Android. I'm running on version 0.56.0
So how do we change the text color on Android there's no documentation?
style: 'dark' | 'light'
Same as in iOS
Ah so there's no way to set the hex value on Android for custom system menu colors I see.
is it possible now to do the opposite? Because once I do this:
Navigation.setDefaultOptions({
topBar: {
background: {
color: '#0079f3'
}
},
statusBarStyle: 'light'
})
I want to just change the color of the status bar.