SoFunction
Updated on 2025-04-10

Android development method to implement Launcher3 application list modification of transparent background

This article describes the method of Android development to implement Launcher3 application list to modify transparent background. Share it for your reference, as follows:

The first application to be launched after the startup is completed during Launcher, which is used to display application lists, shortcuts, widgets, etc. Launcher is the first application (the first application to be launched after booting) to display it to users. The quality of its design affects the user's experience and even affects the user's judgment of purchasing the machine. Therefore, many brand manufacturers will spare no effort to deeply customize Launcher, such as Xiaomi's MIUI, Huawei's EMUI, etc. Android's default Launcher does not have too much customization, it is more simple and is sought after by the Yuansheng Party. Google's Nexus series of mobile phones basically use Yuansheng Launcher. Currently, Android's Launcher version is Launcher3.

Some common ones have been summarized earlierLauncher3 configuration modification methodHere we analyze the techniques for modifying the application list background of launcher3.

Modify the application list background of launcher3 to be transparent, which is slightly different from Launcher2, and the following steps are required:

1. Find the res/layout/apps_customize_pane.xml file and

<.
xmlns:andro
xmlns:launcher="/apk/res/"
android:background="#FF000000">

Modified to:

<.
xmlns:andro
xmlns:launcher="/apk/res/"
android:background="#00000000">

Put the animation part

<frameLayout
android: 
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF000000"
android:visibility="gone" />

Modified to:

<frameLayout
 android: 
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000"
android:visibility="gone" />

2. Find the onTabChangedEnd() method in the class, as follows:

private void onTabChangedEnd( type) {
    int bgAlpha = (int) (255 * (getResources().getInteger(
      .config_appsCustomizeSpringLoadedBgAlpha) / 100f));
    setBackgroundColor((bgAlpha, 0, 0, 0));
    (type);
}

Where bgAlpha is the transparency parameter, just change it to the transparency you need, 255 is opaque. After the above 1 and 2 steps are completed, save and compile to achieve the desired effect.

For more information about Android related content, please check out the topic of this site:Android development introduction and advanced tutorial》、《Android debugging skills and solutions to common problems》、《Android multimedia operation skills summary (audio, video, recording, etc.)》、《Summary of the usage of basic Android components》、《Android View View Tips Summary》、《Android layout layout tips summary"and"Android control usage summary

I hope this article will be helpful to everyone's Android programming design.