Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Android immersive full screen mode in manifest

In the new KitKat there is immersive full screen mode that can be used like this:

To provide your app with a layout that fills the entire screen, the new SYSTEM_UI_FLAG_IMMERSIVE flag for setSystemUiVisibility() (when combined with SYSTEM_UI_FLAG_HIDE_NAVIGATION) enables a new immersive full-screen mode.

http://developer.android.com/about/versions/android-4.4.html#UI

I'm wondering if it is possible to set this mode for an Activity or full application in the manifest?

like image 584
span Avatar asked Dec 06 '13 10:12

span


1 Answers

There is no way to declare immersive mode in the manifest or window flags.

It's only available via the view-level SYSTEM_UI_FLAG_IMMERSIVE flags, which indicates that it is a request, not a mandate - and that it is a temporary mode.

The system may choose to ignore the request or exit immersive mode at any time, your app should handle those cases.

It's also worth pointing out that hiding the primary navigation on a mobile device is not something to be taken lightly. It's not appropriate for all apps, and should not be done without thought.

like image 111
jspurlock Avatar answered Nov 14 '22 23:11

jspurlock