Skip to content

Instantly share code, notes, and snippets.

@Kursulla
Created March 1, 2014 11:34
Show Gist options
  • Save Kursulla/9288652 to your computer and use it in GitHub Desktop.
Save Kursulla/9288652 to your computer and use it in GitHub Desktop.
[Android] Remove status bar
private void removeStatusBar() {
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else {
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment