Android - A completely transparent status bar with a transparent navigation bar

I was looking for a way to recolor the navigation bar, while the status bar is completely transparent (not translucent). In order for the status bar to be completely transparent, the layout flags must be set to NO_LIMITS, but this also causes the navigation bar to lose its color. Is there any way to achieve this?

+4
source share
2 answers

You can install this:

<item name="android:navigationBarColor">@color/your_color</item>
<item name="android:statusBarColor">@color/your_color</item>
0
source

If you do not want the status bar text to be dark, the following applies.

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

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

0

All Articles