Launcher3增加Allapps与移除搜索栏

RK3399 7.1的SDK中的Launcher3,默认是没有allapps按钮以及有搜索栏,非常碍事,下面要将他去掉。

这两个基本改的位置基本相同,一起说,需要修改两个地方:

  1. 从Layer中移除掉 mQsbContainer 移除掉搜索框的 View
--- a/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
@@ -1314,6 +1314,7 @@ public class Launcher extends Activity
         mWorkspace = (Workspace) mDragLayer.findViewById(R.id.workspace);
         mQsbContainer = mDragLayer.findViewById(mDeviceProfile.isVerticalBarLayout()
                 ? R.id.workspace_blocked_row : R.id.qsb_container);
+        mDragLayer.removeView(mQsbContainer);
  1. 修改默认配置,关闭搜索框的占位以及打开Allapps按钮
--- a/packages/apps/Launcher3/src_config/com/android/launcher3/config/FeatureFlags.java
+++ b/packages/apps/Launcher3/src_config/com/android/launcher3/config/FeatureFlags.java
@@ -32,9 +32,9 @@ public final class FeatureFlags {
     public static boolean LAUNCHER3_ALL_APPS_PULL_UP = true;
 
     // Feature flag to enable moving the QSB on the 0th screen of the workspace.
-    public static final boolean QSB_ON_FIRST_SCREEN = true;
+    public static final boolean QSB_ON_FIRST_SCREEN = false;
     // When enabled the all-apps icon is not added to the hotseat.
-    public static final boolean NO_ALL_APPS_ICON = true;
+    public static final boolean NO_ALL_APPS_ICON = false;
     // When enabled fling down gesture on the first workspace triggers search.
     public static final boolean PULLDOWN_SEARCH = false;

效果如下:

在这里插入图片描述

这样一来重新编译就可以了,但是在编译过程中我还遇到了另外一个问题,一并分享。

单编译 Launcher3 遇到了ninja报错,但系统已经是完整编译过一次了,按理来说 mm 单编译是没有问题的。

解决方法如下:

使用 mma 来编译一次 Launcher3 ,随后就可以用 mm 单编译了,当然你也可以一直用 mma

他们之间的区别主要在于 mma 除了编译当前目录下的模块外,还会编译这些模块的依赖。

下面是 envsetup 运行后提供的所有函数(命令)的说明

- lunch:     lunch <product_name>-<build_variant>
- tapas:     tapas [<App1> <App2> ...] [arm|x86|mips|armv5|arm64|x86_64|mips64] [eng|userdebug|user]
- croot:     Changes directory to the top of the tree.
- m:         Makes from the top of the tree.
- mm:        Builds all of the modules in the current directory, but not their dependencies.
- mmm:       Builds all of the modules in the supplied directories, but not their dependencies.
             To limit the modules being built use the syntax: mmm dir/:target1,target2.
- mma:       Builds all of the modules in the current directory, and their dependencies.
- mmma:      Builds all of the modules in the supplied directories, and their dependencies.
- provision: Flash device with all required partitions. Options will be passed on to fastboot.
- cgrep:     Greps on all local C/C++ files.
- ggrep:     Greps on all local Gradle files.
- jgrep:     Greps on all local Java files.
- resgrep:   Greps on all local res/*.xml files.
- mangrep:   Greps on all local AndroidManifest.xml files.
- mgrep:     Greps on all local Makefiles files.
- sepgrep:   Greps on all local sepolicy files.
- sgrep:     Greps on all local source files.
- godir:     Go to the directory containing a file.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值