4

I am developing an Application where I need to go completely full screen. In kitkat its very easy by using Immersive tag. But since not all devices support kitkat I need to take JB and ICS (atleast) into consideration.

Well although there is a way of hiding navigation bar and status bar in JB and ICS it becomes visible as soon as the user interacts. This certainly does not looks good. It also takes one extra touch.

I did a lot of searching on net and was surprised that there is no way we can achieve it. I was hoping to find some trick or hack but nothing.

I am pretty sure that before kitkat came there were games which used full screen so I guess there should be a way (like Temple Run and Andgry Birds). Can some one please guide me in correct direction.

P.S: I am looking solution for devices which are not rooted.

Thanks :)

4

1 回答 1

1

使用全屏主题,或按照此处所述的代码设置它https://developer.android.com/training/system-ui/status.html 正如我在评论中已经指出的那样,这将为您提供全屏显示。不是在 KitKat 上看到的沉浸式模式,用户可以轻松地取消隐藏状态栏。如果您使用主题方法,最好在 API19+ (KitKat) 上设置一个非全屏主题并告诉它从那里开始使用沉浸式模式。

于 2014-07-10T12:55:04.523 回答