In my react-native application, I want to change the bottom navigation bar color to white. I was able to change the color to white by adding the following line to my src/main/res/value/styles.xml
file.
<item name="android:navigationBarColor">@android:color/white</item>
But when I run it on a simulator or in a physical device. It shows as follows. I want to have the buttons in the bottom navigation bar to be highlighted so that users can clearly see the buttons.
Actual Output
Expected Output
What I Did So far
<item name="android:windowLightNavigationBar">true</item>
to styles.xml file.values-28
folder and adding the styles.xml file as mentioned here .parent="Theme.AppCompat.Light.NoActionBar
to parent="Theme.AppCompat.DayNight.NoActionBar
But none of them seems to fix my issue.
My styles.xml
files look like this.
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowLightNavigationBar">true</item>
<item name="android:navigationBarColor">@android:color/white</item>
</style>
build.gradle
looks like this.
buildToolsVersion = "29.0.3"
compileSdkVersion = 29
minSdkVersion = 27
targetSdkVersion = 29
supportLibVersion = "28.0.0"
I've tested on the following devices
Any help would be appreciated.
Try to add this line too.
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.