Skip to content Skip to sidebar Skip to footer

Android: Windowlightnavigationbar Not Working

Background: My background is in web development, ruby and javascript. I'm working on a mostly react-native app, so very likely I'm missing something basic. What I want android nav

Solution 1:

I just worked on this same topic and found out you need to run at least Android 9.0 (or API level 28) on the device/emulator for this to work.

Also, I had to add this to the color of the bar:

<item name="android:navigationBarColor">@android:color/white</item>

So, recommended steps:

  • Create a values-v28 folder
  • Insert the style:
<item name="android:navigationBarColor">@android:color/white</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightNavigationBar">true</item>

In your other values folder, you kind of have to live with the fact that this windowsLightNavigationBar doesn't apply...

Small remark

I also found a bug on this change, when putting app in background and then opening it again, the navbar buttons stay white for a second before getting the dark color

Solution 2:

Your code is working as intended for me. Make sure you have the file name and file path written correctly:

https://imgur.com/xclYDuZ

Post a Comment for "Android: Windowlightnavigationbar Not Working"