小米桌面就是 Launcher3去掉主菜单
2017-01-17 16:53
393 查看
Launcher3/src/com/android/launcher3/
KK版本:
1. AppsCustomizePagedView.java
public static boolean DISABLE_ALL_APPS = true; //modify
KK2版本:
1. LauncherAppState.java
请修改isDisableAllApps()方法,返回true;
接下来的修改对KK和KK2版本都适用
2. AppsCustomizePagedView.java
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
LauncherLog.d(TAG, "onMeasure mIsInEditMode = " + mIsInEditMode + widthMeasureSpec + " " + heightMeasureSpec
+ " " + width + " " + height);
if (!isDataReady()) {
LauncherLog.d(TAG, "onMeasure DISABLE_ALL_APPS is " + DISABLE_ALL_APPS
+ " !mApps.isEmpty() is " + !mApps.isEmpty()
+ " !mWidgets.isEmpty()" + !mWidgets.isEmpty());
if ((DISABLE_ALL_APPS || (!mApps.isEmpty() && mAppsHasSet)) && !mWidgets.isEmpty()) { //modify
setDataIsReady();
setMeasuredDimension(width, height);
onDataReady(width, height);
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
3.Launcher.java
private void showAppsCustomizeHelper(final boolean animated, final boolean springLoaded,
final AppsCustomizePagedView.ContentType contentType) {
......
// Shrink workspaces away if going to AppsCustomize from workspace
Animator workspaceAnim =
mWorkspace.getChangeStateAnimation(Workspace.State.SMALL, animated);
//if (!AppsCustomizePagedView.DISABLE_ALL_APPS) { //modify
// Set the content type for the all apps space
mAppsCustomizeTabHost.setContentTypeImmediate(contentType);
//} //modify
......
}
4. default_workspace.xml文件(这个文件很多路径有,请确保修改到正确的文件,例如)mediatek/operator/有)
这个文件会配置hotseat的图标,默认不会配置screen为2的位置,这是原来的allapp button,做了此客制化后就需要配置screen2,而不能配置screen 4,因此,请对应修改原来4个hotseat图标的screen id,从0到3.
KK版本:
1. AppsCustomizePagedView.java
public static boolean DISABLE_ALL_APPS = true; //modify
KK2版本:
1. LauncherAppState.java
请修改isDisableAllApps()方法,返回true;
接下来的修改对KK和KK2版本都适用
2. AppsCustomizePagedView.java
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
LauncherLog.d(TAG, "onMeasure mIsInEditMode = " + mIsInEditMode + widthMeasureSpec + " " + heightMeasureSpec
+ " " + width + " " + height);
if (!isDataReady()) {
LauncherLog.d(TAG, "onMeasure DISABLE_ALL_APPS is " + DISABLE_ALL_APPS
+ " !mApps.isEmpty() is " + !mApps.isEmpty()
+ " !mWidgets.isEmpty()" + !mWidgets.isEmpty());
if ((DISABLE_ALL_APPS || (!mApps.isEmpty() && mAppsHasSet)) && !mWidgets.isEmpty()) { //modify
setDataIsReady();
setMeasuredDimension(width, height);
onDataReady(width, height);
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
3.Launcher.java
private void showAppsCustomizeHelper(final boolean animated, final boolean springLoaded,
final AppsCustomizePagedView.ContentType contentType) {
......
// Shrink workspaces away if going to AppsCustomize from workspace
Animator workspaceAnim =
mWorkspace.getChangeStateAnimation(Workspace.State.SMALL, animated);
//if (!AppsCustomizePagedView.DISABLE_ALL_APPS) { //modify
// Set the content type for the all apps space
mAppsCustomizeTabHost.setContentTypeImmediate(contentType);
//} //modify
......
}
4. default_workspace.xml文件(这个文件很多路径有,请确保修改到正确的文件,例如)mediatek/operator/有)
这个文件会配置hotseat的图标,默认不会配置screen为2的位置,这是原来的allapp button,做了此客制化后就需要配置screen2,而不能配置screen 4,因此,请对应修改原来4个hotseat图标的screen id,从0到3.
相关文章推荐
- 小米桌面就是 Launcher3去掉主菜单
- Android Launcher 如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- [FAQ11625] Launcher3如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- Android Launcher 怎样去掉主菜单,全部应用摆在桌面,相似小米桌面
- [FAQ11625] Launcher3如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- 去掉默认桌面:Launcher3 和 Home
- android 6.0,为何Launcher3桌面和主菜单图标字体大小不跟随系统发生变化?
- Android Launcher3 去掉应用列表后,在系统桌面拖动应用图标卸载应用
- 小米推出POCO Launcher极致精简小桌面
- android 6.0,为何Launcher3桌面和主菜单图标字体大小不跟随系统发生变化?
- 简单就是美,桌面管理Fences分享
- 将某一普通应用设为桌面(launcher)的方法
- Win8去掉桌面图标的箭头
- Win7怎样去掉桌面图标箭头
- 修改android 修改系统程序图标大小,android4.0 Launcher2 桌面的列数,行数
- 分享:通过Launcher里的WorkSpace完成桌面的3D转屏效果(有源码)
- 怎样去掉桌面图标和字的蓝色阴影
- Android launcher 桌面抽屉切换动画
- flex 桌面程序去掉默认的title和边框及可以移动
- 使用注册表表去掉win7桌面图标箭头的方法