When I listen to a YouTube video fullscreen in landscape on my Galaxy Nexus, the navigation bar on the right disapear after a few seconds (the bar which contains the "back&
The last information I have is that you can use the black tape to cover it. That's the suggestion given by Chet Haase. Watch this google IO 2011 session Q&A starting at 53minutes
Youtube app also dim it, not remove it. It is called light out mode.
View v = findViewById(R.id.view_id);
v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
I use this code to hide the navigation bar and it works perfectly for me
View v = this.getWindow().getDecorView();
v.setSystemUiVisibility(View.INVISIBLE);
What you should do is set System Ui Visibility in onResume()
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
If you wont set it sticky bar will be visible again when touch screen will be occured
SYSTEM_UI_FLAG_HIDE_NAVIGATION
flag can be used on a View to hide the navigation bar until a user interaction occurs, starting from Android API 14.
You should look at here and here.
This code will hide the navigation bar until you swipe down from the status bar. It's the same method 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"
ActionBar actionBar = getActionBar();
actionBar.hide();
That will do the trick. Also check out the HoneycombGallery example which demonstrates this working.