4

When I use Android's sticky immersive mode, some devices (e.g. Nexus tables) show the status bar as translucent when one temporarily swipes the status and nav bars onto the screen. On some other devices (e.g. a Samsung S5), both at Marshmallow, the status bar is opaque.

Unfortunately, a translucent status bar becomes quite muddled with window content in my case, making it pretty useless.

How can I force the temporary, "sticky immersive" status bar to be opaque on all devices, thus avoiding this issue? I've tried

window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    window.setStatusBarColor(Color.BLACK);
}

but that did not help in the slightest.

Jess Holle
  • 633
  • 5
  • 15

0 Answers0