6

I have been looking for a way to re-color the navigation bar while the status bar is fully transparent (not translucent). Getting the status bar to be completely transparent requires the layout flags to be set to NO_LIMITS but that also makes the navigation bar lose its color. Is there any way to achieve this?

Matty De Bie
  • 111
  • 9

2 Answers2

1

If you do not need the status bar text to be dark, the following works.

        getWindow().getDecorView().setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);

And change the navigation bar color as @JaviChaqués suggest.

Sira Lam
  • 5,179
  • 3
  • 34
  • 68
0

You can set this:

<item name="android:navigationBarColor">@color/your_color</item>
<item name="android:statusBarColor">@color/your_color</item>
Javi Chaqués
  • 141
  • 1
  • 12
  • 2
    Yeah that’s one way I guess, but I’m looking for a way to let the NO_LIMITS flag only work for the status bar. So actually setting a flag to the window that doesn’t affect the navigation bar – Matty De Bie Jun 25 '16 at 07:44