Method and device for realizing customizable editing of Android application list desktop

Through the combination of viewpager and recycleview, the Android application list desktop span editing function is realized, solving the problem of lack of span editing controls in existing systems, and improving user experience and interaction fluency.

CN120085953APending Publication Date: 2025-06-03FAW CAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510232981.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing Android system does not have controls that encapsulate the cross-page editing function, resulting in complex custom editing functions for application list desktop icons.

Method used

By using the combination of viewpager and recycleview, the pagination display and spread-page editing functions of the application list are realized. The specific steps include defining interactive actions, setting a custom view, hosting application list data through viewpager, and displaying application list data in recycleview, supporting same page and spread page editing.

Benefits of technology

It realizes the custom editing function of the application list, and users can edit by dragging the application icons and support cross-page editing, improving user experience and interactive fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085953A_ABST
    Figure CN120085953A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for realizing customizable editing of an Android application list desktop, and the method comprises the following steps: interaction actions including application entering and editing actions, and the editing actions are defined as same-page editing and cross-page editing; the method comprises the following steps of: setting an application list picture as a user-defined view, and defining a viewpager in the view; the method comprises the following steps: bearing application list data through a viewpager, and carrying out paging according to the number of Apps and a preset number of Apps borne by each page of the viewpager; each viewpager page uses a reccleview, and application list data needing to be displayed on the page is displayed in the reccleview, so that an App is displayed in a paging manner, and an application list picture which can be turned and slid is realized; according to the method, the application list is realized by using viewpager + recleview, page turning and sliding of the application list are realized by using the viewpager, the recleview is self-defined, cross-page editing is realized, a foundation is laid for a subsequent project, the development cost is saved, and in the process of dragging the application icons, a self-defined animation can be added for each passed application icon, the interaction fluency is increased, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Android applications, and in particular, to a method and device for realizing customizable editing of an Android application list desktop. Background Art

[0002] For an application list desktop, if there are too many applications, a paging function is often involved; if a user wants to customize and edit the function of the application list desktop icons, a cross-page editing function needs to be implemented; the existing Android system does not encapsulate controls for such requirements, and it is somewhat complex to implement; the above problems need to be solved urgently. Summary of the Invention

[0003] An object of the present invention is to provide a method and device for realizing customizable editing of an Android application list desktop to solve the problems raised in the above background art.

[0004] To achieve the above object, the present invention provides the following technical solution: A method for realizing customizable editing of an Android application list desktop, including:

[0005] The interaction actions include entering an application and an editing action, and the editing action is defined as in-page editing and cross-page editing;

[0006] Set the application list screen as a custom view, and define a ViewPager in the view;

[0007] Carry the application list data through the ViewPager, and perform paging according to the number of Apps and the preset number of Apps carried by each page of the ViewPager;

[0008] Each page of the ViewPager uses a RecyclerView, and the application list data to be displayed on that page is displayed in the RecyclerView to implement a paged display of Apps and an application list screen that can be paged and scrolled.

[0009] Further, the interaction actions include a select application action and an editing action, the editing action is defined as in-page editing and cross-page editing, and further includes:

[0010] Define the interaction actions, and associate the click event of the user's App with the interaction actions, and determine the user's action intention as entering an application or an editing action through the click event.

[0011] Further, it includes:

[0012] Monitor the click event of the application list screen;

[0013] Set the long-press time threshold of the click event;

[0014] If the click time exceeds the long - press time threshold, it is determined that the long - press action ends, the editing state ends, and the App list is updated;

[0015] If the click time does not exceed the long - press time threshold, it is determined as an action to enter an application, and the corresponding application is entered.

[0016] Furthermore, it includes:

[0017] After determining that the click event is an editing action, enter the editing mode;

[0018] When the pressing position moves, obtain the current pressing position coordinates, and update the icon position of the currently dragged App in real - time according to the current pressing position coordinates;

[0019] Calculate the App icons passed by the currently dragged App icon through coordinates, and add corresponding animation processing.

[0020] Furthermore, it includes:

[0021] When entering the editing state, the user drags the App icon to operate on the current page. During the dragging process, each passed - by App icon will move forward or backward accordingly. After lifting, the editing action ends, the list data of this page is refreshed, and the editing is completed.

[0022] Furthermore, each viewpager page uses a recycleview, and the application list data to be displayed on this page is shown in the recycleview to achieve a paged display of Apps and a scrollable application list screen that can be flipped, including:

[0023] When entering the editing state, determine whether the user edits across pages;

[0024] Call the paging strategy of the viewpager to trigger the sliding of the application list screen to the target viewpager page;

[0025] When the dragged App icon moves to coincide with any App icon in the corresponding page, refresh the list data of all viewpager pages, display the dragged application icon in the target viewpager page, and execute the animation of the relevant App icons at the same time;

[0026] After the dragging and click events end, the editing ends, and the data of all viewpager pages is updated.

[0027] Furthermore, it includes:

[0028] During the cross - page editing process, the App list data of the two pages is refreshed in real - time;

[0029] Create a custom RecyclerView in the onBindViewHolder method of the ViewPager;

[0030] Load the data to be displayed on the current page into the RecyclerView, and create a new RecyclerView each time the page is refreshed to ensure that the data displayed on each page is the latest.

[0031] Further, it includes:

[0032] During the in-page editing or cross-page editing process, when dragging an App icon, we can obtain the id of the currently dragged App icon and the id of each App icon passed through based on the pressing position;

[0033] Obtain the view object in the RecyclerView through the id;

[0034] Add the desired animation to each view object.

[0035] On the other hand, a device for customizing and editing the Android application list desktop is provided, which applies the method for customizing and editing the Android application list desktop described in any one of the above, and is characterized in that it includes:

[0036] An interaction action definition module, where the interaction actions include entering the application and editing actions, and the editing actions are defined as in-page editing and cross-page editing;

[0037] An application list screen setting module, which sets the application list screen as a custom view and defines a ViewPager in the view;

[0038] An application list data hosting module, which hosts the application list data through the ViewPager and performs paging according to the number of Apps and the preset number of Apps hosted on each page of the ViewPager;

[0039] A cross-page editing module, where each page of the ViewPager uses a RecyclerView and displays the application list data to be displayed on that page in the RecyclerView, so as to implement a paged display of Apps and an application list screen that can be scrolled by flipping pages.

[0040] Further, the cross-page editing module includes:

[0041] A judgment module, which judges whether the user is performing cross-page editing when entering the editing state;

[0042] A calling module, which calls the paging strategy of the ViewPager to trigger the application list screen to slide into the target ViewPager page;

[0043] Drag module: When the dragged app icon moves to coincide with any app icon on the corresponding page, refresh the list data of all viewpager pages, display the dragged app icon on the target viewpager page, and simultaneously execute the animation of the relevant app icon.

[0044] Update module: After the drag and click events end and the editing is completed, update the data of all viewpager pages.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows: This solution uses viewpager + recycleview to implement the application list. The viewpager realizes the paging and sliding of the application list, and the recycleview is customized. Long-pressing the app icon enters the editing state, dragging the app icon to the target position to complete the editing of the application list. If during the dragging process, the app icon stays at the edge of the list for a fixed time, it triggers the paging of the application list to achieve cross-page editing of the application list. There is no control in the existing Android system that encapsulates and implements the cross-page editing function. Based on the use of two native controls, viewpager and recycleview, this solution realizes cross-page editing, laying a foundation for future projects, saving development costs, and during the process of dragging the app icon, custom animations can be added for each app icon passed by, increasing the interaction fluency and improving the user experience. Description of the Drawings

[0046] Figure 1 It is a flowchart of the method for realizing the customizable editing of the Android application list desktop in the embodiment of the present invention;

[0047] Figure 2 It is a connection block diagram of the device for realizing the customizable editing of the Android application list desktop in the embodiment of the present invention;

[0048] Figure 3 It is a logic diagram of the method for realizing the customizable editing of the Android application list desktop in the embodiment of the present invention;

[0049] Figure 4 It is a schematic diagram of paging for carrying the application list data by viewpager in the embodiment of the present invention according to the number of apps and the preset number of apps carried by each page of viewpager;

[0050] Figure 5 It is a schematic diagram of the editing action of dragging the app icon within the current page in the embodiment of the present invention;

[0051] Figure 6 It is a schematic diagram of the editing action of dragging the app icon across pages in the embodiment of the present invention;

[0052] In the figure: 10, interaction action definition module; 20, application list screen setting module; 30, module for carrying application list data; 40, cross-page editing module.

[0053] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0054] In the description of the present invention, unless otherwise specified, the meaning of "a plurality of" is two or more; the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0055] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "connected" and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0056] Please refer to the attached Figures 1 to 6 As shown in the specification, the present invention provides a technical solution: As Figure 1 shown, a method for realizing customizable editing of the Android application list desktop includes the following steps:

[0057] S102. The interaction actions include entering an application and an editing action, and the editing action is defined as in-page editing and cross-page editing;

[0058] Specifically, define the interaction actions, and associate the click event of the user App with the interaction actions, and determine the user action intention as entering an application or an editing action through the click event.

[0059] Among them, as Figure 3 shown, define our interaction actions, which are divided into in-page editing and cross-page editing.

[0060] Specifically, listen for click events on the application list screen; set the long-press time threshold for click events; if the click time exceeds the long-press time threshold, it is determined that the long-press action ends, the editing state is ended, and the App list is updated; if the click time does not exceed the long-press time threshold, it is determined that the action to enter the application is taken, and the corresponding application is entered.

[0061] It can be understood that since each App has its own click event, we need to distinguish the user's intention through the user's actions, whether they want to click on the application icon to enter the application or enter the editing state by long-pressing the application icon; the primary goal is to solve event conflicts, reasonably distribute user events, and listen for click events on the application list screen. In this embodiment, the long-press time threshold is preferably 2 seconds. When ACTION_DOWN occurs, start timing (long-pressing for 2s enters the editing state); when ACTION_UP occurs, determine whether the long-press time exceeds 2s. If it exceeds 2s, the long-press action ends, the editing state is ended, and the App list is updated. Otherwise, it is a click action, and the corresponding application is entered; when ACTION_MOVE occurs, if the editing mode has been entered, obtain the coordinates of the current finger position, and update the position of the currently dragged App icon in real time, and calculate the App icons passed by the currently dragged App icon through the coordinates, and add corresponding animation processing.

[0062] S104. Set the application list screen as a custom view, and define a viewpager in the view;

[0063] S106. Use the viewpager to carry the application list data, and perform paging according to the number of Apps and the preset number of Apps carried by each page of the viewpager;

[0064] S108. Each page of the viewpager uses a recycleview, and the application list data to be displayed on this page is displayed in the recycleview to implement a paged display of Apps and a scrollable application list screen.

[0065] Specifically, it includes:

[0066] After determining that the click event is an editing action, enter the editing mode;

[0067] When the pressing position moves, obtain the coordinates of the current pressing position, and update the position of the icon of the currently dragged App in real time according to the coordinates of the current pressing position;

[0068] Calculate the App icons passed by the currently dragged App icon through the coordinates, and add corresponding animation processing.

[0069] Among them, when in ACTION_MOVE, if the editing mode has been entered, obtain the coordinates of the current finger position, update the position of the currently dragged App icon in real time, and calculate the App icons passed by the currently dragged App icon through the coordinates, and add corresponding animation processing.

[0070] Specifically, when entering the editing state, the user drags the App icon to operate on the current page. During the dragging process, each passed App icon will move forward or backward accordingly. After lifting, the editing action ends, and the list data of this page is refreshed to complete the same-page editing.

[0071] Among them, this step is the editing method for same-page editing, and the specific actions are as Figure 5 shown. For example, in page1, when dragging App2 to the position of App6, App3, App4, App5, and App6 move forward one position in sequence, and App2 moves to the coordinate position of the original App6.

[0072] Specifically, when entering the editing state, judge the user's cross-page editing;

[0073] Call the paging strategy of the viewpager to trigger the sliding of the application list screen to the target viewpager page;

[0074] When the dragged App icon moves to coincide with any App icon in the corresponding page, refresh the list data of all viewpager pages, display the dragged application icon in the target viewpager page, and at the same time execute the animation of the relevant App icon;

[0075] After the dragging and click events end, the editing ends and the data of all viewpager pages is updated.

[0076] Among them, this step is the cross-page editing method, and the specific actions are as Figure 6 shown; for example, assume that there are 11 Apps in the application list we need to implement, with a maximum of 6 displayed on each page. App3 is located on Page1 and App10 is located on Page2. When we need to move App3 to the position of App10, first drag App3 from Page1 into Page2, then move Page3 to the position of App10. After the dragging ends, App4 to App10 move forward one position in sequence, and App3 occupies the original position of App10.

[0077] Specifically, during the cross-page editing process, the App list data of the two pages is refreshed in real time;

[0078] Create a custom recycleview in the onBindViewHolder method of the viewpager;

[0079] Load the data to be displayed on the current page into the RecyclerView, creating a new RecyclerView each time the page is refreshed to ensure that the data displayed on each page is the latest.

[0080] Among them, during the cross-page editing process, the difficulty lies in how to refresh the App list data on both pages in real time. We create a custom RecyclerView in the onBindViewHolder method of the ViewPager (this method will be called when the ViewPager is created or each time the data is refreshed, and is used to load data), and then load the data to be displayed on the current page into the RecyclerView. In this way, each time the page is refreshed (entering the editing state, dragging, or flipping the page will trigger onBindViewHolder), a new RecyclerView will be created to ensure that the data displayed on each page is the latest.

[0081] Specifically, during the same-page editing or cross-page editing process, when dragging an App icon, we can obtain the id of the currently dragged App icon and the id of each App icon passed through based on the pressing position;

[0082] Obtain the view object in the RecyclerView through the id;

[0083] Add the desired animation to each view object.

[0084] Among them, adding animations. During the same-page editing or cross-page editing process, when dragging an App icon, we can obtain the id of the currently dragged App icon and the id of each App icon passed through based on the position of the finger, obtain the view object in the RecyclerView through the id, and then add the desired animation to each view object.

[0085] The following uses a specific editing application as an example to illustrate:

[0086]

[0087]

[0088]

[0089] If the application list is paged and cross-page editing needs to be implemented, this solution can be considered. It can not only achieve cross-page editing, but also add custom animations to the movement of app icons involved during the editing process, which cannot be achieved by native Android controls. Through the above strategies, this solution solves event conflicts, reasonably distributes events by analyzing user gestures, and realizes a slidable and cross-page editable application list screen. And it can record each app icon during the editing process, facilitating the addition of custom animations or custom actions to it, providing an open entry for subsequent function changes and enhancing the scalability of the program;

[0090] On the other hand, a device for customizing and editing the Android application list desktop is provided. Using the method for customizing and editing the Android application list desktop described in any one of the above, it is characterized by including:

[0091] An interaction action definition module 10, where the interaction actions include entering an application and an editing action, and the editing action is defined as in-page editing and cross-page editing;

[0092] An application list screen setting module 20, which sets the application list screen as a custom view and defines a viewpager in the view;

[0093] An application list data hosting module 30, which hosts the application list data through the viewpager and performs paging according to the number of Apps and the preset number of Apps that each viewpager page can host;

[0094] A cross-page editing module 40, where each viewpager page uses a recycleview and displays the application list data that needs to be displayed on this page in the recycleview to achieve a paged display of Apps and a slidable application list screen that can be flipped;

[0095] Optionally, the cross-page editing module includes:

[0096] A judgment module, which judges whether the user performs cross-page editing when entering the editing state;

[0097] A calling module, which calls the paging strategy of the viewpager to trigger the application list screen to slide to the target viewpager page;

[0098] A dragging module, when the dragged app icon moves to coincide with any app icon on the corresponding page, it refreshes the list data of all viewpager pages, displays the dragged app icon on the target viewpager page, and simultaneously executes the animations of the relevant app icons;

[0099] After the update module finishes dragging and click events, the editing is completed, and all viewpager page data is updated.

[0100] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for implementing a customizable editing method for an Android application list desktop, characterized in that: include: Interactive actions include entering applications and editing actions. Editing actions are defined as same-page editing and cross-page editing. Set the application list screen to a custom view and define the viewpager in the view; Use viewpager to carry the application list data, and paginate according to the number of apps and the preset number of apps carried on each page of viewpager; Each viewpager page uses recycleview and displays the application list data to be displayed on the page in recycleview, so as to realize paging display of apps and a page-turning and sliding application list screen.

2. According to claim 1, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: Interactive actions include select application actions and edit actions. Edit actions are defined as same-page editing and cross-page editing, and also include: Define interactive actions and associate the user's App click events with the interactive actions. Use click events to determine if the user's action intention is to enter the application or edit the action.

3. According to claim 2, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: include: Listen for click events on the application list screen; Set the long press time threshold for click events; If the click time exceeds the long press time threshold, it is judged that the long press action ends, the editing state ends, and the App list is updated; If the click time does not exceed the long press time threshold, the action of entering the application is determined and the corresponding application is entered.

4. According to claim 3, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: include: Enter the editing mode after judging that the click event is an editing action; When the pressed position moves, the current pressed position coordinates are obtained, and the dragged icon position of the current App is updated in real time according to the current pressed position coordinates; Calculate the app icons that the currently dragged app icon passes through through coordinates and add corresponding animation processing.

5. According to claim 4, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: include: When entering the editing state, the user drags the App icon to perform operations on the current page. During the dragging process, each App icon passed by will move forward or backward accordingly. After lifting, the editing action ends, the list data on this page is refreshed, and the editing is completed.

6. According to claim 1, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: Each viewpager page uses recycleview and displays the application list data to be displayed on the page in recycleview to achieve paging display of apps and a page-turning and sliding application list screen, including: When entering the editing state, determine whether the user is editing across pages; Call the viewpager's page turning strategy to trigger the application list screen to slide to the target viewpager page; When the dragged App icon moves to overlap with any App icon in the corresponding page, refresh the list data of all viewpager pages, display the dragged App icon in the target viewpager page, and execute the animation of the related App icons at the same time; After the dragging and clicking events are completed, the editing is completed and all viewpager page data is updated.

7. A method for implementing customizable editing of Android application list desktop according to claim 6, characterized in that: include: During cross-page editing, the App list data of the two pages are refreshed in real time; Create a custom recycleview in the onBindViewHolder method of the viewpager; Load the data that needs to be displayed on the current page into the recycleview, so that a new recycleview is created each time the page is refreshed to ensure that each page displays the latest data.

8. According to claim 6, a method for implementing a customizable editing method of an Android application list desktop is characterized in that: include: During the same-page editing or cross-page editing process, when dragging an App icon, we can obtain the ID of the currently dragged App icon and the ID of each App icon passed by the pressed position; Get the view object in recycleview by id; Add the animation you want to implement to each view object.

9. A device for implementing customizable editing of an Android application list desktop, using a method for implementing customizable editing of an Android application list desktop as claimed in any one of claims 1 to 8, characterized in that: include: Interaction definition module. Interaction includes entering application and editing. Editing is defined as same-page editing and cross-page editing. The application list screen setting module sets the application list screen to a custom view and defines the viewpager in the view; The module that carries the application list data carries the application list data through the viewpager, and paging is performed according to the number of apps and the preset number of apps carried on each page of the viewpager; In the cross-page editing module, each viewpager page uses recycleview and displays the application list data to be displayed on the page in recycleview to realize the paging display of App and the application list screen that can be flipped and slid.

10. The device for implementing a customizable editing device for an Android application list desktop according to claim 9, characterized in that: The cross-page editing module includes: The judgment module, when entering the editing state, determines whether the user is editing across pages; Call the module, call the viewpager's page turning strategy, and trigger the application list screen to slide to the target viewpager page; Drag module: when the dragged App icon moves to overlap with any App icon in the corresponding page, refresh the list data of all viewpager pages, display the dragged application icon in the target viewpager page, and execute the animation of the related App icons; Update the module, end the drag and click events, end the editing, and update all viewpager page data.