question

A. Ramallo avatar image
A. Ramallo asked

Immersive mode?

I'm currently working on adding HD optimizations for Kindle devices for the game I'm working on. For various reasons, my game requires a fullscreen mode that hides the status and navigation bars at all times. Immersive mode does this perfectly on all Android devices I've tested except for my Kindle Fire HDX 7". For some reason, any tap whatsoever on the screen causes the bars to return. This is problematic because it obscures certain important parts of the game's UI, and this results in a poor user experience. I've set nearly every flag imaginable: decorView.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); The only solution I can think of is to redesign the UI code to account for the status bars (assuming they're even the same size on all devices, and that they'll never change...), but I would rather avoid that if possible. Is this a problem with Fire OS, or something wrong with my code? Thanks.
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sanyu avatar image
Sanyu answered
Please try setting the window property as Full Screen using the following code: this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.