欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

关于navigator bar

程序员文章站 2022-07-12 19:35:52
...
   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