Created
February 13, 2015 10:40
-
-
Save notdrone/b02988374ce7c4303a01 to your computer and use it in GitHub Desktop.
Hide status bar and action bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
//______________________________________________________________ | |
getSupportActionBar().hide(); | |
View decorView = getWindow().getDecorView(); | |
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; | |
decorView.setSystemUiVisibility(uiOptions); | |
//_______________________________________________________________ | |
if (savedInstanceState == null) { | |
getSupportFragmentManager().beginTransaction() | |
.add(R.id.container, new PlaceholderFragment()) | |
.commit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment