Android Question Immersive Mode - hide the navigation bar + Libgdx

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
Hi,
I generally use a galaxy S7 edge phone to test my games so I don't know how they act with soft buttons. I do have tablet at home with on screen buttons. I'll test this tonight and let you know.
thank you.

I cannot run immersive mode with libgdx.
 
Upvote 0

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
I cannot make it to work yet. Maybe the solution is that. Does anyone know how to use this in b4a?

B4X:
@Override
public void onWindowFocusChanged(boolean hasFocus) {
   super.onWindowFocusChanged(hasFocus);
   if (hasFocus) {
       getWindow().getDecorView().setSystemUiVisibility(
           View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
           View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
           View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
           View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
   }
}
 
Last edited:
Upvote 0
Top