如何隐藏状态栏的安卓4.0 [英] How to hide StatusBar in Android 4

查看:120
本文介绍了如何隐藏状态栏的安卓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.

在没有硬件按钮,如果出现用户输入系统栏始终会显示设备。您可以致电<一个href="http://developer.android.com/reference/android/view/View.html#setSystemUiVisibility%28int%29">setSystemUiVisibility与标志<一href="http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION">SYSTEM_UI_FLAG_HIDE_NAVIGATION并要求下面的窗口功能<一href="http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_FULLSCREEN">FLAG_FULLSCREEN通过<一href="http://developer.android.com/reference/android/view/Window.html#setUiOptions%28int,%20int%29">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.

如果您有一个观点,即用户交互,但你要他不要在系统栏可以设置<一分心href="http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LOW_PROFILE">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.

这篇关于如何隐藏状态栏的安卓4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆