Android隐藏NavigationBar方法

5420阅读 0评论2015-01-26 DennisBjut
分类:Android平台

1.frameworks/base/core/res/res/values/config.xml
false 

2. 系统Hide Status Bar
    frameworks/base/core/res/res/values/dimens.xml
   把  25dip 修改为0dip
3. 系统Hide Navigation Bar
       frameworks/base/packages/SystemUI/src/com/android/systemui/
         statusbar/phone/PhoneStatusBar.java
       在start函数中注释掉 "addNavigationBar();"
4.在Android4.0及以后版本中,可通过以下方法隐藏NavigationBar
View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
上一篇:repo管理git打Tag之后如何获取新版本代码
下一篇:android软键盘弹出遮挡输入界面解决方案