美文网首页
Android 8 隐藏NavigationBar

Android 8 隐藏NavigationBar

作者: 梧叶已秋声 | 来源:发表于2021-01-13 09:28 被阅读0次
diff --git a/device/mediatek/common/overlay/navbar/frameworks/base/core/res/res/values/config.xml b/device/mediatek/common/overlay/navbar/frameworks/base/core/res/res/values/config.xml
index 22d4ea6..c06ebfb 100755
--- a/device/mediatek/common/overlay/navbar/frameworks/base/core/res/res/values/config.xml
+++ b/device/mediatek/common/overlay/navbar/frameworks/base/core/res/res/values/config.xml
@@ -22,6 +22,6 @@
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
          autodetected from the Configuration. -->
-    <bool name="config_showNavigationBar">true</bool>
+    <bool name="config_showNavigationBar">false</bool>
 
 </resources>
diff --git a/device/mediateksample/k39tv1_bsp_1g/system.prop b/device/mediateksample/k39tv1_bsp_1g/system.prop
index 39984c4..57275a0 100755
--- a/device/mediateksample/k39tv1_bsp_1g/system.prop
+++ b/device/mediateksample/k39tv1_bsp_1g/system.prop
@@ -55,7 +55,7 @@ ro.audio.silent=0
 ro.zygote.preload.enable=0
 
 # temporary enables NAV bar (soft keys)
-qemu.hw.mainkeys=0
+qemu.hw.mainkeys=1
 
 ro.kernel.zio=38,108,105,16
 #ro.kernel.qemu=1

然后如果launcher的显示有变化的话就屏蔽掉自动选择的那个,例如我这里是自动选择了Nexus 7。

//vendor/mediatek/proprietary/packages/apps/Launcher3/res/xml/device_profiles.xml
<!--  
    <profile
        launcher:name="Nexus 7"
        launcher:minWidthDps="575"
        launcher:minHeightDps="904"
        launcher:numRows="5"
        launcher:numColumns="6"
        launcher:numFolderRows="4"
        launcher:numFolderColumns="5"
        launcher:minAllAppsPredictionColumns="4"
        launcher:iconSize="64"
        launcher:iconTextSize="14.4"
        launcher:numHotseatIcons="7"
        launcher:defaultLayoutId="@xml/default_workspace_5x6"
        />
-->

参考链接:
[MTK] 不显示NavigationBar
Android笔记-NavigationBar显示流程
Android 8.1 中Systemui中的常见修改(四)NavigationBar相关修改

相关文章

网友评论

      本文标题:Android 8 隐藏NavigationBar

      本文链接:https://www.haomeiwen.com/subject/mpcwoktx.html