关于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
https://www.cnblogs.com/cczheng-666/p/10863724.html
写道
介绍SystemUI之NavigationBar加载流程的链接:
https://www.jianshu.com/p/469ee23bdad7
https://www.jianshu.com/p/469ee23bdad7
上一篇: 线程中断
推荐阅读
-
关于ORACLE图形化安装过程中出现的竖线的处理办法
-
关于webpack打包报错Chunk.entrypoints:UseChunks.groupsIterableandfilterbyinstanceofEntrypointinstead的解决办法
-
关于package.json中npm依赖包版本前的符号含义解析
-
关于JDK源码:我想聊聊如何更高效地阅读
-
关于工作中.net转java遇到的一个远程调用传递重复参的问题。
-
关于Ajax的get与post浅分析,同步请求与异步请求;
-
详解关于vue2.0工程发布上线操作步骤
-
关于java的数组
-
百度官方:关于超链作弊的算法升级
-
关于内部类引用局部变量的一些注意事项