Interface component adjusting method, terminal and computer program product

By moving other interface components in the interface or moving them to other interfaces, the impact of interface component size adjustment on the overall layout is solved, the success rate of adjustment operations is improved, and the arrangement of interface components is optimized.

CN119668756APending Publication Date: 2025-03-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411748788.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

When dynamically adjusting the interface component size, it may have a significant impact on the layout of other components on the desktop, resulting in a reduced success rate of adjustment operations.

Method used

By receiving the dimensional adjustment operation of the interface component, try to move other interface components in the current interface to accommodate the adjusted components. If it is not possible, some interface components will be moved to other interfaces to display the adjusted components using the area vacant after removing the components.

Benefits of technology

The impact of interface component size adjustment on the overall interface layout is reduced, the success rate of adjustment operations is improved, and the arrangement of interface components is optimized through the principle of minimum disturbance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668756A_ABST
    Figure CN119668756A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface component adjusting method, a terminal and a computer program product, and belongs to the technical field of man-machine interaction. The method comprises the following steps: receiving a size adjustment operation on a first interface component in a first interface, wherein the first interface comprises a plurality of areas; under the condition that the first interface can contain the size-adjusted first interface component by moving the second interface component, moving the second interface component in the first interface, and displaying the size-adjusted first interface component in an empty area after the second interface component is moved; and under the condition that the first interface cannot accommodate the first interface component after the size is adjusted by moving the second interface component, moving a third interface component in the first interface to the second interface, and displaying the first interface component after the size is adjusted in an empty area after the third interface component is removed. According to the embodiment of the invention, the influence of local interface component size adjustment on the overall interface component layout can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of human-computer interaction technology, and in particular to an interface component adjustment method, a terminal, and a computer program product. Background Art

[0002] In the daily use of the terminal, users can personalize the components displayed on the desktop, such as aggregating multiple icons into the same folder, or dynamically adjusting the size of the components.

[0003] In the related art, when a user dynamically adjusts the size of a component, it may have a significant impact on the layout of other components on the desktop. Summary of the invention

[0004] The embodiment of the present application provides an interface component adjustment method, a terminal and a computer program product. The technical solution is as follows:

[0005] In one aspect, an embodiment of the present application provides a method for adjusting an interface component, the method comprising:

[0006] Receiving a size adjustment operation of a first interface component in a first interface, wherein the first interface includes a plurality of areas;

[0007] In the case where the first interface can accommodate the first interface component after the size adjustment by moving the second interface component, moving the second interface component in the first interface, and displaying the first interface component after the size adjustment in the area vacated after the second interface component is moved;

[0008] When the first interface cannot accommodate the resized first interface component by moving the second interface component, the third interface component in the first interface is moved to the second interface, and the resized first interface component is displayed in the area vacated after the third interface component is removed.

[0009] On the other hand, an embodiment of the present application provides an interface component adjustment device, the device comprising:

[0010] An operation receiving module, used to receive a size adjustment operation of a first interface component in a first interface, wherein the first interface includes a plurality of areas;

[0011] A first adjustment module is used to move the second interface component in the first interface, and display the first interface component after the size adjustment in the area vacated after the second interface component is moved, if the first interface can accommodate the first interface component after the size adjustment by moving the second interface component;

[0012] The second adjustment module is used to move the third interface component in the first interface to the second interface when the first interface cannot accommodate the first interface component after the size is adjusted by moving the second interface component, and display the first interface component after the size is adjusted in the area vacated after the third interface component is removed.

[0013] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the interface component adjustment method as described in the above aspects.

[0014] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the interface component adjustment method as described in the above aspects.

[0015] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the interface component adjustment method described in the above aspects.

[0016] In the embodiment of the present application, when adjusting the size of an interface component in an interface, by moving other interface components in the interface, an attempt is made to display the interface component after the size adjustment in the area vacated after the interface component is moved, thereby reducing the impact of the size adjustment of the local interface component on the overall interface component layout. In addition, if it is not possible to move other interface components to accommodate the interface component after the size adjustment, some interface components in the interface are moved to other interfaces, so that the interface component after the size adjustment is displayed in the area vacated after the interface component is removed, thereby improving the success rate of the interface component size adjustment operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of an interface component adjustment method provided by an exemplary embodiment of the present application is shown;

[0018] Figure 2 is a schematic diagram of an interface component shown in an exemplary embodiment of the present application;

[0019] Figure 3 is a schematic diagram of a process of translating an interface component according to an exemplary embodiment of the present application;

[0020] Figure 4 is a schematic diagram of a process of moving an interface component across pages, shown in an exemplary embodiment of the present application;

[0021] Figure 5 is a flow chart of a process for implementing the minimum disturbance principle shown in an exemplary embodiment of the present application;

[0022] Figure 6 is a schematic diagram of a process of translating interface components in row and column directions, shown in an exemplary embodiment of the present application;

[0023] Figure 7 is a schematic diagram of another exemplary embodiment of the present application showing a process of translating an interface component in a row direction and a column direction;

[0024] Figure 8 is a schematic diagram of a process of translating interface components in row and column directions, shown in yet another exemplary embodiment of the present application;

[0025] Fig. 9 is a flow chart of a process of comparing the increment of occupied grids and the number of unoccupied grids shown in an exemplary embodiment of the present application;

[0026] Fig.10 is a schematic diagram of a mobile interface component within an interface shown in an exemplary embodiment of the present application;

[0027] Fig.11 is a schematic diagram of a process of enlarging an interface component in a sparse area shown in an exemplary embodiment of the present application;

[0028] Fig.12 is a schematic diagram of a translation operation retraction process shown in an exemplary embodiment of the present application;

[0029] Fig.13 is a schematic diagram of a cross-interface mobile operation retraction process shown in an exemplary embodiment of the present application;

[0030] Fig.14 A structural block diagram of an interface component adjustment device provided by another exemplary embodiment of the present application is shown;

[0031] Fig.15 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0033] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0034] In order to ensure the freedom of arrangement of interface components in the interface, the terminal provides the size editing function of interface components. The interface is divided into multiple grids (X*Y grids), and the grid is the smallest area unit in the interface. Users can adjust the number of grids occupied by interface components through size adjustment operations. For example, in the editing mode, you can drag the deformation control of the interface component to adjust the interface component to 1*1, 1*2, 2*1, 2*2, etc.

[0035] When an interface component is enlarged through a size adjustment operation, since the enlarged interface component may intersect with other surrounding interface components, the layout of other interface components needs to be adjusted to accommodate the enlarged interface component.

[0036] In the embodiment of the present application, in order to reduce the impact of the resizing of local interface components on the overall interface component layout while ensuring the success rate of the resizing operation, the terminal first attempts to display the resized interface components in the area vacated after the interface components are moved by moving other interface components in the current interface. If it is not possible to accommodate the resized interface components by moving other interface components in the current interface, the terminal moves some interface components in the current interface to other interfaces, thereby using the area vacated after the interface components are removed to display the resized interface components, thereby ensuring the success rate of the resizing operation.

[0037] Please refer to Figure 1 , which shows a flow chart of an interface component adjustment method provided by an exemplary embodiment of the present application. This embodiment is described by taking the method used in a terminal (which may be a smart phone, a tablet computer, a wearable device, a personal computer, etc.) with interface component display and adjustment functions as an example. The method may include the following steps.

[0038] Step 101: receiving a size adjustment operation on a first interface component in a first interface, where the first interface includes multiple areas.

[0039] The interface involved in the embodiments of the present application refers to an interface with interface component display and editing functions, and the interface includes multiple areas. In some embodiments, the interface includes a plurality of areas arranged in an array, each area is called a grid, and the grid is the smallest unit for accommodating interface components, and each interface component occupies an integer number of grids. For the convenience of description, the following embodiments are described by taking the area as a grid as an example.

[0040] In some embodiments, when the interface is a desktop, the interface components that support resizing in the interface include at least one of an application icon, a folder, and a desktop component. The folder may be a collection of several application icons, and the desktop component may be a widget of an application, such as a weather component, an intelligent assistant component, etc., which is not limited in this embodiment.

[0041] Indicatively, Figure 2 As shown, the application icons 22, folders 23 and desktop components 24 displayed on the desktop 21 are all interface components that support size adjustment.

[0042] In other embodiments, when the interface is a status bar drop-down interface (an interface called out by pulling down the status bar), the interface components that support size adjustment in the interface include at least one of a quick function icon and a functional component. The quick function icon is used to trigger the activation of a quick function, such as turning on / off a wireless network, turning on / off a flashlight, turning on / off an airplane mode, etc.; the functional component is used to trigger the use of a specific function, such as a brightness adjustment function, a music playback control function, a volume adjustment function, etc.

[0043] Of course, the interface and interface components may be provided by applications in addition to being provided by the system, that is, the interface is an application interface, and the interface components may correspond to application functions, which is not limited in this embodiment.

[0044] In a possible implementation, when an interface editing trigger operation is received for the first interface, the first interface enters an editing state. In the editing state, the interface component can be resized. The interface editing trigger operation may be a specific gesture operation, such as a long press operation, a multi-finger pinch operation, etc., which is not limited in this embodiment.

[0045] In some embodiments, in the editing state, the interface component with size adjustment in the first interface displays a size adjustment control, and the size adjustment control is used to receive the size adjustment operation of the interface component. The size adjustment control can be a draggable control displayed in the corner area of ​​the interface component.

[0046] Indicatively, Figure 3 As shown, when a long press operation is received on a blank area in the interface 31, the interface 31 enters an editing state, in which a draggable control 33 is displayed in the corner area of ​​the first interface component 32 in the interface 31. The user can drag the draggable control 33 to adjust the size of the first interface component 32.

[0047] The resizing operation can be used to increase the size of an interface component, such as enlarging an original 1*1 interface component to 1*2 or 2*2; the resizing operation can also be used to reduce the size of an interface component, such as reducing an original 2*2 interface component to 2*1 or 1*1.

[0048] Step 102, when the first interface can accommodate the resized first interface component by moving the second interface component, move the second interface component in the first interface, and display the resized first interface component in the area vacated after moving the second interface component.

[0049] In a possible implementation, when the size of the first interface component after resizing is larger than the size of the first interface component before resizing, the terminal attempts to move the second interface component within the first interface to utilize the area in the first interface vacated by moving the second interface component to accommodate the resized first interface component.

[0050] The second interface component is an interface component located around the first interface component, and the number of the second interface component can be one or more. In the following embodiments, the specific method for determining the second interface component will be described in detail.

[0051] In the embodiment of the present application, moving the second interface component refers to moving the second interface component in the interface along the grid division direction of the interface. For example, when the interface is divided into X*Y grids according to rows and columns, the terminal attempts to move the second interface component along at least one of the row direction or the column direction.

[0052] Among them, when there are multiple second interface components, the relative positions of the multiple second interface components remain unchanged before and after startup; and before and after moving, the layout of interface components other than the first interface component and the second interface component in the first interface does not change.

[0053] It should be noted that the process of attempting to move the second interface component is a terminal background calculation process, that is, the process of attempting to move is not displayed in the interface.

[0054] When the first interface supports moving the second interface component to accommodate the resized first interface component (i.e., the attempt is successful), the terminal moves the second interface component in the first interface and moves the resized first interface component to the area vacated after translating the second interface component.

[0055] Indicatively, Figure 3As shown, when the user drags the draggable control 33 downward to adjust the first interface component 32 from 1*1 to 1*2, the terminal moves the second interface component 34 located below the first interface component 32 downward by one grid, and displays the 1*2 first interface component 32 in the empty grid after the movement. Obviously, in this way, only the layout position of the second interface component in the interface changes, and the layout of other interface components in the interface remains unchanged, minimizing the impact of adjusting the size of the interface component on the overall layout of the interface.

[0056] Step 103, when the first interface cannot accommodate the resized first interface component by moving the second interface component, move the third interface component in the first interface to the second interface, and display the resized first interface component in the area vacated after removing the third interface component.

[0057] When the size of the first interface component after resizing is too large, or the layout of the existing interface components in the first interface is relatively tight, it may be impossible to move the second interface component to accommodate the resized first interface component. Therefore, in order to ensure the success rate of the resizing operation, when the first interface cannot accommodate the resized first interface component by moving the second interface component (i.e., the attempt fails), the terminal moves the third interface component in the first interface to the second interface, so that the resized first interface component is displayed in the area vacated after the third interface component is removed.

[0058] The third interface component is a component adjacent to the first interface component, and the number of the third interface components can be one or more. In the following embodiment, the specific method for determining the third interface component will be described in detail.

[0059] Among them, when there are multiple third interface components, the relative positions of the multiple third interface components remain unchanged after moving to the second interface; and before and after moving the third interface components, the layout of interface components other than the first interface component and the third interface component in the first interface does not change.

[0060] Indicatively, Figure 4 As shown, when the user drags the draggable control 43 of the first interface component 42 to the lower right and adjusts the first interface component 42 from 1*1 to 2*2, the terminal moves the third interface component 44 (located below, to the right and to the lower right of the first interface component 42) from the first interface 41 to the second interface 45, and displays the 2*2 first interface component 42 in the grid vacated after removing the third interface component 44. Obviously, in this way, only the layout position of the third interface component in the interface changes, and the layout of other interface components in the interface remains unchanged, minimizing the impact of adjusting the size of the interface component on the overall layout of the interface.

[0061] It should be noted that when the resized first interface component is displayed in the first interface, the terminal needs to adjust the relevant display parameters of the first interface component. For example, when the first interface component is a folder, the display mode (such as size) of the application icons in the folder needs to be adjusted. When the first interface component is a desktop component, the component content of the desktop component needs to be adjusted (such as displaying more information). This embodiment is not described in detail here.

[0062] In summary, in the embodiment of the present application, when adjusting the size of an interface component in an interface, by moving other interface components in the interface, an attempt is made to display the interface component after the size adjustment in the area vacated after the interface component is moved, thereby reducing the impact of the size adjustment of the local interface component on the overall interface component layout. Furthermore, in the case where it is not possible to move other interface components to accommodate the interface component after the size adjustment, some interface components in the interface are moved to other interfaces, thereby using the area vacated after the interface component is removed to display the interface component after the size adjustment, thereby improving the success rate of the interface component size adjustment operation.

[0063] In order to reduce the impact of local interface component resizing on the overall interface component layout, the terminal adopts the minimum disturbance principle to determine the second interface component that needs to be translated (the translation has the least impact on the interface layout) and the third interface component that needs to be removed, that is, the interface component with the least translation to accommodate the first interface component after resizing, or the interface component with the least removal to accommodate the first interface component after resizing.

[0064] In a possible implementation, Figure 5 As shown, the implementation of the minimum disturbance principle may include the following steps:

[0065] Step 501: Based on the size adjustment operation, determine a third interface component in the first interface, where the third interface component overlaps with the first interface component after the size adjustment.

[0066] In a possible implementation, the terminal determines the component position and component size of the first interface component after the size adjustment based on the size adjustment operation, and thereby determines a third interface component that has an area overlap with the first interface component based on the component information of the first interface component after the size adjustment and the component information of other interface components in the first interface. The area overlap refers to the intersection of the areas occupied by the interface components.

[0067] Optionally, the process of determining the third interface component may include the following sub-steps:

[0068] Step 501A: determining an adjustment direction and an adjustment amount based on the size adjustment operation, wherein the adjustment direction includes at least one of a row direction and a column direction.

[0069] Optionally, when the interface is divided into multiple areas according to row and column directions, the terminal determines the adjustment amount of the first interface component in the row and column directions under the size adjustment operation. The adjustment direction may include the first row direction, the second row direction, and the first column direction as a positive direction, the second column direction as a negative direction, the first row direction as a positive direction, and the second row direction as a negative direction; and the adjustment amount is an integer multiple of the area.

[0070] In a possible implementation, when the size adjustment operation is a drag operation, the terminal calculates the drag distance components in the row direction and the column direction based on the drag direction and the drag distance. When the drag distance component is greater than a threshold, it is determined that the adjustment amount is non-zero. For example, the threshold is 1 / 2 of the grid size.

[0071] Indicatively, Figure 6 As shown, the user drags downward the draggable control 63 corresponding to the first interface component 62 in the first interface 61, and the terminal determines that the adjustment direction is the first column direction, and the adjustment amount is 1 grid.

[0072] Step 501B: Determine the component position and component size of the first interface component after the size adjustment based on the adjustment direction and the adjustment amount.

[0073] Furthermore, the terminal determines the component size and component position of the first interface component after the size adjustment based on the original component size, adjustment direction and adjustment amount of the first interface component. The component position can be represented by the coordinates of the upper left corner area occupied by the interface component relative to the upper left corner area of ​​the interface, and the component size can be represented by the number of areas occupied by the interface component in the row direction*the number of areas occupied in the column direction.

[0074] In some embodiments, when the adjustment direction is a positive direction, the component size of the first interface component after size adjustment is the original component size + the adjustment amount; when the adjustment direction is a negative direction, the component size of the first interface component after size adjustment is the original component size - the adjustment amount.

[0075] Indicatively, Figure 6 As shown, the terminal determines that the component size of the first interface component after size adjustment is 1*2 based on the original component size 1*1, adjustment direction (first column direction) and adjustment amount (1 grid) of the first interface component 62.

[0076] Step 501C, based on the component position and component size of the resized first interface component and the component positions and component sizes of other interface components in the first interface, determine a third interface component in the first interface that overlaps with the resized first interface component.

[0077] In a possible implementation, the terminal obtains component positions and component sizes of other interface components outside the first interface component in the first interface, and thereby determines a third interface component that has an overlapping area with the first interface component after the size adjustment based on the component position and component size of the first interface component after the size adjustment and the component positions and component sizes of other interface components.

[0078] Optionally, the terminal determines the area occupied by the interface component based on the component position and component size of the interface component, and thereby determines a third interface component that overlaps with the first interface component after size adjustment based on the area occupied by the first interface component after size adjustment and the areas occupied by other interface components.

[0079] Indicatively, Figure 6 As shown, the terminal determines that a third interface component 64 in the first interface 61 has a grid overlap with the first interface component 62 after the size adjustment.

[0080] Step 502: Determine a second interface component based on the third interface component, wherein the second interface component includes the third interface component, and the second interface component includes at least one of an interface component in the same column as the third interface component and an interface component in the same row as the third interface component.

[0081] When the third interface component is translated, other interface components adjacent to the third interface component will also be affected. Therefore, when determining the second interface component to be translated, the interface component in the same row and / or column as the third interface component needs to be determined as the second interface component.

[0082] In a possible implementation, the terminal determines the third interface component and the interface components in the same row and connected with the third interface component as the third interface component; and / or the terminal determines the third interface component and the interface components in the same column and connected with the third interface component as the third interface component. The interface component connection means that the areas occupied by the interface components are connected.

[0083] It should be noted that, when, except for the first interface component, there are no other interface components in the same row and column as the third interface component, the second interface component is the third interface component.

[0084] In some embodiments, when the third interface component only includes interface components in the same row as the first interface component (the adjustment amount of the first interface component in the row direction is not 0, and the adjustment amount in the column direction is 0), the terminal determines the third interface component, and the interface components in the same row and connected with the third interface component as the third interface component; or, the terminal determines the third interface component, and the interface components in the same column and connected with the third interface component as the third interface component.

[0085] In the case where the third interface component only includes interface components in the same column as the first interface component (the adjustment amount of the first interface component in the row direction is 0, and the adjustment amount in the column direction is not 0), the terminal determines the third interface component, and the interface components in the same column and connected to the third interface component as the third interface component; or, the terminal determines the third interface component, and the interface components in the same column and connected to the third interface component as the third interface component.

[0086] In the case that the third interface component includes interface components in the same row and column as the first interface component (the adjustment amount of the first interface component in the row direction is not 0, and the adjustment amount in the column direction is not 0), the terminal determines the third interface component, the interface component in the same row and connected with the third interface component as the third interface component, and determines the interface component in the same column and connected with the third interface component as the third interface component.

[0087] Indicatively, Figure 6 As shown, the terminal determines the third interface component 64 and the interface components in the same column as the second interface component 65 , or determines the third interface component 64 and the interface components in the same row as the second interface component 65 .

[0088] Step 503: translate the second interface component along at least one of a row direction and a column direction.

[0089] After determining the second interface component, the terminal attempts to translate the second interface component along at least one of the row direction and the column direction, thereby determining whether the second interface component can be translated to accommodate the resized first interface component based on whether the second interface component is still located in the first interface after the translation.

[0090] In some embodiments, for different types of second interface components, the translation methods adopted by the terminal may include the following:

[0091] Mode 1: when the second interface component includes the third interface component and an interface component in the same column as the third interface component, the second interface component is translated along the column direction.

[0092] When the second interface component includes the third interface component and an interface component in the same column as the third interface component, the terminal translates the second interface component along the column direction because only by moving the second interface component along the column direction can an area be vacated for the size-adjusted first interface component.

[0093] Optionally, the terminal may translate the second interface component along the column direction using the grid as the translation step length, wherein the terminal may attempt to move the second interface component along the positive direction and the negative direction of the column direction.

[0094] Indicatively, Figure 6As shown, the terminal attempts to translate the second interface component 65 (including the third interface component 64 and the interface components in the same column) downward along the column direction.

[0095] Mode 2: when the second interface component includes the third interface component and an interface component in the same row as the third interface component, the second interface component is translated along the row direction.

[0096] When the second interface component includes the third interface component and an interface component in the same row as the third interface component, the terminal translates the second interface component in the row direction because only by moving the second interface component in the row direction can an area be vacated for the size-adjusted first interface component.

[0097] Optionally, the terminal may use the grid as a translation step length to translate the second interface component along the row direction. The terminal may attempt to move the second interface component in a positive direction and a negative direction of the row direction.

[0098] Indicatively, Figure 6 As shown, the terminal attempts to translate the second interface component 65 (including the third interface component 64 and the interface components in the same row) downward along the row direction.

[0099] Mode 3: when the second interface component includes the third interface component, the interface component in the same column as the third interface component, and the interface component in the same row as the third interface component, the second interface component is translated along the row direction and the column direction.

[0100] In the case where the second interface component includes the third interface component, an interface component in the same column as the third interface component, and an interface component in the same row as the third interface component, the terminal translates the second interface component along the row direction and the column direction because only by moving the second interface component along the row direction and the column direction at the same time can an area be vacated for the size-adjusted first interface component.

[0101] Optionally, the terminal may use the grid as the translation step length to translate the second interface component along the row direction and the column direction. The terminal may attempt to move the second interface component in the positive direction and the negative direction of the row and column directions.

[0102] Step 504: when the translated second interface component is located within the first interface, determine whether the first interface can accommodate the size-adjusted first interface component by moving the second interface component.

[0103] When the translated second interface component is still located in the first interface, it indicates that the second interface component can be translated to accommodate the size-adjusted first interface component.

[0104] In some embodiments, when the third interface component only includes interface components in the same column as the first interface component, and the second interface component after translation in the column direction is located within the first interface, or the second interface component after translation in the row direction is located within the first interface, the terminal determines that the first interface can accommodate the resized first interface component by translating the second interface component.

[0105] In the case where the third interface component only includes interface components in the same row as the first interface component, and the second interface component after translation in the column direction is located within the first interface, or the second interface component after translation in the row direction is located within the first interface, the terminal determines that the first interface can accommodate the resized first interface component by translating the second interface component.

[0106] In the case where the third interface component includes interface components in the same row and column as the first interface component, and when the second interface component after translation in the column direction is located in the first interface, and the second interface component after translation in the row direction is located in the first interface, the terminal determines that the first interface can accommodate the resized first interface component by translating the second interface component.

[0107] Indicatively, Figure 6 As shown, after the terminal attempts to translate the second interface component 65 downward along the column direction (including the third interface component 64 and the interface components in the same column), the translated second interface component 65 is still located in the first interface 61; the terminal attempts to translate the second interface component 65 downward along the row direction (including the third interface component 64 and the interface components in the same row), and the translated second interface component 65 is located outside the first interface 61. Therefore, the terminal determines that the first interface 61 can accommodate the resized first interface component 62 by translating the second interface component 65 (including the third interface component 64 and the interface components in the same column).

[0108] In another illustrative example, Figure 7 As shown, when the user adjusts the first interface component 72 in the first interface 71 from 1*1 to 1*2 through the size adjustment operation, the terminal attempts to translate the second interface component 74 downward along the column direction (including the third interface component 73 and the interface components in the same column), and the translated second interface component 74 is located outside the first interface 71; the terminal attempts to translate the second interface component 74 downward along the row direction (including the third interface component 73 and the interface components in the same row), and the translated second interface component 74 is still located in the first interface 71. Therefore, the terminal determines that the first interface 71 cannot accommodate the resized first interface component 72 by translating the second interface component 74 (including the third interface component 73 and the interface components in the same row).

[0109] Step 505: when the translated second interface component is outside the first interface, determine that the first interface cannot accommodate the resized first interface component by moving the second interface component.

[0110] When the translated second interface component is located outside the first interface, it indicates that the first interface component after the size adjustment cannot be accommodated by translating the second interface component, and part of the interface components in the interface needs to be removed.

[0111] In some embodiments, when the third interface component only includes interface components in the same column as the first interface component, when the second interface component after translation in the column direction is located outside the first interface, and the second interface component after translation in the row direction is located outside the first interface, the terminal determines that the first interface cannot accommodate the resized first interface component by translating the second interface component.

[0112] In the case where the third interface component only includes interface components in the same row as the first interface component, and when the second interface component after translation in the column direction is outside the first interface, and when the second interface component after translation in the row direction is outside the first interface, the terminal determines that the first interface cannot accommodate the resized first interface component by translating the second interface component.

[0113] When the third interface component includes interface components in the same row and column as the first interface component, and the second interface component after translation in the column direction is outside the first interface, and / or the second interface component after translation in the row direction is outside the first interface, the terminal determines that the first interface cannot accommodate the resized first interface component by translating the second interface component.

[0114] Indicatively, Figure 8 As shown, when the user adjusts the size of the first interface component 82 in the first interface 81 from 1*1 to 2*2 through the size adjustment operation, the terminal attempts to translate the second interface component 83 downward along the column direction, and the translated second interface component 83 is still located in the first interface 81; the terminal attempts to translate the second interface component 83 downward along the row direction, and the translated second interface component 83 is located outside the first interface 81. Therefore, the terminal determines that the first interface 81 cannot accommodate the first interface component 82 after the size adjustment by translating the second interface component 83.

[0115] When the first interface cannot accommodate the resized first interface component by translating the second interface component, in order to minimize the impact of the resize on the overall interface layout, the terminal moves the third interface component intersecting with the resized first interface component to the second interface.

[0116] In this embodiment, the terminal determines the second interface component that needs to be translated and the third interface component that needs to be removed based on the principle of minimum disturbance, thereby accommodating the first interface component after resizing by translating the least interface component, or accommodating the first interface component after resizing by removing the least interface component, thereby reducing the impact of the resizing of local interface components on the overall interface component layout while ensuring the success rate of component resizing.

[0117] In a possible implementation, in order to reduce the amount of calculation when attempting to translate, before determining the second interface component and attempting to translate the second interface component, the terminal may make a preliminary judgment based on the free space in the first interface whether the first interface can accommodate the resized first interface component when only part of the interface components are translated. Fig. 9 As shown, the method may include the following steps.

[0118] Step 901: Determine an occupied area increment of the first interface component after the size adjustment based on the component size of the first interface component before and after the size adjustment.

[0119] In a possible implementation, the terminal determines the number of occupied areas of the first interface component before size adjustment based on the component size of the first interface component before size adjustment, and determines the number of occupied areas of the first interface component after size adjustment based on the component size of the first interface component after size adjustment, thereby determining the difference between the two as the occupied area increment.

[0120] In some embodiments, when the interface includes multiple grids, the terminal determines the grid increment occupied by the first interface component after the size is adjusted.

[0121] Illustratively, when the component size of the first interface component before size adjustment is 1*1, and the component size of the first interface component after size adjustment is 1*2, the terminal determines that the occupied grid increment is 1; when the component size of the first interface component before size adjustment is 2*1, and the component size of the first interface component after size adjustment is 2*2, the terminal determines that the occupied grid increment is 2.

[0122] Step 902: Determine the number of unoccupied areas of the first interface based on the area occupancy status of the first interface.

[0123] The area occupancy status is used to indicate whether each area in the first interface is occupied.

[0124] In a possible implementation, the terminal uses a two-dimensional array to save the area occupancy status of the interface. For example, when the interface is divided into X*Y areas, the terminal uses an X*Y two-dimensional array to save the area occupancy status. Among them, the element value 0 in the two-dimensional array indicates that the area corresponding to the element value is not occupied, and the element value 1 indicates that the area corresponding to the element value is occupied.

[0125] In some embodiments, when the interface includes multiple grids, the area occupancy state is the grid occupancy state, which is used to indicate whether each grid in the interface is occupied.

[0126] The terminal determines the number of unoccupied areas of the first interface based on the area occupancy status of the first interface, and compares the occupied area increment of the first interface component after the size adjustment with the number of unoccupied areas. If the number of unoccupied areas is greater than or equal to the occupied area increment, step 903 is executed; if the number of unoccupied areas is less than the occupied area increment, step 904 is executed.

[0127] Step 903: When the number of unoccupied areas is greater than or equal to the increment of occupied areas, determine the second interface component based on the third interface component.

[0128] When the amount of unoccupied area is greater than or equal to the occupied area increment, the surface may move some interface components to accommodate the resized first interface component. Therefore, the terminal determines the second interface component based on the third interface component and attempts to move the second interface component.

[0129] Indicatively, Figure 6 As shown, the number of unoccupied grids of the first interface 61 is 3, and the occupied grid increment of the first interface component 62 after size adjustment is 1 (1*1 becomes 1*2), that is, the number of unoccupied grids is greater than the occupied grid increment, and the terminal determines the second interface component 65 based on the third interface component 64.

[0130] Step 904: When the amount of unoccupied areas is less than the increment of occupied areas, the third interface component is moved to the second interface, and the first interface component after the size adjustment is displayed in the area vacated after the third interface component is removed.

[0131] In the case where the number of unoccupied areas is less than the increment of occupied areas, the surface cannot accommodate the resized first interface component no matter how some interface components are moved, so the terminal does not need to further determine the second interface component to be moved, but directly moves the third interface component to the second interface. The process of moving the third interface component to the second interface and displaying the resized first interface component in the area vacated after the third interface component is removed can refer to the above step 103, and this embodiment will not be described in detail here.

[0132] Indicatively, Figure 4 As shown, the number of unoccupied grids of the first interface 41 is 2, and the occupied grid increment of the first interface component 42 after size adjustment is 3 (1*1 becomes 2*2), that is, the number of unoccupied grids is less than the occupied grid increment. The terminal does not need to further determine the second interface component, but directly moves the third interface component 44 that intersects with the first interface component 42 after size adjustment to the second interface 45.

[0133] In this embodiment, the terminal preliminarily determines whether it is possible to move some interface components in the first interface to accommodate the first interface components before the size adjustment by comparing the amount of unoccupied areas of the first interface and the increment of occupied areas of the first interface components before and after the size adjustment. In the case where it is preliminarily determined that it is not possible to move some interface components in the first interface to accommodate the first interface components before the size adjustment, the terminal does not need to further determine the second interface component to be moved and attempt to move it, but directly moves the third interface component to the second interface, thereby avoiding invalid calculations caused by attempting to move and helping to improve the response speed of the size adjustment operation.

[0134] In some scenarios, when the first interface cannot accommodate the resized first interface component by translating the second interface component, the terminal does not directly move the third interface component across interfaces, but first tries to find whether there is an unoccupied area in the first interface that can accommodate the third interface component. If there is, the third interface component can be moved to the unoccupied area to avoid moving the third interface component across interfaces; if not, the third interface component is moved across interfaces.

[0135] In a possible implementation manner, when the first interface cannot accommodate the resized first interface component by moving the second interface component, the terminal obtains the component size of the third interface component and the area occupation status of the first interface.

[0136] The area occupancy status of the first interface is used to indicate whether each area in the first interface is occupied. Optionally, the terminal uses a two-dimensional array to save the area occupancy status of the interface.

[0137] In some embodiments, the component size of the third interface component can be represented by the number of grids of the third interface component in the row direction and the column direction. For example, the component size of the third interface component is 1*2, which means that the third interface component occupies 1 grid in the row direction and 2 grids in the column direction, for a total of 2 grids.

[0138] Further, the terminal determines whether there is a target area in the first interface based on the component size of the third interface component and the area occupancy state of the first interface, wherein the size of the target area is greater than or equal to the component size of the third interface component, and the area within the target area is not occupied.

[0139] In some embodiments, when the target area is a target grid area, all grids in the target grid area are unoccupied, and the grids in the target grid area are connected. The grid connection means that there is at least one other grid adjacent to the current grid in the row direction or the column direction.

[0140] Among them, the size of the target area is greater than or equal to the component size of the third interface component, including the following situations: 1. The number of areas occupied by the target area in the row direction is greater than or equal to the number of areas occupied by the third interface component in the row direction, and the number of areas occupied by the target area in the column direction is greater than or equal to the number of areas occupied by the third interface component in the column direction; 2. The number of areas occupied by the target area in the row direction is greater than or equal to the number of areas occupied by the third interface component in the column direction, and the number of areas occupied by the target area in the column direction is greater than or equal to the number of areas occupied by the third interface component in the row direction.

[0141] In an illustrative example, the component size of the third interface component is 1*2, and the size of the target area can be 1*2, 1*3, 2*1, 2*2, 2*3, and so on.

[0142] Since the size of the target area is greater than or equal to the component size of the third interface component, the target area can accommodate the third interface component.

[0143] Correspondingly, when it is determined that there is a target area in the first interface based on the area occupancy status, the terminal moves the third interface component to the target area, and displays the resized first interface component in the area vacated after moving the third interface component.

[0144] Indicatively, Fig.10 As shown, when the user adjusts the first interface component 1002 in the first interface 1001 from 1*1 to 1*2, the second interface component including the third interface component 1003 cannot accommodate the resized first interface component 1002 regardless of the column or row translation (after the column and row translation, the second interface component will exceed the first interface). Based on the grid occupation status of the first interface 1001, the terminal determines that there is a target grid area 1004 with a size equal to the component size of the third interface component 1003, so the terminal moves the third interface component 1003 to the target grid area 1004, and the resized first interface component 1002 is displayed in the grid vacated after the third interface component 1003 is moved.

[0145] It should be noted that if the number of areas occupied by the target area in the row direction is greater than or equal to the number of areas occupied by the third interface component in the column direction, and the number of areas occupied by the target area in the column direction is greater than or equal to the number of areas occupied by the third interface component in the row direction, the terminal needs to adjust the component direction of the third interface component when moving the third interface component to the target area. For example, when the component size of the third interface component is 1*2 and the size of the target area is 2*1, the terminal needs to adjust the third interface component to 2*1, and then move the adjusted third interface component to the target area.

[0146] Optionally, when the first interface cannot accommodate the resized first interface component by translating the second interface component, and there is no target area in the first interface, the terminal moves the third interface component in the first interface to the second interface, and displays the resized first interface component in the area vacated after removing the third interface component.

[0147] Since the resized first interface component cannot be accommodated by translating the second interface component, and there is no unoccupied area in the first interface that can completely accommodate the third interface component, the terminal moves the third interface component to the second interface.

[0148] In this embodiment, when the first interface cannot accommodate the resized first interface component by translating the second interface component, the terminal further attempts to find an unoccupied area in the first interface that can accommodate the third interface component, and when found, moves the third interface component to the unoccupied area, thereby avoiding moving the third interface component across interfaces, and further reducing the impact of the resize of the local interface component on the overall interface layout.

[0149] In the above embodiments, the intersection of the resized first interface component and other interface components is used as an example for explanation. However, when the components around the first interface component are sparsely distributed, adjusting the size of the first interface component may not affect other surrounding interface components. In a possible implementation, when there is no third interface component in the first interface, the layout of other interface components in the first interface is maintained, and the resized first interface component is displayed.

[0150] In some embodiments, the terminal determines that there is no third interface component intersecting with the resized first interface component based on the component size of the resized first interface component and the component sizes of each interface component in the first interface. The terminal maintains the layout of other interface components in the first interface and displays the resized first interface component.

[0151] Indicatively, Fig.11As shown, the components around the first interface component 1102 in the first interface 1101 are sparsely distributed. When the user adjusts the first interface component 1102 from 1*1 to 1*2, 2*1 and 2*2, the layout of other interface components will not be affected.

[0152] Regarding the second interface that accommodates the third interface component removed from the first interface, in some embodiments, the second interface may be an existing interface or a newly added interface. Accordingly, moving the third interface component to the second interface may include the following two situations:

[0153] Case 1: When there is at least one existing interface that supports accommodating the third interface component, the third interface component is moved to the existing interface that is closest to the first interface.

[0154] In a possible implementation, the terminal determines whether there is an existing interface that can completely accommodate the third interface component based on the area occupancy status of the existing interface and the component size of the third interface component. If so, the terminal moves the third interface component to the existing interface; if not, the terminal needs to create a new interface to completely accommodate the third interface component.

[0155] The process of determining whether the third interface component can be accommodated based on the area occupation status of the existing interface can refer to the above embodiment, and this embodiment will not be described in detail here.

[0156] Optionally, when there are multiple existing interfaces that support accommodating the third interface component, in order to facilitate the user to more quickly find the third interface component moved out of the first interface, the terminal moves the third interface component to the existing interface closest to the first interface (supporting accommodating the third interface component).

[0157] The distance between the interfaces may be a difference in interface identifiers, where the interface identifiers are used to represent a switching sequence between the interfaces.

[0158] Case 2: When there is no existing interface that supports accommodating the third interface component, a new interface is created after the first interface, and the third interface component is moved to the new interface.

[0159] In order to completely accommodate the third interface component, in the absence of an existing interface that supports accommodating the third interface component, the terminal creates a new interface and moves the third interface component to the new interface.

[0160] Among them, when the total number of existing interfaces does not reach the interface number threshold, the terminal creates a new interface; when the total number of interfaces reaches the interface number threshold, the terminal displays a prompt message.

[0161] In order to facilitate users to more quickly view the third interface components removed from the first interface, the terminal creates a new interface after the first interface, and subsequent users can view the removed third interface components by switching interfaces once.

[0162] In this embodiment, the terminal preferentially searches for an existing interface that can accommodate the third interface component, and moves the third interface component to the existing interface closest to the first interface, so that the user can quickly view the removed third interface component; if there is no existing interface that can accommodate the third interface component, the terminal creates a new interface after the first interface, and moves the third interface component to the new interface, so that the user can quickly view the removed third interface component.

[0163] When adjusting the size of an interface component, the user usually makes multiple adjustments repeatedly, such as adjusting the deformation direction or deformation size of the interface component in different ways to observe the effects of different adjustment methods and then determine the final adjustment method. In order to improve the flexibility of the adjustment process, in the embodiment of the present application, the translation operation of the second interface component and the removal operation of the third interface component support retraction.

[0164] In a possible implementation, after the second interface component is translated in the first interface, when a size adjustment operation for the first interface component is received again and the original position of the second interface component in the first interface is unoccupied after the size adjustment, the second interface component is translated to the original position in the first interface.

[0165] Optionally, the resize adjustment operation received again may be an operation that is continuous with the last resize adjustment operation, such as an operation of continuously dragging a draggable control of an interface component to adjust the size of the interface component.

[0166] In a possible implementation, when receiving a size adjustment operation for the first interface component again, the terminal determines the component position and component size of the first interface component after the size adjustment, and determines the current area occupation state of the first interface. By comparing the current area occupation state with the original position information of the second interface component, the terminal determines whether the original position of the second interface component is in an unoccupied state (meaning not occupied by other interface components other than the second interface component).

[0167] If the original position of the second interface component is not occupied, the terminal moves the second interface component to the original position in the first interface. If the original position of the second interface component is still occupied, the terminal maintains the current position of the second interface component.

[0168] Indicatively, Fig.12As shown, the user first adjusts the first interface component 1202 in the first interface 1201 from 1*1 to 1*2 by dragging, and the second interface component 1203 is translated downward by one grid to free up a grid to accommodate the resized first interface component 1202. When the user continues to drag and restore the first interface component 1202 to 1*1, since the original position of the second interface component 1203 is freed again, the terminal translates the second interface component 1203 upward by one grid.

[0169] In a possible implementation, after the third interface component in the first interface is moved to the second interface, when a size adjustment operation on the first interface component is received again and the original positions of some or all of the third interface components in the first interface are unoccupied after the size adjustment, some or all of the third interface components are moved to the first interface.

[0170] In a possible implementation, when receiving a size adjustment operation for the first interface component again, the terminal determines the component position and component size of the first interface component after the size adjustment, and determines the current area occupation state of the first interface. By comparing the current area occupation state with the original position information of the third interface component, the terminal determines whether the original position of the third interface component is in an unoccupied state (meaning not occupied by other interface components other than the third interface component).

[0171] Among them, when the third interface component only includes a single interface component, the terminal determines whether the original position of the third interface component as a whole is in an unoccupied state; when the third interface component includes multiple interface components, the terminal determines whether the original position of each interface component is in an unoccupied state.

[0172] If the original positions of some third interface components are unoccupied, the terminal moves the third interface components to the original positions in the first interface, and the remaining interface components that are still occupied in the original positions remain unchanged. If the original positions of all third interface components are unoccupied, the terminal moves all third interface components to the original positions in the first interface. That is, the third interface components need to be moved out of the first interface as a whole, but some of them can be moved back to the first interface.

[0173] Indicatively, Fig.13As shown, when the user adjusts the first interface component 1302 in the first interface 1301 from 1*1 to 2*2 by dragging, the terminal moves the third interface component 1303 out of the first interface 1301 to accommodate the 2*2 first interface component 1302. When the user continues to adjust the first interface component 1302 from 2*2 to 2*1 by dragging, since the original positions of the first sub-interface component 1304 and the second sub-interface component 1305 in the third interface component 1303 are vacated, the terminal moves the first sub-interface component 1304 and the second sub-interface component 1305 back to their original positions in the first interface 1301.

[0174] In order to achieve the above-mentioned withdrawal of the temporary size adjustment operation, in some embodiments, upon receiving an interface editing trigger operation on the first interface, the terminal saves the original position information of each interface component in the first interface. The interface editing trigger operation is used to trigger the interface to enter an editing state.

[0175] The terminal subsequently determines whether it is necessary to withdraw the in-interface translation and out-interface movement operations of the interface component according to the recorded original position information.

[0176] Optionally, the original position information may include an original component position and an original component size of the interface component.

[0177] In order to save the user's effective size adjustment operation and avoid the effective adjustment from being accidentally withdrawn, in some embodiments, when an editing application operation on the first interface is received, the terminal deletes the original location information. The editing application operation is used to trigger the editing operation within the application interface and exit the editing state.

[0178] Optionally, the editing application operation may be a triggering operation on an editing confirmation control in the interface, or a triggering operation on a specified area in the interface (such as a blank area in the interface).

[0179] In a possible implementation, in the editing state, the terminal caches the component identifiers of the second interface component that has been translated and the third interface component that has been moved, and subsequently, when determining whether it is necessary to restore the original position of the interface component, the stored component identifier is obtained from the cache, and then, based on the component identifier, the original position information of the translated or moved interface component is obtained. After exiting the editing state, the terminal deletes the component identifier stored in the cache.

[0180] In addition to undoing the translation or removal of an interface component when no editing operation is applied, in another possible implementation, the terminal may also provide a size adjustment undo function. In response to the size adjustment undo operation, the terminal restores the first interface component and restores the display position of the second interface component or the third interface component in the first interface.

[0181] Optionally, the terminal displays an edit recall control in the interface, and when receiving a trigger operation on the edit recall control, the terminal performs size adjustment recall.

[0182] Optionally, the terminal records the original interface layout of the first interface, and stores the interface layout after adjusting the size of the interface components in the first interface in a temporary storage. When receiving a resize retraction operation, the terminal resizes the original interface layout based on the recorded original interface layout. When receiving an edit application operation, the terminal updates the original interface layout of the first interface according to the temporarily stored interface layout.

[0183] In this embodiment, the terminal provides a size adjustment retraction function. With this function, the interface component that was originally translated or moved out of the interface due to size adjustment can be translated or moved back to the original position in the interface when the original position is vacated again, eliminating the need for manual operation by the user and improving the adjustment efficiency of the interface components.

[0184] In combination with the above embodiments, the complete logic of interface component adjustment is as follows.

[0185] 1. Long press the interface component IconA to display the deformation frame ItemResizeFrame;

[0186] 2. Drag the deformation frame ItemResizeFrame;

[0187] 3. Create a deformable area createAreaForResize on CellLayout;

[0188] 4. Try to calculate the rearrangement plan tryPerformWhenResizeDragViewRect. If it fails, move the placeholder interface components that intersect with the expanded deformation box to the cache saveDeliverChildrenToCache to be moved back, and try to calculate the rearrangement plan again;

[0189] 5. If successful, execute this rearrangement plan and store it in the temporary grid occupancy status two-dimensional array;

[0190] 5.1. Determine whether the placeholder interface component in the back-shift buffer can be returned to the original position. If it is possible (the original position is vacated), it will be returned;

[0191] 5.2. Shift the positions of surrounding interface components according to the squeezing strategy;

[0192] 6. If successful, update the size (spanX / spanY) and related parameters of IconA;

[0193] 7. Update the ItemInfo corresponding to IconA;

[0194] 8. Drag and release; you can repeat steps 1 to 8 multiple times;

[0195] 9. Click on an area other than the deformation box in the interface, and the deformation box disappears;

[0196] 10. Execute the logic related to the disappearance of the deformation box;

[0197] 11.1. Synchronize the temporary grid occupancy status two-dimensional array to the formal grid occupancy status two-dimensional array;

[0198] 11.2. Actually change the size parameters (spanX / spanY) of IconA and related logic;

[0199] 12. Synchronize IconA's size parameters (spanX / spanY) to the persistent database.

[0200] Please refer to Fig.14 , which shows a structural block diagram of an interface component adjustment device provided by an exemplary embodiment of the present application. The device includes:

[0201] An operation receiving module 1401 is used to receive a size adjustment operation of a first interface component in a first interface, where the first interface includes multiple areas;

[0202] A first adjustment module 1402 is configured to move the second interface component in the first interface, and display the first interface component after the size adjustment in the area vacated after the second interface component is moved, if the first interface can accommodate the first interface component after the size adjustment by moving the second interface component;

[0203] The second adjustment module 1403 is used to move the third interface component in the first interface to the second interface when the first interface cannot accommodate the first interface component after the size is adjusted by moving the second interface component, and display the first interface component after the size is adjusted in the area vacated after the third interface component is removed.

[0204] Optionally, the device further comprises:

[0205] A calculation module, configured to determine, based on the size adjustment operation, the third interface component in the first interface, where the third interface component overlaps with the first interface component after the size adjustment;

[0206] Determining the second interface component based on the third interface component, the second interface component includes the third interface component, and the second interface component includes at least one of an interface component in the same column as the third interface component and an interface component in the same row as the third interface component;

[0207] translating the second interface component along at least one of a row direction and a column direction;

[0208] In a case where the second interface component after translation is located within the first interface, determining that the first interface can accommodate the first interface component after the size adjustment by moving the second interface component;

[0209] In the case that the second interface component after translation is located outside the first interface, it is determined that the first interface cannot accommodate the first interface component after size adjustment by moving the second interface component.

[0210] Optionally, when translating the second interface component along at least one of a row direction and a column direction, the computing module is configured to:

[0211] In a case where the second interface component includes the third interface component and an interface component in the same column as the third interface component, translating the second interface component along the column direction;

[0212] In a case where the second interface component includes the third interface component and an interface component in the same row as the third interface component, translating the second interface component along the row direction;

[0213] When the second interface component includes the third interface component, an interface component in the same column as the third interface component, and an interface component in the same row as the third interface component, the second interface component is translated along the row direction and the column direction.

[0214] Optionally, when determining the third interface component in the first interface based on the size adjustment operation, the calculation module is configured to:

[0215] Based on the size adjustment operation, determining an adjustment direction and an adjustment amount, wherein the adjustment direction includes at least one of the row direction and the column direction;

[0216] Based on the adjustment direction and the adjustment amount, determining a component position and a component size of the first interface component after the size adjustment;

[0217] Based on the component position and component size of the first interface component after size adjustment and the component positions and component sizes of other interface components in the first interface, the third interface component in the first interface that has an overlapping area with the first interface component after size adjustment is determined.

[0218] Optionally, the computing module is also used to:

[0219] Determining an occupied area increment of the first interface component after the size adjustment based on the component size of the first interface component before and after the size adjustment;

[0220] Determining the number of unoccupied areas of the first interface based on the area occupancy status of the first interface;

[0221] The determining the second interface component based on the third interface component includes: determining the second interface component based on the third interface component when the number of unoccupied areas is greater than or equal to the occupied area increment.

[0222] Optionally, the second adjustment module 1403 is used to:

[0223] When the number of unoccupied areas is less than the occupied area increment, the third interface component is moved to the second interface, and the first interface component after the size adjustment is displayed in the area vacated after the third interface component is removed.

[0224] Optionally, the device further includes:

[0225] A third adjustment module, configured to obtain a component size of the third interface component and an area occupancy state of the first interface when the first interface cannot accommodate the first interface component after the size adjustment by moving the second interface component;

[0226] When it is determined that there is a target area in the first interface based on the area occupancy status, the third interface component is moved to the target area, and the size-adjusted first interface component is displayed in the area vacated after moving the third interface component, the size of the target area is greater than or equal to the component size of the third interface component, and the target area is not occupied.

[0227] Optionally, the second adjustment module 1403 is further configured to:

[0228] When the first interface cannot accommodate the resized first interface component by translating the second interface component, and the target area does not exist in the first interface, move the third interface component in the first interface to the second interface, and display the resized first interface component in the area vacated after removing the third interface component.

[0229] Optionally, the device further comprises:

[0230] The fourth adjustment module is used to maintain the layout of other interface components in the first interface and display the first interface component after the size is adjusted when the third interface component does not exist in the first interface.

[0231] Optionally, the second interface is an existing interface or a newly added interface;

[0232] The second adjustment module 1403 is used to:

[0233] In the case that there is at least one existing interface that supports accommodating the third interface component, moving the third interface component to the existing interface closest to the first interface; or,

[0234] In the case that there is no existing interface that supports accommodating the third interface component, a new interface is created after the first interface, and the third interface component is moved to the new interface.

[0235] Optionally, the first adjustment module 1402 is further configured to:

[0236] When the size adjustment operation on the first interface component is received again and the original position of the second interface component in the first interface is unoccupied after the size adjustment, the second interface component is translated to the original position in the first interface;

[0237] Optionally, the second adjustment module 1403 is further configured to:

[0238] When the size adjustment operation on the first interface component is received again and the original positions of part or all of the third interface components in the first interface are unoccupied after the size adjustment, part or all of the third interface components are moved to the first interface.

[0239] Optionally, the device further includes:

[0240] a storage module, configured to save original position information of each interface component in the first interface upon receiving an interface editing trigger operation on the first interface, wherein the interface editing trigger operation is used to trigger the interface to enter an editing state;

[0241] In the case of receiving an editing application operation on the first interface, deleting the original location information, the editing application operation is used to trigger the editing operation in the application interface, and exiting the editing state.

[0242] Optionally, the device further comprises:

[0243] A retraction module, configured to restore the first interface component in response to a retraction operation of size adjustment;

[0244] Restore the display position of the second interface component or the third interface component in the first interface.

[0245] Optionally, when the first interface is a desktop, the first interface component is at least one of an application icon, a folder and a desktop component;

[0246] When the first interface is a status bar drop-down interface, the first interface component is at least one of a shortcut function icon and a function component.

[0247] In summary, in the embodiment of the present application, when adjusting the size of an interface component in an interface, by moving other interface components in the interface, an attempt is made to display the interface component after the size adjustment in the area vacated after the interface component is moved, thereby reducing the impact of the size adjustment of the local interface component on the overall interface component layout. Furthermore, in the case where it is not possible to move other interface components to accommodate the interface component after the size adjustment, some interface components in the interface are moved to other interfaces, thereby using the area vacated after the interface component is removed to display the interface component after the size adjustment, thereby improving the success rate of the interface component size adjustment operation.

[0248] See also Fig.15 , Fig.15 15 is a schematic diagram of a terminal structure provided by an exemplary embodiment of the present application. The terminal may include one or more of the following components: a processor 1510 and a memory 1520.

[0249] Optionally, the processor 1510 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1520, and calling data stored in the memory 1520. Optionally, the processor 1510 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1510 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content that needs to be displayed on the touch display; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communications. It is understandable that the above-mentioned baseband chip may not be integrated into the processor 1510, but may be implemented by a separate chip.

[0250] The memory 1520 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1520 includes a non-transitory computer-readable storage medium. The memory 1520 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0251] In addition, those skilled in the art will understand that the structure of the terminal shown in the above figures does not constitute a limitation on the terminal, and the terminal may include more (such as a screen, communication components, display components) or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0252] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the interface component adjustment method as described in the above embodiment.

[0253] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the interface component adjustment method described in the above embodiment.

[0254] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0255] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for adjusting an interface component, characterized in that: The method comprises: Receiving a size adjustment operation of a first interface component in a first interface, wherein the first interface includes a plurality of areas; In the case where the first interface can accommodate the first interface component after the size adjustment by moving the second interface component, moving the second interface component in the first interface, and displaying the first interface component after the size adjustment in the area vacated after the second interface component is moved; When the first interface cannot accommodate the resized first interface component by moving the second interface component, the third interface component in the first interface is moved to the second interface, and the resized first interface component is displayed in the area vacated after the third interface component is removed.

2. The method according to claim 1, characterized in that The method comprises: Based on the size adjustment operation, determining the third interface component in the first interface, where the third interface component overlaps with the first interface component after the size adjustment; Determining the second interface component based on the third interface component, the second interface component includes the third interface component, and the second interface component includes at least one of an interface component in the same column as the third interface component and an interface component in the same row as the third interface component; translating the second interface component along at least one of a row direction and a column direction; In a case where the second interface component after translation is located within the first interface, determining that the first interface can accommodate the first interface component after the size adjustment by moving the second interface component; In the case that the second interface component after translation is located outside the first interface, it is determined that the first interface cannot accommodate the first interface component after size adjustment by moving the second interface component.

3. The method according to claim 2, characterized in that The step of translating the second interface component along at least one of a row direction and a column direction comprises: In a case where the second interface component includes the third interface component and an interface component in the same column as the third interface component, translating the second interface component along the column direction; In a case where the second interface component includes the third interface component and an interface component in the same row as the third interface component, translating the second interface component along the row direction; When the second interface component includes the third interface component, an interface component in the same column as the third interface component, and an interface component in the same row as the third interface component, the second interface component is translated along the row direction and the column direction.

4. The method according to claim 2, characterized in that: The determining the third interface component in the first interface based on the size adjustment operation includes: Based on the size adjustment operation, determining an adjustment direction and an adjustment amount, wherein the adjustment direction includes at least one of the row direction and the column direction; Based on the adjustment direction and the adjustment amount, determining a component position and a component size of the first interface component after the size adjustment; Based on the component position and component size of the first interface component after size adjustment and the component positions and component sizes of other interface components in the first interface, the third interface component in the first interface that has an overlapping area with the first interface component after size adjustment is determined.

5. The method according to claim 4, characterized in that The method further comprises: Determining an occupied area increment of the first interface component after the size adjustment based on the component size of the first interface component before and after the size adjustment; Determining the number of unoccupied areas of the first interface based on the area occupancy status of the first interface; The determining the second interface component based on the third interface component includes: In a case where the number of unoccupied areas is greater than or equal to the occupied area increment, the second interface component is determined based on the third interface component.

6. The method according to claim 5, characterized in that The method further comprises: When the number of unoccupied areas is less than the occupied area increment, the third interface component is moved to the second interface, and the first interface component after the size adjustment is displayed in the area vacated after the third interface component is removed.

7. The method according to claim 2, characterized in that The method further comprises: In the case that the first interface cannot accommodate the first interface component after the size adjustment by moving the second interface component, acquiring the component size of the third interface component and the area occupation state of the first interface; When it is determined that there is a target area in the first interface based on the area occupancy status, the third interface component is moved to the target area, and the size-adjusted first interface component is displayed in the area vacated after moving the third interface component, the size of the target area is greater than or equal to the component size of the third interface component, and the target area is not occupied.

8. The method according to claim 7, characterized in that The method of moving the third interface component in the first interface to the second interface when the first interface cannot accommodate the first interface component after the size adjustment by moving the second interface component, and displaying the first interface component after the size adjustment in the area vacated after the third interface component is removed, comprises: When the first interface cannot accommodate the resized first interface component by translating the second interface component, and the target area does not exist in the first interface, move the third interface component in the first interface to the second interface, and display the resized first interface component in the area vacated after removing the third interface component.

9. The method according to claim 2, characterized in that: The method further comprises: When the third interface component does not exist in the first interface, the layout of other interface components in the first interface is maintained, and the first interface component after the size adjustment is displayed.

10. The method according to any one of claims 1 to 9, characterized in that: The second interface is an existing interface or a newly added interface; The moving the third interface component in the first interface to the second interface includes: In the case that there is at least one existing interface that supports accommodating the third interface component, moving the third interface component to the existing interface closest to the first interface; or, In the case that there is no existing interface that supports accommodating the third interface component, a new interface is created after the first interface, and the third interface component is moved to the new interface.

11. The method according to any one of claims 1 to 9, characterized in that: After translating the second interface component in the first interface, the method further includes: When the size adjustment operation on the first interface component is received again and the original position of the second interface component in the first interface is unoccupied after the size adjustment, the second interface component is translated to the original position in the first interface; After moving the third interface component in the first interface to the second interface, the method further includes: When the size adjustment operation on the first interface component is received again and the original positions of part or all of the third interface components in the first interface are unoccupied after the size adjustment, part or all of the third interface components are moved to the first interface.

12. The method according to claim 11, characterized in that The method further comprises: When receiving an interface editing trigger operation on the first interface, saving original position information of each interface component in the first interface, wherein the interface editing trigger operation is used to trigger the interface to enter an editing state; In the case of receiving an editing application operation on the first interface, deleting the original location information, the editing application operation is used to trigger the editing operation in the application interface, and exiting the editing state.

13. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: In response to the resize retraction operation, restoring the first interface component; Restore the display position of the second interface component or the third interface component in the first interface.

14. The method according to any one of claims 1 to 9, characterized in that: In the case where the first interface is a desktop, the first interface component is at least one of an application icon, a folder, and a desktop component; When the first interface is a status bar drop-down interface, the first interface component is at least one of a shortcut function icon and a function component.

15. An interface component adjustment device, characterized in that: The device comprises: An operation receiving module, used to receive a size adjustment operation of a first interface component in a first interface, wherein the first interface includes a plurality of areas; A first adjustment module is used to move the second interface component in the first interface, and display the first interface component after the size adjustment in the area vacated after the second interface component is moved, if the first interface can accommodate the first interface component after the size adjustment by moving the second interface component; The second adjustment module is used to move the third interface component in the first interface to the second interface when the first interface cannot accommodate the first interface component after the size is adjusted by moving the second interface component, and display the first interface component after the size is adjusted in the area vacated after the third interface component is removed.

16. A terminal, characterized in that: The terminal includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the interface component adjustment method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the interface component adjustment method according to any one of claims 1 to 14.

18. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the interface component adjustment method as described in any one of claims 1 to 14.

Citation Information

Cited By

  • Interface component adjustment method, terminal and computer program product

    WO2026113628A1