Android Launcher 如何去掉主菜单,所有应用摆在桌面,类似小米桌面
来源:互联网 发布:大数据时代变革与挑战 编辑:程序博客网 时间:2024/05/19 04:07
前言
欢迎大家我分享和推荐好用的代码段~~
声明
欢迎转载,但请保留文章原始出处:
CSDN:http://www.csdn.net
雨季o莫忧离:http://blog.csdn.net/luckkof
正文
Launcher3/src/com/android/launcher3/
1. AppsCustomizePagedView.java
public static boolean DISABLE_ALL_APPS = true; //mtk modify
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()) { //mtk modify
setDataIsReady();
setMeasuredDimension(width, height);
onDataReady(width, height);
}
}
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()) { //mtk 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) { //mtk modify
// Set the content type for the all apps space
mAppsCustomizeTabHost.setContentTypeImmediate(contentType);
//} //mtk modify
......
}
4. default_workspace.xml文件(这个文件很多路径有,请确保修改到正确的文件,例如)mediatek/operator/有)
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) { //mtk modify
// Set the content type for the all apps space
mAppsCustomizeTabHost.setContentTypeImmediate(contentType);
//} //mtk modify
......
}
4. default_workspace.xml文件(这个文件很多路径有,请确保修改到正确的文件,例如)mediatek/operator/有)
这个文件会配置hotseat的图标,默认不会配置screen为2的位置,这是原来的allapp button,做了此客制化后就需要配置screen2,而不能配置screen 4,因此,请对应修改原来4个hotseat图标的screen id,从0到3.
0 0
- Android Launcher 如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- [FAQ11625] Launcher3如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- [FAQ11625] Launcher3如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- 小米桌面就是 Launcher3去掉主菜单
- 小米桌面就是 Launcher3去掉主菜单
- 类似launcher桌面滑动效果
- Android Launcher桌面应用快捷方式的开发
- Android Launcher桌面应用快捷方式的开发
- Android Launcher桌面应用快捷方式的开发
- Android Launcher-----桌面应用快捷方式的开发!
- android 如何定制Google launcher的主菜单图标
- android如何定制Google launcher的主菜单图标
- android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序
- android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序
- 如何退出小米桌面
- Android Launcher桌面循环
- Android Launcher桌面循环
- 自定义桌面launcher-android
- 图论中的并查集
- CodeChef May Challenge 2014
- Android Launcher 如何实现壁纸居中
- 执行cocos run -p win32命令报error MSB4019:未导入的项目解决方案
- [置顶] 史上最全设计模式导学目录(完整版)
- Android Launcher 如何去掉主菜单,所有应用摆在桌面,类似小米桌面
- 冥想
- mahout itemBase 源码分析
- Restlet 中文版指南
- hdu 2435 dinic算法模板+最小割性质
- py+pyqt4+Eric4安装配置
- HDU 4027 Can you answer these queries? (线段树+区间点修改)
- string,构造函数与析构
- sigmod 2014文章