有没有办法隐藏在安卓ICS系统/导航栏没有办法、系统、ICS

2023-09-12 03:58:11 作者:所有深爱都是秘密

我想延长就隐藏在系统/导航栏的在Android冰淇淋三明治的屏幕(4.0及以上)平板电脑底部的讨论。

I'd like to extend the discussion regarding hiding of the system/navigation bar at the bottom of the screen on Android Ice Cream Sandwich (4.0 and up) tablet devices.

目前已经是一个线程(Is有没有办法隐藏的Andr​​oid 3.0系统吧?这是一个内部设备,我管理的导航)有关隐藏在蜂窝设备的酒吧。我的客户,但是,将使用最新的冰淇淋三明治设备,并且非常热衷于隐藏栏底部的屏幕。他们的应用程序不经常使用的消费者,并为他们接管整个屏幕提供他们的经验,这是非常重要的。怎么可能是它隐藏这个吧 - 至少,覆盖所有按钮的行为 - 没有生根的设备或重写固件

There's already a thread ( Is there a way to hide the system bar in Android 3.0? It's an internal device and I'm managing navigation ) about hiding the bar on Honeycomb devices. My clients, however, will be using the newest Ice Cream Sandwich devices and are very keen on hiding the bar at the bottom the screen. Their application is not for regular consumer use and it's very important for them to take over the whole screen to provide their experience. How possible is it to hide this bar -- or at least, override the behaviour of all the buttons -- without rooting the devices or rewriting its firmware?

推荐答案

检查出的 SYSTEM_UI_FLAG_HIDE_NAVIGATION ,这个标志隐藏导航栏,直到用户与设备交互。据介绍在Android 4.0的。您可以启用这个标志,这样的例子:

Check out SYSTEM_UI_FLAG_HIDE_NAVIGATION, this flag hides the navigation bar until the user interacts with the device. It was introduced in Android 4.0. You can enable this flag for example like this:

getWindow().getDecorView()
           .setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

请注意,导航会自动再次不会消失,你必须每次设置后,用户互动与设备。

Note that the navigation won't disappear again automatically, you have to set it every time after the user interacted with the device.

另外,您可以使导航不那么碍眼使用 SYSTEM_UI_FLAG_LOW_PROFILE ,这改变了按钮进入小点的(例如像摄像头的应用程序)的。

Alternatively you can make the navigation less obtrusive by using SYSTEM_UI_FLAG_LOW_PROFILE, this changes the buttons into small dots (e.g. like the camera app).