开发者

Hiding soft keys, notification area, and clock in Android 3.1

The built-in photo gallery hides the soft keys (back, home, etc.), clock, and notification area at the bottom of the screen, but I can't seem to hide them myself in Android 3.1, even with:

re开发者_运维技巧questWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);

Is this possible?


Use this: http://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)

With these constants: http://developer.android.com/reference/android/view/View.html#STATUS_BAR_HIDDEN

When using this, if your own UI is changing along with it (such as happens in Books), you'll want to use this to drive those changes so you stay in sync with the status bar: http://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜