Optimization of dragging app to desktop when folder icon list is centered in Android 10.0 Folder folder after full screen

1 Overview

In the 10.0 system rom product development, in the current product requirements development in Launcher3, the layout UI of the folder Folder in Launcher3 has been customized to require that the Folder be modified to full screen, and then the folder icon be
displayed in the middle. list, if the Folder is full screen at this time, if you drag the app icon in the folder list, you can only drag it to the
edge of the screen to the workspace page, so product requirements require dragging the middle folder in the app When it is in the gray area, you can drag it to the workspace page, so you need to
compare the dragging situation when the folder is not full screen, and then look at the dragging process to analyze the implementation of the function.
The rendering is as shown in the figure:

2. Optimized core class for dragging the app to the desktop when the folder icon list is centered after the Folder folder is full screen.

    packages/apps/Launcher3/src/com/android/launcher3/folder/Folder.java
    packages/apps/Launcher3/src/com/android/launcher3/folder/FolderPagedView.java
    packages/apps/Launcher3/src/com/android/launcher3/dragndrop/DragController.java

3. Analysis and implementation of the optimized core function of dragging the app to the desktop when the folder icon list is centered after the Folder folder is full screen

Folder Widget is a powerful launcher widget that allows users to create folders to place applications, quick settings and pop-up widgets for quick launch

In the Launcher3 module of the system source code, in the process related to dragging and dropping the app icon in the folder, the management of the folder is performed in the Folder, the Folder folder layout, and the monitoring of the icons in the folder. Drag<

Guess you like

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