I want to use the "immersive mode" in my app. I am following the documentation and working properly:
private View mDecorView;
...
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
mDecorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
}
...
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test);
mDecorView = getWindow().getDecorView();
}
This enables immersive full-screen mode. My problem is that I want to use only FLAG_IMMERSIVE_STICKY, as the same result as the Trello app:
The bars are transparent and are always visible. I searched for information and different combinations, but I get the result I want. I appreciate any help.
Thank you!