`
Leif_冬
  • 浏览: 44493 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

关于navigator bar

阅读更多
   public void onResume() {
        super.onResume();
        removeNavigationKeys();
      
    }

    private void removeNavigationKeys() {
        if(Build.VERSION.SDK_INT >= 19) {
            View decorView = getWindow().getDecorView();
            int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
            decorView.setSystemUiVisibility(uiOptions);
        }
    }

 修改文件/src/com/android/settings/CryptKeeper.java

  关键Code在在“/frameworks/base/services/core/java/com/android/server/wm/DisplayPolicy.java”中

“
if (mDisplayContent.isDefaultDisplay) {
            mHasStatusBar = true;
            mHasNavigationBar = mContext.getResources().getBoolean(R.bool.config_showNavigationBar);

            // Allow a system property to override this. Used by the emulator.
            // See also hasNavigationBar().
            String navBarOverride = SystemProperties.get("qemu.hw.mainkeys");

            // bar on the screen lock if device have touchkey.
            // Screen lock is earlier than starting init.qcom.sh(based on ro.config.device.touchkey to
            // change qemu.hw.mainkeys value). Check ro.config.device.touchkey value to decide hide or
            // show navigation bar
            String touchKey = SystemProperties.get("ro.config.device.touchkey", "");
            if ("0".equals(navBarOverride) &&
                    ("2".equals(touchKey) || "4".equals(touchKey))) {
                navBarOverride = "1";
            }
            if ("1".equals(navBarOverride)) {
                mHasNavigationBar = false;
            } else if ("0".equals(navBarOverride)) {
                mHasNavigationBar = true;
            }
            mHasNavigationBar = false; [将mHasNavigationBar 设置成false即可实现隐藏
写道
修改定制的相关文章链接:
https://www.cnblogs.com/cczheng-666/p/10863724.html

 

写道
介绍SystemUI之NavigationBar加载流程的链接:
https://www.jianshu.com/p/469ee23bdad7

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics