I'm developing an Android app. Where I want to disable the status bar, I mean when the app is opened. Then user can't access the status bar from that app. Is it possible?
Thanks.
I'm developing an Android app. Where I want to disable the status bar, I mean when the app is opened. Then user can't access the status bar from that app. Is it possible?
Thanks.
You can't completely disable it due to security reasons, to get the same behaviour as Youtube or Games (statusbar hidden until you swipe down) you can enable immersive mode
The android documentation actually covers this. Here's the scratch code, and I've linked the exact page. Ensure you are using the method prescribed for API 16 and higher if you are developing in that. I hope this is what you were looking for.
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
ActionBar actionBar = getActionBar();
actionBar.hide();