Thierry-Dimitri Roy Thierry-Dimitri Roy - 6 months ago 19
Android Question

how do you remove the navigation bar on Android?

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", "home" and "recent apps" buttons ).

I want to do the same thing when a user watch a video in my app. What is the code to hide the navigation bar?




[UPDATE] Here is the bar I want to hide. Not the title bar, nor the action bar. The navigation bar. (the bar which contains the "back", "home" and "recent apps" buttons ). I also don't want to "dim" the buttons. I'm looking into removing the bar entirely (like the YouTube app does when you plan a video fullscreen in landscape mode)

enter image description here

Answer

Use:

view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Comments