Skip to content

Instantly share code, notes, and snippets.

@jldubz
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jldubz/cffa94b6b029c72f0b0c to your computer and use it in GitHub Desktop.
Save jldubz/cffa94b6b029c72f0b0c to your computer and use it in GitHub Desktop.
Set your Android application to fullscreen. This does not hide/lock out the button bar or permanently remove the notification bar. It only hides them.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
<application android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment