davez
davez

Reputation: 543

Fullscreen in Cordova Android InAppBrowser

In InAppBrowser.java, I use

dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
dialog.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);

to have the browser full screen and hidden virtual navigation. It works perfectly. Problem is when I press the home button and then load the application back. At this point, I have displayed the virtual navigation. How can I achieve that the navigation is hidden again?

Upvotes: 0

Views: 1011

Answers (1)

user4035628
user4035628

Reputation:

Add

dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

dialog.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);

in onResume()

Upvotes: 1

Related Questions