Android 9.0 removes the APK icon white border that Launcher3 adds to the icon by default

1 Overview

  In the customized development of 9.0 system rom products, and in the function development of Launcher3, it was found that when drawing icons for the icons of third-party apps, the icons of third-party apps with white borders were not completely drawn, and the system apps did not exist. This problem is completely drawn, so it is necessary to analyze the icon drawing class to solve this problem

2. Remove the core class of the white border of the APK icon that Launcher3 adds to the icon by default

packages/apps/Launcher3/src/com/android/launcher3/graphics/LauncherIcons.java

3. Remove the core function analysis and implementation of the APK icon white border added by Launcher3 to the icon by default

  LauncherIcons.java in Launcher3 is the core class of the app icon on the app list page in the Launcher, which controls the icon UI display (icon white border control). Next, look at the relevant source code

/**
   * Helper methods for generating various launcher icons
   */
  public class LauncherIcons implements AutoCloseable {
     
     private LauncherIcons(Context context) {
          mContext = context.getApplicationContext();
          mPm = mContext.getPackageManager();
  
          InvariantDeviceProfile idp = LauncherAppState.getIDP(mContext);
          mFillResIconDpi = idp.fillResIconDpi;
          mIconBitmapSize = idp.iconBitmapSize;
  
      

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/130493668