Skip to main content
added 147 characters in body
Source Link

From one of your comments I saw that you meant to disable the navigation bar. Well this will keep it out of the screen until you swipe down from the status bar. It's the same code that Jetpack Joyride uses:

View decorView = getWindow().getDecorView(); 
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);

You must also have this in the activity section of your XML file:

android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"

From one of your comments I saw that you meant to disable the navigation bar. Well this will keep it out of the screen until you swipe down from the status bar. It's the same code that Jetpack Joyride uses:

View decorView = getWindow().getDecorView(); 
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);

From one of your comments I saw that you meant to disable the navigation bar. Well this will keep it out of the screen until you swipe down from the status bar. It's the same code that Jetpack Joyride uses:

View decorView = getWindow().getDecorView(); 
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);

You must also have this in the activity section of your XML file:

android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
Source Link

From one of your comments I saw that you meant to disable the navigation bar. Well this will keep it out of the screen until you swipe down from the status bar. It's the same code that Jetpack Joyride uses:

View decorView = getWindow().getDecorView(); 
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);