How does Android Launcher remove the main menu and place all applications on the desktop, similar to Xiaomi desktop?

Source: Internet
Author: User

 

 

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 );
}
} 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 file (many paths in this file are available. Make sure that the file is modified to the correct file, for example, mediatek/operator/). The hotseat icon is configured in this file, screen is not configured as 2 by default. This is the original allapp button. After customization, screen2 needs to be configured instead of screen 4. Therefore, modify the screen id of the four hotseat icons, from 0 to 3.

 

Related Article

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.