2

I have my activity on fullscreen using this code:

 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);

but whenever i try to create an alert dialog, the softkeys on tablet devices are shown. Here is the code for my alert dialog:

AlertDialog.Builder adBuilder;
AlertDialog ad;
public void showMessage(){
    adBuilder = new AlertDialog.Builder(this);
    adBuilder.setCancelable(false);
    adBuilder.setTitle("Some Title");
    adBuilder.setMessage("Some Message");
    ad= adBuilder.show();
}

I just want it to stay in fullscreen even when an alert dialog is shown on the screen. Just keep the home and back button hidden.

Not so relevant note: I had to assign it to an alert dialog(ad) so i can dismiss it in another part of the code.

Mc Duran
  • 35
  • 3
  • Try to use search. https://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard – Mykhailo Voloshyn Oct 09 '17 at 15:22
  • I think you misread the question. I'm talking about softkeys (the three button on the bottom part of an android tablet, the back, home and overview buttons) not soft keyboard. – Mc Duran Oct 09 '17 at 15:55

0 Answers0