I want to hide status bar in my Android application.
I used following:
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
It works fine below Kitkat. But after upgrading to Kitkat when we swipe finger from top of screen, the status bar appears again as it works as immersive mode.
I don't want this behavior. And the status bar should not appear if finger is swiped from top of screen. How could I achieve this?
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
add this in your manifest of the activity.