Objective
welcome everyone I share and recommend useful code Snippets ~ ~
Statement
Welcome reprint, but please keep the original source of the article:
CSDN:http://www.csdn.net
rainy season o mo away:http://blog.csdn.net/luckkof
Body
launcher3/src/com/android/launcher3/1. Appscustomizepagedview.javaPublic Static Boolean Disable_all_apps = true;//MTK Modify2. 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);
}
}super.onmeasure (Widthmeasurespec, Heightmeasurespec);
}3.launcher.javaprivate 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 file (This file is very many paths have, please make sure to change to the correct file, for example) mediatek/operator/have)This file will be configured with the hotseat icon, the default is not to configure Screen 2 location, this is the original Allapp button, after doing this custom need to configure SCREEN2, and can not configure screen 4, therefore, Please change the screen ID of the original 4 hotseat icons from 0 to 3 accordingly.