Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide navigation bar in LibGDX?

Tags:

screen

libgdx

Basically that's the question. What can I do to hide the navigation bar when I run an app in a phone that does not have physical home buttons? By the way I'm running android 5 (I don't know if that changes anything.)

If you know how to do it please answer :)

like image 714
blaswtf Avatar asked Nov 27 '14 05:11

blaswtf


People also ask

How do I hide my navigation bar?

Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.

How to hide navigation bar in Android code?

View decorView = getWindow(). getDecorView(); // Hide both the navigation bar and the status bar. // hide the navigation bar.


1 Answers

I know it's an old question, but to anyone who finds their way here, libGDX now has a very easy way to do this. Simply set this field in the AndroidLauncher class.

config.useImmersiveMode = true;
like image 143
tobloef Avatar answered Oct 21 '22 11:10

tobloef