I try to change the color of the navigation bar, either via a theme, or programmatically.
Here is what I tried so far:
in style-v21:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#123456</item>
<item name="colorPrimaryDark">#012345</item>
<item name="colorAccent">#987654</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:navigationBarColor">@color/colorAccent</item>
</style>
programmatically:
Window w = getWindow();
w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
w.setNavigationBarColor(ContextCompat.getColor(this, R.color.colorAccent));
The problem is: it works perfectly on Nexus devices (with Android 7.1.1), but not on a LG Q6 (also with Android 7.1.1).
I think there is a way to do it (since the Youtube app has its own navigation bar color), but I don't know how.
I also tried pretty much everything here, here, here, here and here, with no success.
Thanks for your help!