Hello.
We are simply trying to figure out how to change the background color of the soft keys/navigation bar at the bottom of some android phones (the virtual back button/home/app stack... etc).
I'm assuming it's an easy solution but we can't find documentation anywhere, thanks!
We're using this package:
https://github.com/thebylito/react-native-navigation-bar-color
@loudy thanks for that but how are you setting the color on the launch screen?
@loudy
Hello guys. Because of that I can't set my background color....
I have:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
<item name="android:navigationBarColor">@color/backgroundColor</item>
</style>
</resources>
and it works. But while I see SPLASH SCREEN – react-native-splash-screen makes navigation bar BLACK.
How to set color for splash screen?
Okay, I found it.
styles.xml:
<resources>
<!-- Base application theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@color/backgroundColor</item>
<item name="android:statusBarColor">@color/backgroundColor</item>
<item name="android:navigationBarColor">@color/backgroundColor</item>
<item name="colorControlActivated">@color/blue</item>
</style>
<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
<item name="colorPrimaryDark">@color/backgroundColor</item>
<item name="android:navigationBarColor">@color/backgroundColor</item>
</style>
</resources>
Add R.style.SplashScreenTheme in MainActivity.java:
SplashScreen.show(this, R.style.SplashScreenTheme);
Most helpful comment
Okay, I found it.
styles.xml:
Add
R.style.SplashScreenThemein MainActivity.java: