1 Overview
In the system development of 11.0, in the development of customized Launcher3, there is also a common requirement for the function of sorting the app list of the workspace of the drawer type, that is, the double-layer desktop. Put the commonly used app icons in front, and other Do an overall sorting behind the list, which requires understanding the process of sorting the app list, and then implement functions according to requirements
As shown in the picture:
2. Launcher3 drawer (double layer) app list sorting related code
packages\apps\Launcher3\src\com\android\launcher3\allapps\AllAppsStore.java
packages\apps\Launcher3\src\com\android\launcher3\allapps\AlphabeticalAppsList.java
packages\apps\Launcher3\src\com\android\launcher3\model\BaseModelUpdateTask.java
packages\apps\Launcher3\res\values\config.xml
3. Relevant code and function implementation of Launcher3 drawer (double-layer) app list sorting
In 11.0, Launcher, as the name suggests, means the desktop, and it is also the first application to start after the android system starts. Here, taking android11 as an example, Launcher3 is the
native Launcher of the system, which is also an app, so Launcher is an Activity, Launcher The source code is also an inherited Activity, and there are many complex actions in Launcher3