如何隐藏状态栏的安卓4.0状态栏

由网友(菇凉我是纯爷们)分享简介:如何隐藏状态栏在安卓4.0:How to hide StatusBar in Android 4:帮助我,请。推荐答案所显示的图像在你的问题的条被称为系统吧。 The bar that is shown in the image in your question is called the system bar...

如何隐藏状态栏在安卓4.0:

How to hide StatusBar in Android 4:

帮助我,请。

推荐答案

所显示的图像在你的问题的条被称为系统吧。

The bar that is shown in the image in your question is called the system bar.

在没有硬件按钮,如果出现用户输入系统栏始终会显示设备。您可以致电setSystemUiVisibility与标志SYSTEM_UI_FLAG_HIDE_NAVIGATION并要求下面的窗口功能FLAG_FULLSCREEN通过Window.这应该隐藏系统栏,使您的观点全屏只要用户不与屏幕互动。如果用户触摸屏幕上的系统栏将重新出现,以允许用户使用家庭和背面软件键。

On devices with no hardware buttons the system bar will always be displayed if user input occurs. You can call setSystemUiVisibility with the flags SYSTEM_UI_FLAG_HIDE_NAVIGATION and request the following window feature FLAG_FULLSCREEN via the Window. This should hide the system bar and make your view fullscreen as long as the user does not interact with the screen. If the user touches the screen the system bar will reappear to allow the user to use the home and back software keys.

如果您有一个观点,即用户交互,但你要他不要在系统栏可以设置SYSTEM_UI_FLAG_LOW_PROFILE旗。这应该昏暗的系统栏,使之少分心。

If you have a view that the user will interact with but you want him not to be distracted by the system bar you can set the SYSTEM_UI_FLAG_LOW_PROFILE flag. This should dim the system bar and make it less distracting.

阅读全文

相关推荐

最新文章