react-native-navigation-bar-color: Looks like setting buttons color does not work
I’m trying to set white natigation bar color with dark buttons:
import changeNavigationBarColor from 'react-native-navigation-bar-color';
...
changeNavigationBarColor('#ffffff', false);
But looks like it does not work - the buttons are always white.

Just in case I’ve tried to set changeNavigationBarColor(‘#ffffff’, true); Nothing changed.
I’ve tested it on androids from 6 to 8.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (8 by maintainers)
On API 33 if theme is changed (ie. light to dark or dark to light), while the app is open in the background, the navigation bar color scheme isn’t being picked up as far as button foreground color is concerned when the app is brought to foreground… (I think this behaviour likely started with API 30+ because that’s when SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR got deprecated)
When I update setNavigationBarTheme function as follows it seems to work better (ie. app picks up light <-> dark theme changes as far as button color is concerned without needing to be restarted):
Maybe it’s worthwhile updating the package with something similar to the above ?
add
setTimeout(() => { changeNavigationBarColor('white', true); }, 1000);works fine