RK3399 7.1的SDK中的Launcher3,默认是没有allapps按钮以及有搜索栏,非常碍事,下面要将他去掉。
这两个基本改的位置基本相同,一起说,需要修改两个地方:
- 从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);
- 修改默认配置,关闭搜索框的占位以及打开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.