carlosrafaelgn
carlosrafaelgn

Reputation: 971

Android 15 navigation bar icons appear dark even on a dark background

My app uses this theme (it has no light variant):

<style name="AppBase" parent="@android:style/Theme.Material.NoActionBar">
    ...
    <item name="android:forceDarkAllowed">false</item>
    <item name="android:colorControlNormal">[DARK COLOR]</item>
    <item name="android:background">[DARK COLOR]</item>
    <item name="android:navigationBarColor">[DARK COLOR]</item>
    <item name="android:statusBarColor">[DARK COLOR]</item>
    <item name="android:windowLightStatusBar">false</item>
    <item name="android:windowLightNavigationBar">false</item>
</style>

I do not use AppCompat, third party libraries or anything else... Just plain Android classes and styles (and I intend to keep like that).

My activity does not call window.setNavigationBarColor(...) or anything regarding any kind of colors at all.

I am already handling insets using setOnApplyWindowInsetsListener() (on API 35).

Before adding <item name="android:windowLightStatusBar">false</item> to the theme, the status bar icons were dark, even though my background is dark. Therefore, that XML line fixed the issue (this issue happened only on API 35).

Unfortunately, adding <item name="android:windowLightNavigationBar">false</item> appears to have no effect at all on the icons displayed by the system, and they remain dark (on API 35).

This behavior started on Android 15 (API 35). On API 34, 33, 32... the system has always used correct icons in the navigation and status bars (which means light icons because the background is dark).

This is a print of what the navigation bar looks on API 35: navigation bar

Has anyone else come across this issue? How could I solve it?

Thanks, everyone!!!

Upvotes: 3

Views: 115

Answers (0)

Related Questions