Android Launcher How to get rid of the main menu, all applications placed on the desktop, similar to Xiaomi desktop

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.