Set Android immersive full screen mode in manifest

a 夏天 提交于 2019-12-01 18:32:04

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/20421350/set-android-immersive-full-screen-mode-in-manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!