Ich möchte eine Statusleiste durchscheinend und Navigationsleiste andere Farbe nicht wie blau durchscheinend oder weißWie ändert sich die Farbe der Navigationsleiste?
Mein Code
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@color/colorPrimary</item>
</style>
Aktivität
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
die Statusleiste durchscheinend gut, aber die Navigationsleiste nicht Farbe ändern . Warum ?
Was ist Ihr Anwendungs-API-Level? –
Nur API-Ebene 24 –