Set android:windowTranslucentStatus
to false and set android:statusBarColor
to @android:color/transparent
.
Then add code below:
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
If you also want the navigation bar to be translucent, set android:navigationBarColor
to @android:color/transparent
and combine the flag View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
as well.
I didn't experiment on the navigation bar but it will work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…