0

Don't close this question since this is very old but i cant find the solution. I'm new to android. I want to disable the soft keys at the bottom and the status permanently once the user opens my app.

It should not appear even on user interaction.

 public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if(hasFocus){
            getWindow().getDecorView().setSystemUiVisibility(
                    View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
            }
        }

This code just hides the navigation bar. But when i swipe from the bottom it appears. This should not happen. Please help.

To come out of my app i will provide a way. Thanks

Arun
  • 19
  • 2

1 Answers1

0

Don't close this question since this is very old but i cant find the solution. I'm new to android. I want to disable the soft keys at the bottom and the status permanently once the user opens my app.

It should not appear even on user interaction.

I am pretty sure you cannot disable the navigation bar permanently. Otherwise the user will be stuck with your app forever with no way of getting out of it.

Community
  • 1
  • 1
Adeel Ahmad
  • 939
  • 1
  • 10
  • 20
  • Yes but i will provide something to come out of the app. I need to disable it permanently. How can i do it? – Arun Jun 12 '16 at 09:15
  • Android wont allow it. What if your implementation is buggy and you miss a special case. The user would be stuck – Adeel Ahmad Jun 14 '16 at 19:53