I use the code below to enable fullscreen mode:
View decorView = getWindow().getDecorView();
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
);
At android 5 all is ok, but at android 4.3 status bar (and nav bar) are opened afrer 'click' action on any button, so I need to tap twice.
How to prevent this control from showing on onClick
?
Simply add
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
in your manifest.