Display method, readable storage medium and electronic equipment
By detecting user actions and predicting display capabilities, the size and position of the element grid are adjusted, solving the problem that elements cannot be fully displayed after the display direction is switched, thus improving the user experience.
Patent Information
- Application Number
- CN202410775494.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-13
AI Technical Summary
Because electronic devices have different screen lengths and widths, after switching display orientations, elements displayed on the desktop interface in the original orientation may not all be displayed on the desktop interface in the new orientation, affecting the user experience.
By detecting user actions, it predicts whether all elements can be displayed in the new display orientation. If so, the action is executed; otherwise, it is not. When the display orientation is switched, the grid size and position of the elements are adjusted according to preset conditions to ensure that all elements can be displayed in the new orientation.
This avoids impacting user experience due to elements not being displayed and improves the display effect of electronic devices after switching display orientations.
Smart Images

Figure CN118642618A
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a display method, a readable storage medium and an electronic device. Background Art
[0002] The desktop of an electronic device is usually provided with display elements such as icons for displaying applications in the electronic device, icons of functional controls (such as large folders, cards, etc.), and the desktop can usually be provided with multiple desktop interfaces, and multiple display elements can be displayed on one desktop interface.
[0003] Electronic devices can usually use different directions (such as the length direction or width direction of the electronic device display screen) as the up and down direction (hereinafter referred to as the display direction) of the display interface to display the interface. However, since the length and width of the display screen of the electronic device are usually different, the layout of the display elements in the desktop interface displayed in one display direction may not be suitable for the desktop interface displayed in another display direction. As a result, after the display direction of the electronic device is switched, the display elements displayed in the desktop interface before switching the display direction may not be fully displayed in a desktop interface after switching the display direction, affecting the user experience. For example, refer to Figure 1 The electronic device displays the desktop interface P1 with direction B as the display direction, and the desktop interface P1 includes the time card U15; after detecting that the electronic device has rotated 90°, the electronic device can switch to displaying the desktop interface P2 with direction A as the display direction. Since there is insufficient display area to layout the time card U15 after laying out other display elements in the desktop interface P1 except the time card U15 in the desktop interface P2, the time card U15 cannot be displayed. Summary of the invention
[0004] Embodiments of the present application provide a display method, a readable storage medium, an electronic device, and a program product.
[0005] In a first aspect, a display method is provided, which is applied to an electronic device, the method comprising: displaying a first desktop interface in a first display direction of the electronic device, wherein a size of a spare display area in a display area for layout display elements in the first desktop interface is a first size; detecting a first operation of a user, wherein the first operation comprises a modification operation on the first display element, the modification operation is used to reduce the size of the spare display area by a second size, the second size being less than or equal to the first size; and not performing the first operation if the modification condition is not satisfied by the first operation.
[0006] In this method, when the size of the free display area in the first desktop interface is larger than the size to be reduced by the first operation, if the first operation does not meet the modification condition, the electronic device may not perform the first operation. The modification condition may indicate that all display elements in the first desktop interface after the first operation is performed can be displayed in a desktop interface displayed in a second display direction (perpendicular to the first display direction). In this way, it can be avoided that after the first operation is performed, when the electronic device displays the desktop in a second display direction (for example, the length direction or the width direction), all display elements (display elements in the first desktop interface after the first operation is performed) in the desktop interface displayed in the first display direction (for example, the length direction or the width direction horizontal screen) cannot be displayed, which is beneficial to improving the user experience.
[0007] In some implementations, the length and width of a display screen of an electronic device are different sizes.
[0008] In some implementations, the display area used to layout display elements may be the icon display area described below.
[0009] In a possible implementation of the first aspect, the grid of the display area for laying out display elements in the first desktop interface includes a grid of m rows and n columns, where m and n are positive integers greater than 1 and m is different from n; and the first operation is an operation of adding a first display element in the grid of m rows and n columns, wherein the second size being less than or equal to the first size includes: the grid size of the first display element is less than or equal to the size of an empty grid in the grid of m rows and n columns; or, the first display element is a display element in the first desktop interface, and the first operation is an operation of increasing the grid size of the first display element, wherein the second size being less than or equal to the first size includes: the size by which the grid size of the first display element is increased is less than or equal to the size of an empty grid in the grid of m rows and n columns.
[0010] In this implementation, the size reduced by the first operation may be a grid size of the first display element or a grid size increased by the first display element.
[0011] In a possible implementation of the first aspect, the modification condition indicates that the target display element can be laid out in a second desktop interface displayed in a second display direction without adjusting the grid size of the target display element, wherein the grid for laying out the display area of the display element in the second desktop interface includes a grid of n rows and m columns, and the second display direction is perpendicular to the first display direction; and
[0012] In the case where the first operation is an operation of increasing the size of the first display element, the target display element includes display elements other than the first display element in the display elements of the first desktop interface, and the first display element after the size is increased.
[0013] In the case where the first operation is an operation of adding a first display element in a grid of m rows and n columns, the target display elements include display elements in the first desktop interface and the first display element.
[0014] In a possible implementation of the first aspect, the modification condition includes: m and n are both integer multiples of 4; or, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; or, b and d are both 2, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c+8×e , where e is the minimum value of a and c; or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, and the difference between the total number of grids in the m-row and n-column grid and the sum of the number of grids occupied by display elements with a grid size greater than 1 row and 1 column in the target display element is greater than or equal to an odd number of m and n; or, one of b and d is an odd number and the other is an even number and both b and d are greater than or equal to 2, the grid in the target display element is The sum of the number of grids occupied by display elements with a size larger than 2 rows and 4 columns is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m-row and n-column grid and the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column in the target display element is greater than or equal to an odd number among m and n; or, b and d are both odd numbers and at least one of b and d is less than 2, and the sum of the number of grids occupied by display elements with a grid size larger than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, and the total number of grids in the m-row and n-column grid minus the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column in the target display element is greater than or equal to an odd number among m and n. The difference between the sum of the numbers of grids occupied by display elements in 1 row and 1 column is greater than or equal to the maximum value of m and n; or, b and d are both 3, the sum of the numbers of grids occupied by display elements in the target display element with a grid size larger than 2 rows and 4 columns is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m-row and n-column grid minus the sum of the number of grids occupied by display elements in the target display element with a grid size larger than 1 row and 1 column is greater than or equal to the maximum value of m and n; or, all the target display elements can be laid out in the n-row and m-column grid through the preset layout method.
[0015] In this implementation, the electronic device can determine whether the first operation meets the modification condition based on the grid division method in the first desktop interface and the grid size of the target display element. Alternatively, the target display element is pre-layouted in a preset layout method, and the first operation is determined to meet the modification condition when all the target display elements can be laid out in an n-row and m-column grid in the preset layout method. In this way, it can be ensured that after the display direction of the electronic device changes, the electronic device can display the target display element in a desktop interface without changing the grid size of the target display element.
[0016] In a possible implementation of the first aspect, the electronic device may also perform the first operation when it determines that the modification condition is not satisfied but detects a second operation in which the user confirms to perform the first operation.
[0017] In a possible implementation of the first aspect, the method further includes: corresponding to the first operation satisfying the modification condition, executing the first operation, and displaying a third desktop interface after executing the first operation, wherein the grid of the display area for laying out display elements in the third desktop interface includes a grid of m rows and n columns, and the target display elements are laid out in the grid of m rows and n columns.
[0018] In a possible implementation of the first aspect, the method further includes: detecting that the display direction of the electronic device switches from the first display direction to the second display direction, laying out the target display elements in a grid of n rows and m columns of the second desktop interface, and displaying the laid out second desktop interface in the second display direction, wherein the grid size of the target display elements in the second desktop interface is the same as the grid size in the third desktop interface.
[0019] In a possible implementation of the first aspect, the above-mentioned layout of the target display elements in the n-row and m-column grid of the second desktop interface includes: corresponding to the case where the grid size of the target display elements is not adjusted and all the target display elements can be laid out in the n-row and m-column grid by using the first method, the target display elements are laid out in the n-row and m-column grid of the second desktop interface by using the first method; corresponding to the case where the grid size of the target display elements cannot be laid out in the n-row and m-column grid by using the first method, the target display elements are laid out in the n-row and m-column grid of the second desktop interface by using the second method.
[0020] In this implementation, the electronic device may preset multiple layout modes, such as the first layout mode, the second layout mode, and the third layout mode described below. When the first mode cannot layout all target display elements into the n-row and m-column grid, the second mode may be used to layout all target display elements into the n-row and m-column grid. In this way, it is possible to avoid the situation where the second desktop interface cannot display all target display elements when the first mode cannot layout all target display elements into the n-row and m-column grid due to the complex grid size of the target display elements.
[0021] Exemplarily, the first mode may be any one of the first layout modes described below, and the second mode may be any one of the third layout modes described below; or the first mode may be any one of the first layout modes described below, and the second mode may be any one of the second layout modes described below; or the first mode may be any one of the second layout modes described below, and the second mode may be any one of the third layout modes described below; or the first mode may be any one of the second layout modes described below, and the second mode may be any one of the first layout modes described below.
[0022] In a possible implementation of the first aspect, the above-mentioned use of the first method to layout the target display element in the n-row and m-column grid of the second desktop interface includes: traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, and determining the layout order of each layout element, wherein the layout element that is traversed earlier has a higher layout order, and the layout elements include the target display element and the free grids in the m-row and n-column grid of the third desktop interface; according to the layout order of each layout element, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, wherein In the layout, any first layout element in the layout elements is laid out in: an idle grid area with the same grid size as the first layout element in the n-row and m-column grid of the second desktop interface, and an idle grid area that is first traversed according to the first traversal method; wherein the first traversal method is to use the grid of the first corner point of the m-row and n-column grid or the n-row and m-column grid of the second desktop interface as the traversal starting point, and traverse in the first row and column order, the first corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the first row and column order is the order of rows first and then columns or the order of columns first and then rows.
[0023] In this implementation, the first method is any one of the first layout methods described below. Since the relative positions of some layout elements in the third desktop interface can be retained when the target display elements are laid out based on the first method, the user can quickly find the display elements to be operated on in the second desktop interface, which is conducive to improving the user experience.
[0024] In a possible implementation of the first aspect above, the second method is used to layout all target display elements in the n-row and m-column grid of the second desktop interface, including: laying out the target display elements in the n-row and m-column grid of the second desktop interface in order from large to small grid sizes of the target display elements, wherein any first target display element among the target display elements is laid out during layout: in the n-row and m-column grid of the second desktop interface, in an idle grid area with the same grid size as the first target display element, in an idle grid area that is first traversed according to the second traversal method; wherein the second traversal method is to use the grid of the second corner point of the n-row and m-column grid of the second desktop interface as the traversal starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is a row-to-column order or a column-to-row order.
[0025] In this implementation, the second mode is any one of the third layout modes described below. Since the third layout mode can ensure that all target display elements can be laid out in an n-row and m-column grid, it can be avoided that all target display elements cannot be displayed in one second desktop interface.
[0026] In a possible implementation of the first aspect, the target display element is laid out in the n-row and m-column grid of the second desktop interface using the first method, including: traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the second traversal method, and determining the layout order of each layout element, wherein the layout element that is traversed earlier has a higher layout order, and the layout elements include the target display element and the free grids in the m-row and n-column grid of the third desktop interface; the second traversal method is: taking the 1st row and 1st column grid in the m-row and n-column grid of the third desktop interface as the traversal starting point, traversing each layout element row by row in the order from the 1st row to the mth row, and when traversing the layout elements occupying the i-th row, traversing the layout elements in the order from the small to the small according to the difference between the number of columns occupied by each layout element and the number of columns occupied by the traversal starting point. to the largest column by column traversal, i is a positive integer less than or equal to m; in the process of traversing the layout element occupying the i-th row: corresponding to the next untraversed second layout element occupying the i-th row also occupying the grid in the i+1-th row, traversing the untraversed layout elements in the i+1-th row, corresponding to the second layout element not occupying the grid in the i+1-th row, traversing the layout element with the smallest number of rows of the sorted grid among the untraversed layout elements whose number of columns is the same as that of the sorted grid of the second layout element and whose number of rows is less than or equal to i; wherein the sorted grid is the grid in the upper left corner of the grid occupied by the corresponding display element; according to the layout order of each layout element, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface.
[0027] In this implementation, the first method is to layout the target display elements in the second layout method described below using the ninth layout element traversal method. Since the relative positions of some layout elements in the third desktop interface can be retained when the target display elements are laid out based on the ninth layout element traversal method, the user can quickly find the display elements to be operated on in the second desktop interface, which is conducive to improving the user experience.
[0028] In a possible implementation of the first aspect, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface according to the layout order of each layout element, including: laying out a third layout element having a grid size of p rows and q columns in the layout elements in the n-row and m-column grid in the following manner, where p and q are positive integers: corresponding to at least part of the multiple layout elements that have been laid out in the r-row and s-column grid area, positions of at least some of the layout elements that have been laid out can be laid out in the p-row and t-column grid area and occupy all grids in the p-row and t-column grid area after adjustment, adjusting the positions of the multiple layout elements so that the multiple layout elements are laid out in the p-row and t-column grid area. , and place the third layout element in the remaining grid area of the p-row grid where the p-row and t-column grid area is located, where r, s, and t are positive integers, and p is greater than r, t is less than s, and the sum of q and t is less than m; corresponding to the multiple layout elements that have been placed in the r-row and s-column grid area that can be placed in the p-row and t-column grid area after adjusting their positions and occupying all the grids of the p-row and t-column grid area, place the third layout element in the n-row and m-column grid, in the free grid area with the same grid size as the third layout element, and in the free grid area that is first traversed in the order of starting from the 1st row and the 1st column and firstly the rows and then the columns.
[0029] In a possible implementation of the first aspect, the display element includes at least one of an icon and a service card.
[0030] In a second aspect, a display method is provided, which is applied to an electronic device, the method comprising: displaying a third desktop interface in a first display direction, wherein the grid of the display area for laying out display elements in the third desktop interface comprises an m-row and n-column grid, and a plurality of display elements are laid out in the m-row and n-column grid; detecting that the display direction of the electronic device is switched from the first display direction to the second display direction; corresponding to the situation where the grid size of the plurality of display elements is not adjusted, the plurality of display elements can be laid out in the n-row and m-column grid using the first method, the plurality of display elements are laid out in the n-row and m-column grid of the second desktop interface using the first method, and the second desktop interface is displayed in the second display direction; wherein the plurality of display elements are laid out in the n-row and m-column grid of the second desktop interface using the first method, comprising: traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, confirming The layout order of each layout element is determined, wherein the layout element that is traversed earlier has a higher layout order, and the layout elements include multiple display elements and free grids in the m-row and n-column grid of the third desktop interface; according to the layout order of each layout element, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, wherein any fourth layout element among the layout elements is laid out in: in the n-row and m-column grid of the second desktop interface, at least one free grid area with the same grid size as the fourth layout element, which is the free grid area that is first traversed according to the first traversal method; wherein the first traversal method is to take the grid of the first corner point of the m-row and n-column grid or the n-row and m-column grid as the starting point, and traverse in the first row and column order, the first corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the first row and column order is the order of rows first and then columns or the order of columns first and then rows.
[0031] In this implementation, the first method is any one of the first layout methods described below. Since the relative positions of some layout elements in the third desktop interface can be retained when the target display elements are laid out based on the first method, the user can quickly find the display elements to be operated on in the second desktop interface, which is conducive to improving the user experience.
[0032] In a possible implementation of the first aspect, the method further includes: corresponding to the situation where the first method cannot arrange all the multiple display elements in the n-row and m-column grid without adjusting the grid size of the multiple display elements, the second method is used to arrange the multiple display elements in the n-row and m-column grid of the second desktop interface, and the second desktop interface is displayed; wherein the second method is used to arrange all the multiple display elements in the n-row and m-column grid of the second desktop interface, including: arranging the multiple display elements in the order of the grid size of the multiple display elements from large to small in the second desktop interface. In the n-row and m-column grid of the desktop interface, any second display element among the multiple display elements is laid out during layout: in the n-row and m-column grid of the second desktop interface, in an idle grid area with the same grid size as the second display element, in an idle grid area that is first traversed according to the second traversal method; wherein the second traversal method is to take the grid of the second corner point of the n-row and m-column grid as the starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is the order of rows first and then columns or the order of columns first and then rows.
[0033] In this implementation, the second mode is any one of the third layout modes described below. Since the third layout mode can ensure that all target display elements can be laid out in an n-row and m-column grid, it can be avoided that all target display elements cannot be displayed in one second desktop interface.
[0034] In a possible implementation of the first aspect, the plurality of display elements and the m-row and n-column grids satisfy the following conditions: m and n are both integer multiples of 4; or, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns among the plurality of display elements is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; or, b and d are both 2 .... The sum of the number of grids occupied by the display elements with a grid size larger than 2 rows and 4 columns is less than or equal to 16a×c, the difference between the total number of grids in the m-row n-column grid and the sum of the number of grids occupied by the display elements with a grid size larger than 1 row and 1 column in the multiple display elements; or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size larger than 2 rows and 4 columns in the multiple display elements is less than or equal to 16a×c, the difference between the total number of grids in the m-row n-column grid and the sum of the number of grids occupied by the display elements with a grid size larger than 1 row and 1 column in the multiple display elements; or, one of b and d is an odd number and the other is an even number and b and d is greater than or equal to 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m-row and n-column grid and the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to an odd number among m and n; or, b and d are both odd numbers and at least one of b and d is less than 2, and the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c , the difference between the total number of grids in the grid of m rows and n columns minus the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column among multiple display elements is greater than or equal to the maximum value of m and n; or, b and d are both 3, the sum of the number of grids occupied by display elements with a grid size larger than 2 rows and 4 columns among multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the grid of m rows and n columns minus the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column among multiple display elements is greater than or equal to the maximum value of m and n.
[0035] In this implementation, while keeping the grid size of multiple display elements in the third desktop interface unchanged, the multiple display elements in the third desktop interface can be arranged in an n-row and m-column grid, which can avoid that the target display elements cannot be fully displayed in one second desktop interface.
[0036] In a possible implementation of the second aspect above, the method further includes: corresponding to the situation where, without adjusting the grid size of the multiple display elements, the multiple display elements cannot be all laid out in the n-row and m-column grid using the first method, traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, and determining the layout order of each layout element; laying out the multiple layout elements with the first layout order in the layout elements in the n-row and m-column grid of the second desktop interface in sequence according to the corresponding layout order, wherein any fifth layout element among the multiple layout elements is laid out during layout to: in the n-row and m-column grid of the second desktop interface, in at least one idle grid area with the same grid size as the fifth layout element, the idle grid area that is first traversed according to the first traversal method.
[0037] In a possible implementation of the second aspect, the display element includes at least one of an icon and a service card.
[0038] In a third aspect, a display method is provided, which is applied to an electronic device, the method comprising: displaying a third desktop interface in a first display direction, wherein a grid of a display area of the third desktop interface for arranging display elements comprises an m-row and n-column grid, and a plurality of display elements are arranged in the m-row and n-column grid; detecting that the display direction of the electronic device is switched from the first display direction to the second display direction; corresponding to the fact that all the plurality of display elements can be arranged in the n-row and m-column grid by adopting a first method without adjusting the grid size of the plurality of display elements, the plurality of display elements are arranged in the n-row and m-column grid of the second desktop interface by adopting the first method, and displaying the second desktop interface in the second display direction;
[0039] The method of using the first method to layout the multiple display elements in the n-row and m-column grid of the second desktop interface includes: traversing the layout elements in the m-row and n-column grid of the third desktop interface based on the second traversal method, and determining the layout order of each layout element, wherein the layout element that is traversed earlier has a higher layout order, and the layout elements include the multiple display elements and the free grids in the m-row and n-column grid of the third desktop interface;
[0040] The second traversal method is: starting from the grid of the first row and the first column in the grid of m rows and n columns of the third desktop interface, traversing each layout element row by row in the order of the first row to the mth row, and when traversing the layout element occupying the i-th row, traversing the columns by column from small to large according to the difference between the number of columns occupied by each layout element and the number of columns of the traversal starting point, wherein i is a positive integer less than or equal to m; in the process of traversing the layout element occupying the i-th row: corresponding to the next untraversed second layout element occupying the i-th row also occupying the grid in the i+1th row, then traversing the untraversed layout element in the i+1th row, corresponding to the second layout element not occupying the grid in the i+1th row, traversing the layout element with the smallest number of rows of the sorted grid among the untraversed layout elements whose number of columns is the same as that of the sorted grid of the second layout element and whose number of rows is less than or equal to i; wherein the sorted grid is the grid in the upper left corner of the grid occupied by the corresponding display element;
[0041] According to the layout order of each layout element, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, and the sixth layout element with a grid size of p rows and q columns in the layout elements is laid out in the n-row and m-column grid in the following manner, where p and q are positive integers: corresponding to multiple layout elements that have been laid out in the grid area of r rows and s columns and can be laid out in the grid area of p rows and t columns after adjusting their positions and occupying all grids in the grid area of p rows and t columns, the positions of the multiple layout elements are adjusted so that the multiple layout elements are laid out in the grid area of p rows and t columns, and the sixth layout element is laid out in the grid area of p rows and t columns. The free grid areas in the p-row grid where the p-row and t-column grid area is located, r, s, and t are positive integers, and p is greater than r, t is less than s, and the sum of q and t is less than m; corresponding to the multiple laid-out elements that do not exist in the r-row and s-column grid area and can be laid out in the p-row and t-column grid area after adjusting their positions and occupying all the grids in the p-row and t-column grid area, the sixth layout element is laid out in the n-row and m-column grid, in the free grid areas with the same grid size as the sixth layout element, in the free grid areas that are first traversed in the order of starting from the 1st row and the 1st column and first the row and then the column.
[0042] In this implementation, the first method is to layout the target display elements in the second layout method described below using the ninth layout element traversal method (second traversal method). Since the relative positions of some layout elements in the third desktop interface can be retained when the target display elements are laid out based on the ninth layout element traversal method, the user can quickly find the display elements to be operated on in the second desktop interface, which is conducive to improving the user experience.
[0043] In a possible implementation of the third aspect, the method further includes: corresponding to the situation where the first method cannot arrange all the multiple display elements in the n-row and m-column grid without adjusting the grid size of the multiple display elements, the second method is used to arrange the multiple display elements in the n-row and m-column grid of the second desktop interface, and the second desktop interface is displayed; wherein the second method is used to arrange all the multiple display elements in the n-row and m-column grid of the second desktop interface, including: arranging the multiple display elements in the order of the grid size of the multiple display elements from large to small in the second desktop interface. In the n-row and m-column grid of the desktop interface, any third display element among the multiple display elements is laid out during layout: in the n-row and m-column grid of the second desktop interface, in an idle grid area with the same grid size as the third display element, in an idle grid area that is first traversed according to the second traversal method; wherein the second traversal method is to take the grid of the second corner point of the n-row and m-column grid as the starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is the order of rows first and then columns or the order of columns first and then rows.
[0044] In this implementation, the second mode is any one of the third layout modes described below. Since the third layout mode can ensure that all target display elements can be laid out in an n-row and m-column grid, it can be avoided that all target display elements cannot be displayed in one second desktop interface.
[0045] In a possible implementation of the third aspect, the plurality of display elements and the m-row n-column grid satisfy the following conditions: m and n are both integer multiples of 4; or, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns among the plurality of display elements is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; or, b and d are both 2 .... The sum of the number of grids occupied by the display elements with a grid size larger than 2 rows and 4 columns is less than or equal to 16a×c, the difference between the total number of grids in the m-row n-column grid and the sum of the number of grids occupied by the display elements with a grid size larger than 1 row and 1 column in the multiple display elements; or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size larger than 2 rows and 4 columns in the multiple display elements is less than or equal to 16a×c, the difference between the total number of grids in the m-row n-column grid and the sum of the number of grids occupied by the display elements with a grid size larger than 1 row and 1 column in the multiple display elements; or, one of b and d is an odd number and the other is an even number and b and d is greater than or equal to 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m-row and n-column grid and the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to an odd number among m and n; or, b and d are both odd numbers and at least one of b and d is less than 2, and the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c , the difference between the total number of grids in the grid of m rows and n columns minus the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column among multiple display elements is greater than or equal to the maximum value of m and n; or, b and d are both 3, the sum of the number of grids occupied by display elements with a grid size larger than 2 rows and 4 columns among multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the grid of m rows and n columns minus the sum of the number of grids occupied by display elements with a grid size larger than 1 row and 1 column among multiple display elements is greater than or equal to the maximum value of m and n.
[0046] In a possible implementation of the third aspect, the display element includes at least one of an icon and a service card.
[0047] In a fourth aspect, an electronic device is provided, comprising: a memory for storing one or more programs; and a processor for executing one or more programs so that the electronic device implements any display method provided by the first aspect and any possible implementation of the first aspect, the second aspect and any possible implementation of the second aspect, and the third aspect and any possible implementation of the third aspect.
[0048] In a fifth aspect, a readable storage medium is provided, which includes one or more programs. When the one or more programs are executed on an electronic device, the electronic device implements any display method provided by the first aspect and any possible implementation of the first aspect, the second aspect and any possible implementation of the second aspect, and the third aspect and any possible implementation of the third aspect.
[0049] In a sixth aspect, a program product is provided. When the program product is run on an electronic device, the electronic device implements any display method provided by the first aspect and any possible implementation of the first aspect, the second aspect and any possible implementation of the second aspect, and the third aspect and any possible implementation of the third aspect.
[0050] The beneficial effects of the fourth to sixth aspects mentioned above can be referred to the contents of the first to third aspects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 According to some embodiments of the present application, a schematic diagram of a desktop interface displayed before and after an electronic device adjusts its display direction is shown.
[0052] Figure 2 According to some embodiments of the present application, a schematic diagram of a grid division method of a tablet computer 10 in different display directions is shown.
[0053] Figure 3 A tablet computer 10 is shown displaying the aforementioned Figure 1 Schematic diagram of the desktop interface P1 in .
[0054] Figure 4A According to some embodiments of the present application, a schematic diagram of a display interface of a tablet computer 10 is shown when a user adds a display element in a desktop interface P3.
[0055] Figure 4B According to some embodiments of the present application, a schematic diagram comparing a desktop interface P6 and a desktop interface P7 displayed before and after the tablet computer 10 adjusts the display direction is shown.
[0056] Figure 4C According to some embodiments of the present application, a schematic diagram of a display interface of a tablet computer 10 is shown when a user modifies the size of a display element in a desktop interface P3.
[0057] Figure 5 According to some embodiments of the present application, a schematic diagram of a grid size of a display element is shown.
[0058] Fig. 6AAccording to some embodiments of the present application, a schematic diagram of a display interface that meets condition A.2 is shown.
[0059] Figure 6B According to some embodiments of the present application, a schematic diagram of a display interface that does not meet condition A.2 is shown.
[0060] Fig. 7A According to some embodiments of the present application, a schematic diagram of a display interface that meets condition A.4 is shown.
[0061] Figure 7B According to some embodiments of the present application, a schematic diagram of a display interface that does not satisfy condition A.4 is shown.
[0062] Figure 7C According to some embodiments of the present application, a schematic diagram of another display interface that does not meet condition A.4 is shown.
[0063] Fig. 8A According to some embodiments of the present application, a schematic diagram of a display interface that meets condition A.5 is shown.
[0064] Figure 8B According to some embodiments of the present application, a schematic diagram of a display interface that does not meet condition A.5 is shown.
[0065] Figure 8C According to some embodiments of the present application, a schematic diagram of another display interface that does not meet condition A.5 is shown.
[0066] Fig. 9A According to some embodiments of the present application, a schematic diagram of a display interface that meets condition A.6 is shown.
[0067] Fig. 9B According to some embodiments of the present application, a schematic diagram of a display interface that does not satisfy condition A.6 is shown.
[0068] Fig. 9C According to some embodiments of the present application, a schematic diagram of another display interface that does not meet condition A.6 is shown.
[0069] Fig. 10A According to some embodiments of the present application, a schematic diagram of a display interface that meets condition A.7 is shown.
[0070] Fig. 10B According to some embodiments of the present application, a schematic diagram of a display interface that does not satisfy condition A.7 is shown.
[0071] Fig. 10C According to some embodiments of the present application, a schematic diagram of another display interface that does not meet condition A.7 is shown.
[0072] Fig.11A According to some embodiments of the present application, a schematic diagram of layout elements in a desktop interface P6 is shown.
[0073] Fig. 11B According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a first layout element traversal method is shown.
[0074] Fig. 11C According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a second layout element traversal method is shown.
[0075] Fig.11D According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a third layout element traversal method is shown.
[0076] Fig.11E According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a fourth layout element traversal method is shown.
[0077] Fig.11F According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a fifth layout element traversal method is shown.
[0078] Fig.11G According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a sixth layout element traversal method is shown.
[0079] Fig.11H According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by a seventh layout element traversal method is shown.
[0080] Fig.11I According to some embodiments of the present application, a schematic diagram of a layout order of layout elements in a desktop interface P6 determined by an eighth layout element traversal method is shown.
[0081] Fig.12 According to some embodiments of the present application, a schematic diagram is shown of laying out the layout elements in the desktop interface P6 in the desktop interface P8 according to the layout order determined by the first layout element traversal method.
[0082] Fig.13A According to some embodiments of the present application, a schematic diagram is shown for determining a layout order of layout elements A1 to A13 according to a first layout element traversal method. Fig. 13B According to some embodiments of the present application, a schematic diagram of a process of laying out layout elements A1 to A13 on a second desktop interface according to a layout order determined by a first layout element traversal method is shown.
[0083] Fig.14A According to some embodiments of the present application, a schematic diagram of an arrangement grid of layout elements B1 to B11 is shown.
[0084] Fig. 14B According to some embodiments of the present application, a schematic diagram of another sorting grid of layout elements B1 to B11 is shown.
[0085] Fig. 14C According to some embodiments of the present application, a schematic diagram of yet another sorting grid of layout elements B1 to B11 is shown.
[0086] Fig.14D According to some embodiments of the present application, a schematic diagram of another sorting grid of layout elements B1 to B11 is shown.
[0087] Fig.15A According to some embodiments of the present application, a schematic diagram of determining a layout order of layout elements B1 to B11 based on a ninth layout element traversal method is shown.
[0088] Fig. 15B According to some embodiments of the present application, a schematic diagram of a process of laying out layout elements B1 to B11 on a second desktop interface according to a layout order determined by a ninth layout element traversal method is shown.
[0089] Fig.16 According to some embodiments of the present application, a schematic diagram of a process of laying out layout elements C1 to C11 on a second desktop interface according to a third layout manner is shown.
[0090] Fig.17 According to some embodiments of the present application, a flow chart of a display method is shown.
[0091] Fig.18 According to some embodiments of the present application, a flow chart of another display method is shown.
[0092] Fig.19A According to some embodiments of the present application, a schematic diagram of an interface for displaying prompt information on a tablet computer 10 is shown.
[0093] Fig.19B According to some embodiments of the present application, another schematic diagram of an interface for displaying prompt information on a tablet computer 10 is shown.
[0094] Fig.19CAccording to some embodiments of the present application, a schematic diagram of an interface P9 is shown.
[0095] Fig.19D According to some embodiments of the present application, a schematic diagram of an interface P10 is shown.
[0096] Fig. 20A According to some embodiments of the present application, a flowchart of another display method is shown.
[0097] Fig. 20B According to some embodiments of the present application, a schematic diagram of a process of a tablet computer 10 laying out display elements in a third desktop interface into a second desktop interface based on a preset layout manner is shown.
[0098] Fig. 20C According to some embodiments of the present application, another schematic diagram of a process of layouting display elements in a third desktop interface into a second desktop interface based on a preset layout method by a tablet computer 10 is shown.
[0099] Fig.21 According to some embodiments of the present application, a structural schematic diagram of a tablet computer 10 is shown. DETAILED DESCRIPTION
[0100] Illustrative embodiments of the present application include, but are not limited to, a display method, a readable storage medium, an electronic device, and a program product.
[0101] It should be noted that the technical solution provided in the embodiment of the present application can be applied to any electronic device that can display a user interface based on a subject resource, including but not limited to user equipment (UE), mobile station (MS), mobile terminal (MT), etc. For example, the electronic device can be a mobile phone, a wearable device, a tablet computer (Pad), a laptop computer, an industrial control device, a car machine, a terminal device in a smart grid, a terminal device in transportation safety, a terminal device in a smart city, etc. For the purpose of description, the technical solution of the present application is introduced below by taking the electronic device as a tablet computer 10.
[0102] In some embodiments, an application in an electronic device for managing desktop display (e.g., a settings application, a desktop application, etc.) typically uses a portion of the display area of the desktop interface to display icons, function controls, and other display elements (hereinafter referred to as the icon display area), and divides the icon display area into grids of the same size, and each display element (e.g., an icon, a function control) displayed on the desktop interface can occupy one or more grids, and each display element is generally aligned with a preset position (e.g., center, upper left corner, upper right corner, lower left corner, lower right corner, etc.) of the one or more grids it occupies.
[0103] For ease of description, the direction in which the electronic device display screen has a larger size is defined as the length direction, and the direction in which the electronic device display screen has a smaller size is defined as the width direction; the display area in the electronic device used to display display elements such as application icons and service cards is called the icon display area; the division of the icon display area in the display direction is called rows, and the division in the direction perpendicular to the display direction is called columns; a grid of m rows and n columns is called an m×n grid, where m and n are integers greater than 1; the number of rows and columns of the grid occupied by a display element is called the grid size of the display element, for example, the size of a display element occupying a grid of i rows and j columns is recorded as i×j. The number of columns and rows where the grid is located is used as the grid coordinates of the grid, for example, the grid coordinates of the grid of the xth row and yth column are marked as (y,x).
[0104] For example, reference Figure 2 , the size L1 of the display screen of the tablet computer 10 in the A direction is greater than the size L2 in the B direction, then the A direction is called the length direction of the tablet computer 10, and the B direction is called the width direction of the tablet computer 10. When the tablet computer 10 is displayed in the width direction, the grid division method of the icon display area is 6 rows and 10 columns (i.e., 6×10 grid); when the tablet computer 10 is displayed in the length direction, the grid division method of the icon display area on the desktop is 10 rows and 6 columns (i.e., 10×6 grid). The top of the display interface of the tablet computer 10 can be any of the four sides of the tablet computer 10. The tablet computer 10 can automatically select the angle between the electronic device and the horizontal plane. Figure 2 Display the interface in any of the ways shown.
[0105] In some embodiments, when the display direction of the tablet computer 10 is in the width direction, it may also be referred to as a horizontal screen display, and when the display direction of the tablet computer 10 is in the length direction, it may also be referred to as a vertical screen display.
[0106] It should be noted that, generally speaking, if the electronic device displays the desktop interface in an m×n grid when the length direction is used as the display direction, the grid division method when the desktop interface is displayed in the width direction may be an n×m grid.
[0107] It should be noted that Figure 2 The grid division method of the tablet computer 10 shown is only an example. In other embodiments, the grid division of the icon display area of the electronic device may include more or fewer rows or columns, which is not limited here.
[0108] Combine the following Figure 2 The grid division method shown introduces the technical solution of the present application.
[0109] As described in the background art, since the length and width of the display screen of the electronic device are usually different, the layout of the display elements in the desktop interface displayed in one display direction may not be suitable for the desktop interface displayed in another display direction. As a result, after the display direction of the electronic device is switched, the display elements displayed in the desktop interface before the display direction is switched may not be fully displayed in the desktop interface after the display direction is switched, affecting the user experience.
[0110] For example, Figure 3 A tablet computer 10 is shown displaying the aforementioned Figure 1 Schematic diagram of the desktop interface P1 in .
[0111] refer to Figure 3 The tablet computer 10 displays the desktop interface P1 with the width direction as the display direction, and the grid division method is 6×10 grids. The desktop interface P1 includes a service card of the time control (hereinafter referred to as the time card U11), a service card of the my note control (hereinafter referred to as the note card U12), a service card of the file management control (hereinafter referred to as the file card U13), a service card of the address book control (hereinafter referred to as the address book card U14) and a service card of the time control (hereinafter referred to as the time card U15), as well as an icon of the video application (hereinafter referred to as the video icon U21), an icon of the recorder application (hereinafter referred to as the recorder icon U22), an icon of the mail application (hereinafter referred to as the mail icon U23), an icon of the calculator application (hereinafter referred to as the calculator icon U24), an icon of the calendar application (hereinafter referred to as the calendar icon U25) and an icon of the music application (hereinafter referred to as the audio icon U26). Among them, the grid size of the time card U11, note card U12, address card U14 and time card U15 is 2×4, the grid size of the file card U13 is 4×4, and the grid size of the video icon U21, recorder icon U22, mail icon U23, computer icon U24, calendar icon U25 and music icon U26 is 1×1.
[0112] After the display direction of the tablet computer 10 is switched from the width direction to the length direction, the grid division method of the desktop interface displayed by the tablet computer 10 is 10×6 grid. The electronic device can adjust the position of the display elements in the desktop P1 according to a preset rule (for example, according to the rule of display element size from large to small, etc., or other rules) to display the display elements in the desktop interface P1 in the desktop interface of 10×6 grid, wherein, after some display elements are laid out in the 10×6 grid, if there are not enough free grids to lay out the unlaid display elements, the tablet computer 10 will not display the unlaid display elements. Continue to refer to Figure 3 After the tablet computer 10 displays the time card U11, note card U12, file card U13, address book card U14, video icon U21, recorder icon U22, mail icon U23, computer icon U24, and calendar icon U25 on the desktop interface P2, there is no free grid that meets the grid size (2×4) of the time card U15. The tablet computer 10 does not display the time card U15 on the desktop interface P2, affecting the user experience.
[0113] In view of this, an embodiment of the present application provides a display method, in which, when an electronic device detects a user's modification operation (hereinafter referred to as a desktop modification operation, such as an operation of adding a first display element to the first desktop interface, or an operation of increasing the size of a first display interface in the first desktop interface) of a display element in a first desktop interface displayed in a first direction (such as a length direction or a width direction), it can first predict whether all target display elements can be displayed in a second desktop interface displayed in a second direction (such as a width direction or a length direction) after executing the user's desktop modification operation (corresponding to the desktop modification operation being an operation of adding a first display element to the first desktop interface, the target display elements include the display elements in the first desktop interface and the first display element; corresponding to the desktop modification operation being an operation of increasing the size of the first display element, the target display elements include the display elements in the first desktop interface other than the first display element and the first display element after the size is increased). If it is predicted that all target display elements can be displayed in the second desktop interface after executing the user's desktop modification operation, the user's desktop modification operation (such as adding a first display element to the first desktop interface, or increasing the size of the first display interface in the first desktop interface) is executed and the third desktop interface is displayed; otherwise, the user's desktop modification operation is not executed.
[0114] In the case where the electronic device displays a third desktop interface with the first direction as the display direction, if the electronic device detects that the display direction of the electronic device is switched to the second direction, the positions of the display elements in the third desktop interface can be adjusted according to the grid division method with the display direction being the second direction to obtain and display the second desktop interface with the second direction as the display direction. The second desktop interface includes all the display elements in the third desktop interface, and the grid size of each display element in the third desktop interface is the same as the grid size in the first desktop interface.
[0115] For example, refer to Figure 4A , assuming that the desktop interface before adding the time card U15 in the aforementioned desktop interface P1 is the desktop interface P3 (as the first desktop interface, the grid division method is 10×6 grid), after the tablet computer 10 detects the user's long press operation on the calendar icon U25 of the desktop interface P3, it can display the menu U31 in the desktop interface P4, and the menu U31 can include the "service card" option U32. After detecting the user's click operation on the "service card" option U32, the tablet computer 10 can display the calendar-service card interface P5. The calendar-service card interface P5 includes a variety of service cards corresponding to the calendar application, such as a service card U33 with a grid size of 2×4 (that is, the time card U15 in the aforementioned desktop interface P1), a service card U34 with a grid size of 2×4, a service card U35 with a grid size of 2×2, and a service card U36 with a grid size of 2×2.
[0116] When the tablet computer 10 detects the user's selection operation on any one of the service cards U33, U34, U35, and U36, the desktop modification operation can be detected. Then, the tablet computer 10 can determine whether all target display elements can be displayed in a desktop interface with a grid division method of 6×10 grids while keeping the grid size of the target display elements (all display elements in the desktop interface P3 and the selected service card) unchanged after the service card selected by the user is added to the desktop interface P3. And based on the judgment result, it is selected to execute or not execute the user's desktop modification operation.
[0117] For example, continue to refer to Figure 4AWhen the tablet computer 10 detects that the user selects the service card U33 (as the first display element), it can determine that after adding the service card U33 (or the service card U34), all target display elements cannot be displayed in a desktop interface with a grid division method of 6×10 grids without adjusting the grid size of the target display element (displaying all display elements in the desktop interface P3 and the service card U33). Therefore, although the grid size of the free grid area in the tablet computer 10 is larger than the grid size of the service card U33, the tablet computer 10 does not execute the user's desktop modification operation. In addition, the tablet computer 10 can display a prompt box U37 in the calendar-service card interface P5 to prompt the user that "the service card size is too large, which may cause the interface to be unable to be displayed after rotation, please select another size" and does not execute the user's desktop modification operation.
[0118] In other embodiments, in the case of a second desktop interface where the target display elements cannot be fully displayed, the tablet computer 10 may also display prompt information for the user to choose whether to perform a desktop modification operation, and execute or not execute the user's desktop modification operation based on the user's choice.
[0119] For example, refer to Figure 4B When the tablet computer 10 detects that the user selects the service card U35 (as the first display element), it can determine that after adding the service card U35, all target display elements can be displayed in a desktop interface with a grid division method of 6×10 grids without adjusting the grid size of the target display element (displaying all display elements and the service card U35 in the desktop interface P3), execute the user's desktop modification operation, and display the desktop interface P6 (as the third desktop interface) after the service card U35 is added to the desktop interface P3. In the desktop interface P6, the service card U35 occupies the 5th to 6th columns of the 5th row and the 5th to 6th columns of the 6th row.
[0120] Continue to refer Figure 4B After detecting that the display direction changes from the width direction to the length direction, the tablet computer 10 can adjust the positions of all display elements in the interface P6 to obtain and display the desktop interface P7. Figure 4B As shown, the desktop interface P7 includes all display elements in the desktop interface P6, and the grid size of each display element in the desktop interface P7 is the same as the grid size in the desktop interface P6.
[0121] For example, refer to Figure 4C After the tablet computer 10 detects that the user has long pressed the address book card U14 in the desktop interface P3, the tablet computer 10 may display a control U41 for adjusting the size of the address book card U14. Figure 4CThe operation of clicking and releasing the D point shown in the figure (that is, increasing the grid size of the address book card U14 to 4×4). Then the tablet computer 10 can predict that after increasing the grid size of the address book card U14 to 4×4, it is impossible to display all the target display elements (display elements other than the address book card U14 in the desktop interface P3 and the address book card U1 after the size is increased) in a desktop interface with a grid division method of 6×10 grids. Therefore, although the grid size of the free grid area in the tablet computer 10 is larger than 4×4, the tablet computer 10 does not execute the user's desktop modification operation, and displays the prompt message U42 to prompt the user that "the adjusted size is too large, which may cause the interface to be unable to display after rotation, please readjust it".
[0122] In some embodiments, for an m×n grid desktop interface, the grid size of the display element can be any size whose number of rows and columns is less than or equal to the minimum value of m and n (denoted as min(m,n)). The grid size supported by different tablet computers 10 can be part or all of the grid sizes whose number of rows and columns is less than or equal to min(m,n), which can be set by the developer according to the application corresponding to the display element or the operating system of the tablet computer 10.
[0123] For example, refer to Figure 5 , the grid size of the display elements can be at least one of the following sizes: 1×1, 1×2, 1×4, 1×6, 2×1, 2×4, 2×6, 4×1, 4×2, 4×4, 4×6, 6×1, 6×2, 6×4, 6×6, etc.
[0124] It should be understood that in other embodiments, the grid size of the display elements may also be other sizes, such as 3×3, 5×5, 1×3, 1×5, 5×1, 3×1, 2×3, 3×2, 2×5, 5×2, 3×4, 4×3, 3×5, 5×3, 4×5, 5×4, 3×6, 6×3, 5×6, 6×5, etc., which are not limited here.
[0125] For the convenience of description, in the following embodiments, display elements with a grid size greater than or equal to 2×4 or a grid size greater than or equal to 4×2 are referred to as large-size display elements.
[0126] In some embodiments, the tablet computer 10 can limit the total number of grids occupied by display elements with larger grid sizes and the number of free grids in the icon display area according to the grid division method of the desktop interface icon display area, to ensure that after the user's desktop modification operation is performed in the desktop interface with a display direction of a first direction, all target display elements can be displayed in a second desktop interface displayed in a second direction.
[0127] For example, for a third desktop interface whose grid division method is m×n grid (a desktop interface that can be obtained by executing the desktop modification operation of the user on the first desktop interface), after detecting the desktop modification operation of the user, the tablet computer 10 can determine whether the target display element meets the first condition according to the grid size of the target display element, the values of m and n, the number of free grids in the third desktop interface, etc. If the target display element meets the first condition, it means that all the target display elements can be displayed in a second desktop interface whose grid division method is n×m grid without changing the grid size of each target display element.
[0128] For example, m can be expressed as 4a+b, and n can be expressed as 4c+d, where a and c are integers greater than or equal to 0, b=0, 1, 2 or 3 (i.e., b is the remainder of m divided by 4), and d=0, 1, 2 or 3 (i.e., d is the remainder of n divided by 4). When b and d are both 0, there is no need to limit the grid size of the target display element; when b and d are both even numbers, the first condition may include a condition for limiting the number of grids occupied by large-sized display elements in the target display element; when at least one of b and d is an odd number, the first condition may include a condition for limiting the number of grids occupied by large-sized display elements in the target display element, and a condition for limiting the number of display elements with a grid size of 1×1 and the number of idle grids in the target display element. Specifically, the above-mentioned first condition may include the following conditions A.1 to A.7:
[0129] Condition A.1, b and d are both 0.
[0130] That is, when m and n are integer multiples of 4, any display element that can be displayed in a desktop interface using an n×m grid can also be displayed in a desktop interface using an m×n grid. It is understood that the grid size of the multiple display elements is any one of the above sizes.
[0131] Condition A.2: b and d are both even numbers and b and d are different, and the number of grids occupied by the large-size display elements in the target display elements is less than or equal to 16a×c.
[0132] For example, refer to Fig. 6A , the grid division method of the third desktop interface is 6×4 grid, then a=c=1, b=2, d=0, and the target display element includes a display element with a grid size of 4×4 and two display elements with a grid size of 2×2. The number of grids occupied by the large-size display element in the target display element is 16=(16a×c=16), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 4×6 grid.
[0133] refer to Figure 6B, the grid division method of the third desktop interface is 6×4 grid, then a=c=1, b=2, d=0, and the target display element includes a display element with a grid size of 4×4 and a display element with a grid size of 2×4. The number of grids occupied by the large-size display element in the target display element is (16+8=24)>(16a×c=16), which does not meet condition A.2. The target display element cannot be fully displayed in a second desktop interface with a grid division method of 4×6 grid.
[0134] Condition A.3: b and d are both 2, and the number of grids occupied by the large-size display elements in the target display element is less than or equal to 16a×c+8×min(a, c), where min(a, c) is the minimum value of a and c;
[0135] For example, for Figure 4A In the illustrated situation, the third desktop interface may be the desktop interface P3, the user's desktop modification operation may be the user's selection operation on the service card U33, and the target display elements may include: time card U11, note card U12, address card U14, file card U13, video icon U21, recorder icon U22, mail icon U23, calculator icon U24, calendar icon U25, music icon U26, and user-added service card U33 (as the first display element), and the large-size display elements (time card U11, note card U12, address card U14, file card U13, service card U33) in the target display elements occupy 48 grids. Since the grid division method of the desktop interface P3 is 6×10 grids (m=6, n=10), 6=1×4+2, 10=2×4+2, a=1, c=2, b=d=2. The number of grids occupied by the large-size display elements in the target display elements is 48>(16a×c+8×min(a, c), that is, 16×1×2+8×min(1, 2)=40), which satisfies condition A.3. The target display elements cannot be fully displayed in a second desktop interface with a grid division method of 6×10 grids.
[0136] For example, corresponding to Figure 4B The situation shown is compared to Figure 4A In the case shown, the first display element changes from service card U33 to service card U35. The number of grids occupied by the large-size display elements (time card U11, note card U12, address card U14, file card U13) in the target display element is 40 = (16a × c + 8 × min (a, c), that is, 16 × 1 × 2 + 8 × min (1, 2) = 40), which meets condition A.3. The target display elements can be fully displayed in a second desktop interface with a grid division method of 6 × 10 grids.
[0137] For example, corresponding to Figure 4C In the situation shown, the number of grids occupied by the large-sized display elements (time card U11, note card U12, file card U13 and address book card U14 after the size is increased) in the target display elements is 48, which is greater than (16a×c+8×min(a, c), that is, 16×1×2+8×min(1,2)=40), and condition A.3 is not met. The target display elements can be fully displayed in a second desktop interface with a grid division method of 6×10 grids.
[0138] Condition A.4, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, and the number of grids occupied by the large-size display elements in the target display elements is less than or equal to 16a×c, and the difference between the total number of grids in the third desktop interface (mn) and the sum of the number of grids occupied by the display elements with a grid size greater than 1×1 in the target display elements is greater than or equal to odd(m, n), where odd(m, n) represents an odd number between m and n.
[0139] For example, refer to Fig. 7A , the grid division method of the third desktop interface is 6×5 grid, then a=c=1, b=2, d=1, the target display elements include a display element with a grid size of 4×4, 2 display elements with a grid size of 2×2, and 1 display element with a grid size of 1×1. The number of grids occupied by the large-sized display elements in the target display elements is 16=(16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are equal to (odd(m,n)=5), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 5×6 grid.
[0140] refer to Figure 7B , the grid division method of the third desktop interface is 6×5 grid, then a=c=1, b=2, d=1, the target display elements include a display element with a grid size of 4×4, two display elements with a grid size of 2×2, and one display element with a grid size of 2×1. The number of grids occupied by the large-size display elements in the target display elements is 16=(16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are 4 less than (odd(m,n)=5), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 5×6 grid.
[0141] refer to Figure 7C, the grid division method of the third desktop interface is 6×5 grid, then a=c=1, b=2, d=1, the target display elements include a display element with a grid size of 4×4, a display element with a grid size of 2×4, and a display element with a grid size of 1×1. The number of grids occupied by large-sized display elements in the target display elements is (16+8=24)>(16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are less than (odd(m,n)=5), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 5×6 grid.
[0142] Condition A.5: one of b and d is an odd number and the other is an even number, and both b and d are greater than or equal to 2, and the number of grids occupied by the large-size display elements in the target display elements is less than or equal to 16a×c+8×min(a, c), and the difference between the total number of grids in the third desktop interface (mn) and the sum of the number of grids occupied by the display elements with a grid size greater than 1×1 in the target display elements is greater than or equal to odd(m, n).
[0143] For example, refer to Fig. 8A , the grid division method of the third desktop interface is 6×7 grid, then a=c=1, b=2, d=3, the target display elements include a display element with a grid size of 4×4, a display element with a grid size of 2×1, and a display element with a grid size of 2×4. The number of grids occupied by large-sized display elements in the target display elements is 24, which is equal to (16a×c+8×min(a,c)=24), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are 16 greater than (odd(m,n)=7), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 7×6 grid.
[0144] refer to Figure 8B , the grid division method of the third desktop interface is 6×7 grid, then a=c=1, b=2, d=3, the target display elements include a display element with a grid size of 4×4, a display element with a grid size of 3×3, and a display element with a grid size of 2×4. The number of grids occupied by large-sized display elements in the target display elements is 33, which is greater than (16a×c+8×min(a,c)=24), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements is 16, which is greater than (odd(m,n)=7), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 7×6 grid.
[0145] refer to Figure 8C, the grid division method of the third desktop interface is 6×7 grid, then a=c=1, b=2, d=3, the target display elements include a display element with a grid size of 4×4, 5 display elements with a grid size of 2×2, and 1 display element with a grid size of 2×1. The number of grids occupied by large-sized display elements in the target display elements is 16, which is less than (16a×c+8×min(a,c)=24), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are 4, which is less than (odd(m,n)=7), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 6×7 grid.
[0146] Condition A.6: b and d are both odd numbers and at least one of b and d is less than 2, and the number of grids occupied by the large-sized display elements in the target display elements is less than or equal to 16a×c, and the difference between the total number of grids in the third desktop interface (mn) and the sum of the number of grids occupied by the display elements with a grid size greater than 1×1 in the target display elements is greater than or equal to the maximum value of m and n (denoted as max(m, n)).
[0147] For example, refer to Fig. 9A , the grid division method of the third desktop interface is 5×7 grid, then a=c=1, b=1, d=3, the target display elements include a display element with a grid size of 4×4, 2 display elements with a grid size of 2×2, and 2 display elements with a grid size of 1×2. The number of grids occupied by the large-size display elements in the target display elements is 16=(16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are equal to (max(m,n)=7), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 7×5 grid.
[0148] For example, refer to Fig. 9B , the grid division method of the third desktop interface is 5×7 grid, then a=c=1, b=1, d=3, the target display elements include a display element with a grid size of 4×4, a display element with a grid size of 4×2, and two display elements with a grid size of 1×2. The number of grids occupied by the large-size display elements in the target display elements is (16+8=24) greater than (16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are equal to (max(m,n)=7), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 7×5 grid.
[0149] For example, refer to Fig. 9C, the grid division method of the third desktop interface is 5×7 grid, then a=c=1, b=1, d=3, the target display elements include a display element with a grid size of 4×4, 2 display elements with a grid size of 2×2, 1 display element with a grid size of 1×4 and 1 display element with a grid size of 1×2. The number of grids occupied by large-sized display elements in the target display elements is 16, which is equal to (16a×c=16), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are less than (max(m,n)=7), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 7×5 grid.
[0150] Condition A.7, b and d are both 3, and the number of grids occupied by the large-size display elements in the target display elements is less than or equal to 16a×c+8×min(a, c), and the difference between the total number of grids in the third desktop interface (mn) and the sum of the number of grids occupied by the display elements with a grid size greater than 1×1 in the target display elements is greater than or equal to max(m, n).
[0151] For example, refer to Fig. 10A , the grid division method of the third desktop interface is 7×11 grid, then a=1, c=2, b=d=3, the target display elements include 2 display elements with a grid size of 4×4, 1 display element with a grid size of 2×4, 3 display elements with a grid size of 2×2, and 1 display element with a grid size of 1×6. The number of grids occupied by large-sized display elements in the target display elements is (16+16+8=40) equal to (16a×c+8×min(a,c)=40), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are greater than (max(m,n)=11), and the target display elements can be fully displayed in a second desktop interface with a grid division method of 11×7 grid.
[0152] refer to Fig. 10B , the grid division method of the third desktop interface is 7×11 grid, then a=1, c=2, b=d=3, the target display elements include 2 display elements with a grid size of 4×4, 2 display elements with a grid size of 2×4, 3 display elements with a grid size of 2×2, and 1 display element with a grid size of 1×6. The number of grids occupied by large-size display elements in the target display elements is (16+16+8+8=48) which is greater than (16a×c+8×min(a,c)=40), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are equal to (max(m,n)=11), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 11×7 grid.
[0153] refer to Fig. 10C , the grid division method of the third desktop interface is 7×11 grid, then a=1, c=2, b=d=3, the target display elements include 2 display elements with a grid size of 4×4, 1 display element with a grid size of 2×4, 5 display elements with a grid size of 2×2, and 4 display elements with a grid size of 1×2. The number of grids occupied by large-sized display elements in the target display elements is (16+16+8=40) equal to (16a×c+8×min(a,c)=40), the number of free grids in the third desktop interface and the number of display elements with a grid size of 1×1 in the target display elements are less than (max(m,n)=11), and the target display elements cannot be fully displayed in a second desktop interface with a grid division method of 11×7 grid.
[0154] It should be noted that the mathematical representation in the above conditions is only an example. In other embodiments, the first condition may also be other conditions equivalent to the above conditions, which is not limited here.
[0155] Based on the above first condition, if the tablet computer 10 determines that the grid division method of the target display element and the third desktop interface meets the first condition, the user's desktop modification operation can be executed; otherwise, the user's desktop modification operation is not executed.
[0156] For example, for Figure 4A In the situation shown, the third desktop interface may be desktop interface P3, the user's desktop modification operation may be the user's selection operation on service card U33, and the tablet computer 10 may determine that the target display element does not satisfy condition A.3 in the aforementioned first condition and does not execute the user's desktop modification operation.
[0157] For example, corresponding to Figure 4B The situation shown is compared to Figure 4A In the illustrated situation, the first display element changes from service card U33 to service card U35. The tablet computer 10 may determine that the target display element satisfies condition A.3 of the aforementioned first condition, and execute the user's desktop modification operation.
[0158] In some embodiments, the tablet computer 10 pre-layouts the target display elements according to the grid division method of the second desktop interface based on one or more preset layout methods. If the tablet computer 10 can layout all the target display elements in the second desktop interface based on any preset layout method, it is determined that the target display elements can be displayed on a second desktop interface, and the user's desktop modification operation is performed. The preset layout method will be introduced below and is not limited here.
[0159] In some embodiments, after the tablet computer 10 displays the third desktop interface, if it is detected that the display direction is switched from the first direction to the second direction, the tablet computer 10 may also rearrange the display elements in the third desktop interface in a preset layout manner to obtain a second desktop interface displayed in the second direction. In the process of rearranging the display elements in the third desktop interface, the layout manner of each display element in the third desktop interface (e.g., the relative position relationship between the display elements) may be taken into account, so that in the second desktop interface displayed by the tablet computer 10, the user can more quickly find the display element that needs to perform related operations (e.g., the display element corresponding to the application or service that the user needs to view / run / access), which is conducive to improving the user experience.
[0160] Exemplarily, the tablet computer 10 may first obtain a layout order of each layout element according to the positional relationship of the layout elements (including display elements and free grids) of the third desktop interface, and then layout each layout element in turn into a display interface divided into grids in the second direction according to the layout order of each layout element.
[0161] It should be noted that each free grid in the third desktop interface can be regarded as a layout element with a grid size of 1×1.
[0162] The following describes the layout method provided by the implementation example of this application.
[0163] The first layout method:
[0164] The tablet computer 10 can take the grid at a corner point of the grid of the third desktop interface (for example, the grid at the upper left corner, the grid at the upper right corner, the grid at the lower left corner, the grid at the lower right corner, etc.) as the traversal starting point, and traverse the layout elements occupying each grid in a row-column order of rows first and columns later (or columns first and rows later), and use the order in which each layout element is traversed as the layout order of the layout elements, wherein, for a layout element occupying multiple rows (or columns) of grids, if the layout element is traversed during the traversal of a certain row (or column), the layout element will no longer be traversed in other rows (or columns). In some embodiments, the order of rows first and columns later is to traverse row by row according to the difference between the number of rows of each row of grids and the number of rows of the traversal starting point from small to large, and when traversing the grids of a row, traverse column by column according to the difference between the number of columns of each grid and the number of columns of the traversal starting point from small to large; the order of rows first and columns later is to traverse column by column according to the difference between the number of columns of each column of grids and the number of columns of the traversal starting point from small to large, and when traversing the grids in a column, traverse column by column according to the distance between the number of rows of each grid and the traversal starting point from small to large.
[0165] Then, the tablet computer 10 can lay out each layout element on the grid of the second desktop interface according to the layout order of each layout element. When laying out a layout element, the layout element is always laid out in an empty grid area of the grid of the second desktop interface with the same grid size as the layout element, and in the empty grid area that is first traversed when traversing according to the traversal starting point and row and column order used when determining the layout order.
[0166] Exemplarily, the tablet computer 10 may first determine the sorting grids of each layout element (used to indicate the grids referring to each layout element during the traversal of the layout elements), wherein the sorting grid of the layout element occupying one grid (including the free grid and the display element with a grid size of 1×1) is the grid occupied by it, and the sorting grid of the display element occupying multiple grids (i.e., the display element with a grid size greater than 1×1) is one of the multiple grids occupied by it (e.g., the grids at the upper left corner, upper right corner, lower left corner, and lower right corner of the multiple grids, etc.). Then, the tablet computer 10 may use a vertex (e.g., the upper left corner, the upper right corner, the lower left corner, the lower right corner, etc.) of the grid of the third desktop interface as the traversal starting point, traverse the sorting grids of the layout elements in each grid in a row-first-column-later or column-first-later manner, and use the order in which the sorting grids of each layout element are traversed as the layout order of the layout element. Among them, the form of row first and column second is to traverse row by row according to the distance between each row of grids and the traversal starting point from small to large, and when traversing the grids in a row, traverse column by column according to the distance between the grids and the traversal starting point from small to large; the form of column first and row second is to traverse column by column according to the distance between each column of grids and the traversal starting point from small to large, and when traversing the grids in a column, traverse column by column according to the distance between each grid and the traversal starting point from small to large.
[0167] In some embodiments, the sorting grid of the display elements occupying multiple grids corresponds to the traversal starting point of the traversal relative to the position of the multiple grids occupied by the display elements. For example, if the traversal starting point is the upper left corner, the sorting grid of the display elements occupying multiple grids is the grid in the upper left corner of the multiple grids occupied by the display elements; if the traversal starting point is the upper right corner, the sorting grid of the display elements occupying multiple grids is the grid in the upper right corner of the multiple grids occupied by the display elements; if the traversal starting point is the lower left corner, the sorting grid of the display elements occupying multiple grids is the grid in the lower left corner of the multiple grids occupied by the display elements; if the traversal starting point is the lower right corner, the sorting grid of the display elements occupying multiple grids is the grid in the lower right corner of the multiple grids occupied by the display elements.
[0168] Then, the tablet computer 10 can lay out each layout element on the grid of the second desktop interface according to the layout order of each layout element. When laying out a layout element, the layout element is always laid out in an empty grid area of the grid of the second desktop interface that has the same grid size as the layout element, and in the empty grid area that is first traversed according to the layout element traversal method. In this way, it can be ensured that the relative positions of the layout elements in the third desktop interface can be retained as much as possible when laying out the layout elements, which is conducive to users quickly finding the display elements that need to perform related operations.
[0169] In some embodiments, taking an m×n grid as an example, the preset layout element traversal method may be in various forms:
[0170] The first layout element traversal mode takes the upper left corner grid as the traversal starting point and traverses the layout elements in the order of rows first and columns later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grids in the first row in the order of the number of columns occupied by the layout elements from small to large, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grids in the second row in the order of the number of columns occupied by the layout elements from small to large, and so on, until all the layout elements are traversed.
[0171] For example, refer to Fig.11A For the aforementioned desktop interface P6 (as the third desktop interface), the layout elements may include a time card U11, a note card U12, a file card U13, an address book card U14, a video icon U21, a recorder icon U22, a mail icon U23, a calculator icon U24, a calendar icon U25, a music icon U26, a calendar card U35, and free grids S01 to S10.
[0172] refer to Fig. 11BBased on the first layout element traversal method, the tablet computer 10 can traverse each layout element in the order of rows first and columns later with the upper left corner as the traversal starting point: traverse the layout elements occupying the grid in the first row that have not been traversed in order of the number of columns occupied by the layout elements from small to large: time card U11 → note card U12 → empty grid S01 → video icon U21; traverse the layout elements occupying the grid in the second row that have not been traversed in order of the number of columns occupied by the layout elements from small to large: empty grid S02 → recorder icon U22; traverse the layout elements occupying the grid in the third row that have not been traversed in order of the number of columns occupied by the layout elements from small to large: file card U13 → address book card U14 → empty grid S 03→mail icon U23; traverse the layout elements occupying the grid in the 4th row in the order of the number of columns occupied by the layout elements from small to large, the untraversed layout elements free grid S04→calculator icon U24; traverse the layout elements occupying the grid in the 5th row in the order of the number of columns occupied by the layout elements from small to large, the untraversed layout elements calendar card U35→free grid S05→free grid S06→free grid S07→calendar icon U25; traverse the layout elements occupying the grid in the 6th row in the order of the number of columns occupied by the layout elements from small to large, the untraversed layout elements free grid S08→free grid S09→free grid S10→music icon U26. At this point, the traversal of all layout elements of the desktop interface P6 is completed. Based on the above process, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: time card U11 → note card U12 → empty grid S01 → video icon U21 → empty grid S02 → recorder icon U22 → file card U13 → address book card U14 → empty grid S03 → email icon U23 → empty grid S04 → calculator icon U24 → calendar card U35 → empty grid S05 → empty grid S06 → empty grid S07 → calendar icon U25 → empty grid S08 → empty grid S09 → empty grid S10 → music icon U26.
[0173] The second layout element traversal mode takes the lower left corner grid as the traversal starting point and traverses the layout elements in the order of rows first and columns later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the mth row in the order of the number of columns occupied by the layout elements from small to large, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the m-1th row in the order of the number of columns occupied by the layout elements from small to large, and so on, until all the layout elements are traversed.
[0174] For example, refer to Fig. 11CBased on the second layout element traversal method, the tablet computer 10 can traverse each layout element in the order of first row and then column with the lower left corner as the traversal starting point, and the specific process is not repeated. Based on the second layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: file card U13→calendar card U35→empty grid S08→empty grid S09→empty grid S10→music icon U26→empty grid S05→empty grid S06→empty grid S07→calendar icon U25→address book card U14→empty grid S04→calculator icon U24→empty grid S03→mail icon U23→time card U11→note card U12→empty grid S02→recorder icon U22→empty grid S01→video icon U21.
[0175] The third layout element traversal method takes the upper right corner of the grid as the traversal starting point and traverses the layout elements in the order of rows first and columns later.
[0176] The tablet computer 10 may first traverse the untraversed layout elements in the layout elements occupying the grid in the first row in descending order of the number of columns occupied by the layout elements, and then traverse the untraversed layout elements in the layout elements occupying the grid in the second row in descending order of the number of columns occupied by the layout elements, and so on, until all the layout elements are traversed.
[0177] For example, refer to Fig.11D Based on the third layout element traversal method, the tablet computer 10 can traverse each layout element in the order of first row and then column with the upper right corner as the traversal starting point, and the specific process is not repeated. Based on the third layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: video icon U21→empty grid S01→note card U12→time card U11→recorder icon U22→empty grid S02→mail icon U23→empty grid S03→address card U14→file card U13→calculator icon U24→empty grid S04→calendar icon U25→empty grid S07→empty grid S06→empty grid S05→calendar card U35→music icon U26→empty grid S10→empty grid S09→empty grid S08.
[0178] The fourth layout element traversal mode takes the grid at the lower right corner of the grid as the traversal starting point, and traverses the layout elements in the order of rows first and columns later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the mth row in the order of the number of columns occupied by the layout elements from large to small, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the m-1th row in the order of the number of columns occupied by the layout elements from small to large, and so on, until all the layout elements are traversed.
[0179] For example, refer to Fig.11E Based on the fourth layout element traversal method, the tablet computer 10 can traverse each layout element in the order of first row and then column with the lower right corner as the traversal starting point, and the specific process is not repeated. Based on the fourth layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: music icon U26 → empty grid S10 → empty grid S09 → empty grid S08 → calendar card U35 → file card U13 → calendar icon U25 → empty grid S07 → empty grid S06 → empty grid S05 → calculator icon U24 → empty grid S04 → address book card U14 → mail icon U23 → empty grid S03 → recorder icon U22 → empty grid S02 → note card U12 → time card U11 → video icon U21 → empty grid S01.
[0180] The fifth layout element traversal mode takes the upper left corner grid as the traversal starting point, and traverses the layout elements in the order of columns first and rows later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grids in the first column in the order of the number of rows occupied by the layout elements from small to large, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grids in the second column in the order of the number of rows occupied by the layout elements from small to large, and so on, until all the layout elements are traversed.
[0181] refer to Fig.11FBased on the fifth layout element traversal method, the tablet computer 10 can traverse each layout element in the order of columns first and rows later with the upper left corner as the traversal starting point: the layout elements occupying the grid in the first column that have not been traversed are traversed in order of the number of rows occupied by the layout elements from small to large: the time card U11→the file card U13; since there are no untraversed layout elements in the second to fourth columns, the layout elements occupying the grid in the fifth column that have not been traversed are traversed in order of the number of rows occupied by the layout elements from small to large: the note card U12→the address book card U14→the calendar card U35; since there are no untraversed layout elements in the sixth column, the layout elements occupying the grid in the seventh column that have not been traversed are traversed in order of the number of rows occupied by the layout elements from small to large: the empty grid S05→the empty grid Grid S08; traverse the untraversed layout elements in the layout elements occupying the grid in the 8th column in the order of the number of rows occupied by the layout elements from small to large: free grid S06 → free grid S09; traverse the untraversed layout elements in the layout elements occupying the grid in the 9th column in the order of the number of rows occupied by the layout elements from small to large: free grid S01 → free grid S02 → free grid S03 → free grid S04 → free grid S07 → free grid S10; traverse the untraversed layout elements in the layout elements occupying the grid in the 10th column in the order of the number of rows occupied by the layout elements from small to large: video icon U21 → recorder icon U22 → mail icon U23 → calculator icon U24 → calendar icon U25 → music icon U26. At this point, the traversal of all layout elements of the desktop interface P6 is completed. Based on the above process, the layout order of the layout elements of the desktop interface P6 is ranked from 1 to 21 as follows: time card U11 → file card U13 → note card U12 → address book card U14 → calendar card U35 → empty grid S05 → empty grid S08 → empty grid S06 → empty grid S09 → empty grid S01 → empty grid S02 → empty grid S03 → empty grid S04 → empty grid S07 → empty grid S10 → video icon U21 → recorder icon U22 → email icon U23 → calculator icon U24 → calendar icon U25 → music icon U26.
[0182] The sixth layout element traversal mode takes the lower left corner grid as the traversal starting point, and traverses the layout elements in the order of columns first and rows later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the first column in the order of the number of rows occupied by the layout elements from large to small, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the second column in the order of the number of rows occupied by the layout elements from large to small, and so on, until all the layout elements are traversed.
[0183] refer to Fig.11GBased on the sixth layout element traversal method, the tablet computer 10 can traverse each layout element in the order of columns first and rows later, with the lower left corner as the traversal starting point. The specific process is not repeated here. Based on the sixth layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: file card U13 → time card U11 → calendar card U35 → address book card U14 → note card U12 → empty grid S08 → empty grid S05 → empty grid S09 → empty grid S06 → empty grid S10 → empty grid S07 → empty grid S04 → empty grid S03 → empty grid S02 → empty grid S01 → music icon U26 → calendar icon U25 → calculator icon U24 → mail icon U23 → recorder icon U22 → video icon U21.
[0184] The seventh layout element traversal mode takes the upper right corner grid as the traversal starting point, and traverses the layout elements in the order of columns first and rows later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the nth column in the order of the number of rows occupied by the layout elements from small to large, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the n-1th column in the order of the number of rows occupied by the layout elements from small to large, and so on, until all the layout elements are traversed.
[0185] refer to Fig.11H Based on the seventh layout element traversal method, the tablet computer 10 can traverse each layout element in the order of columns first and rows later, with the upper right corner as the traversal starting point. The specific process is not repeated here. Based on the seventh layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: video icon U21 → recorder icon U22 → mail icon U23 → calculator icon U24 → calendar icon U25 → music icon U26 → free grid S01 → free grid S02 → free grid S03 → free grid S04 → free grid S07 → free grid S10 → note card U12 → address book card U14 → free grid S06 → free grid S09 → free grid S05 → free grid S08 → calendar card U35 → time card U11 → file card U13.
[0186] In the eighth layout element traversal mode, the grid at the lower right corner of the grid is used as the traversal starting point, and the layout elements are traversed in the order of columns first and rows later. The tablet computer 10 may first traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the nth column in the order of the number of rows occupied by the layout elements from large to small, and then traverse the layout elements that have not been traversed among the layout elements that occupy the grid in the n-1th column in the order of the number of rows occupied by the layout elements from large to small, and so on, until all the layout elements are traversed.
[0187] refer to Fig.11IBased on the eighth layout element traversal method, the tablet computer 10 can traverse each layout element in the order of columns first and rows later, with the lower left corner as the traversal starting point. The specific process is not repeated here. Based on the eighth layout element traversal method, the layout order of the layout elements of the desktop interface P6 is arranged from 1 to 21 as follows: music icon U26 → calendar icon U25 → calculator icon U24 → mail icon U23 → recorder icon U22 → video icon U21 → empty grid S10 → empty grid S07 → empty grid S04 → empty grid S03 → empty grid S02 → empty grid S01 → empty grid S09 → empty grid S06 → address book card U14 → note card U12 → empty grid S08 → empty grid S05 → calendar card U35 → file card U13 → time card U11.
[0188] It should be noted that, in other embodiments, the layout element traversal method may also be other methods, which are not limited here.
[0189] After traversing the sorting grid of layout elements in the third desktop interface based on any one of the first to eighth layout element traversal methods, a layout order corresponding to each layout element can be obtained, wherein the earlier a layout element is traversed, the higher the layout order of the layout element.
[0190] After obtaining the layout order of the layout elements of the third desktop interface, the tablet computer 10 can use the traversal starting point corresponding to each layout element traversal method as the layout starting point, and layout the layout elements of the third desktop interface in the grid of the second desktop interface according to the layout order of each layout element. When laying out a layout element, the layout element is always laid out in the free grid area of the grid of the second desktop interface that has the same grid size as the layout element, and in the grid area that is first traversed according to the corresponding layout element traversal method.
[0191] For ease of description, the technical solution of the present application is introduced below by taking the grid traversal method as the aforementioned first layout element traversal method as an example.
[0192] For example, for the aforementioned desktop interface P6 (as the third desktop interface), the layout order of the layout elements may be as follows: time card U11 → note card U12 → empty grid S01 → video icon U21 → empty grid S02 → recorder icon U22 → file card U13 → address book card U14 → empty grid S03 → mail icon U23 → empty grid S04 → calculator icon U24 → calendar card U35 → empty grid S05 → empty grid S06 → empty grid S07 → calendar icon U25 → empty grid S08 → empty grid S09 → empty grid S10 → music icon U26. Fig.12, the tablet computer 10 can start layout from the traversal starting point of the first layout element traversal method. For example, the tablet computer 10 can layout the time card U11 (layout order is 1) in a 2×4 grid area with a grid coordinate of (1, 1) in the upper left corner of the 10×6 grid. After laying out the time card U11, the tablet computer 10 can determine the free grid area with the same grid size as the note card U12 (layout order is 2), and the first grid area traversed according to the first layout element traversal method (with the upper left corner as the traversal starting point, first row and then column) is a 2×4 grid area with a grid coordinate of (1, 3) in the upper left corner, and layout the note card U12 in the grid area D1. Similarly, the tablet computer 10 can sequentially layout the free grid S01, the video icon U21, the free grid S02, and the recorder icon U22 (the layout order is 3, 4, 5, 6 respectively) in the grids with grid coordinates of (5, 1), (6, 1), (5, 2), and (6, 2), respectively, layout the file card U13 (the layout order is 7) in the 4×4 grid area with grid coordinates (1, 5) in the upper left corner of the 10×6 grid, layout the address book card U14 (the layout order is 8) in the 2×4 grid area with grid coordinates (1, 9) in the upper left corner of the 10×6 grid, layout the free grid S03, the email icon U23, the free grid S04, and the calculator icon U24 (the layout order is 1 9, 10, 11, 12) are respectively arranged in the grids with grid coordinates of (5, 3), (5, 4), (6, 2) and (6, 4), the calendar card U35 (layout order is 13) is arranged in the 2×2 grid area with grid coordinates (5, 5) in the upper left corner of the 10×6 grid, and the empty grid S05, empty grid S06, empty grid S07, calendar icon U25, empty grid S08, empty grid S09, empty grid S10 and music icon U26 (layout order is 14, ~ 21 respectively) are arranged in the grids with grid coordinates of (5, 7), (6, 7), (5, 8), (6, 8), (5, 59), (6, 9), (5, 10) and (6, 10). In this way, the layout of the display elements in the desktop interface P8 is similar to that in the desktop interface P6, which can make it easier for users to find the display elements that need to perform related operations in the desktop interface P8.
[0193] The following describes a scheme in which the tablet computer 10 determines the layout order of each layout element based on the first layout element traversal method, and arranges each display element into a grid of the second desktop interface according to the layout order of each layout element.
[0194] Exemplarily, since the traversal starting point of the first layout element traversal method is the upper left corner of the grid, and the order is rows first and columns later, the tablet computer 10 can establish a coordinate system XOY with the traversal starting point of the first layout element traversal method (the upper left corner of the grid) as the origin, the row direction (the rows are traversed first in the row and column order) as the X-axis (since the number of columns in the first layout element traversal method is from small to large, the positive direction of the X-axis is from the left side of the display interface to the right side of the display interface), and the column direction (the columns are traversed later in the row and column order) as the Y-axis (since the number of rows in the first layout element traversal method is from small to large, the positive direction of the Y-axis is from the top of the display interface to the bottom of the display interface), and use the coordinates of the upper left corner grid of the layout element (the same as the position of the traversal starting point of the first layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system as the coordinates of the layout element in the coordinate system XOY (hereinafter referred to as coordinate system coordinates). Secondly, the tablet computer 10 can traverse each layout element according to the order of the Y coordinate value of the coordinate system of each layout element from small to large, and in the process of traversing the layout elements with the same Y coordinate value, traverse according to the X coordinate value of the coordinate system of the layout elements from small to large. During the traversal process, the tablet computer 10 can determine the layout order of each layout element according to the order in which each layout element is traversed, wherein the earlier the layout element is traversed, the higher the layout order.
[0195] For example, refer to Fig.13A , the third desktop interface with a grid division method of 4×6 grids includes layout elements A1 to A13. The grid size of layout element A1, layout element A3, layout element A5, layout element A10, layout element A12, and layout element A13 is 1×1 (the upper left corner grid is the grid where they are located), and the coordinates of the grid where they are located in the coordinate system XOY are the coordinates of the coordinate system of this part of the layout elements. The grid size of layout element A2, layout element A4, layout element A6, layout element A7, layout element A8, layout element A9, and layout element A11 are all greater than 1×1, and the coordinates of the upper left corner grid in the multiple grids occupied by each of them in XOY are used as their respective coordinate system coordinates. Thus, the coordinates of the layout elements A1 to A13 are (1, 1), (1, 2), (1, 4), (2, 1), (2, 3), (2, 4), (4, 1), (3, 3), (4, 4), (5, 1), (5, 2), (6, 1), and (6, 4), respectively.
[0196] Furthermore, the layout elements with a Y coordinate of 1 are layout element A1, layout element A4, layout element A7, layout element A10, and layout element A12 in order from small to large in X coordinates; the layout elements with a Y coordinate of 2 are layout element A2 and layout element A11 in order from small to large in X coordinates; the layout elements with a Y coordinate of 3 are layout element A5 and layout element A8 in order from small to large in X coordinates; the layout elements with a Y coordinate of 4 are layout element A3, layout element A6, layout element A9, and layout element A13 in order from small to large in X coordinates. Based on the above process, the layout order of layout elements A1 to A13 in reference Figure 13 is layout element A1, layout element A4, layout element A7, layout element A10, layout element A12, layout element A2, layout element A5, layout element A8, layout element A11, layout element A3, layout element A6, layout element A9, and layout element A13, that is, the layout order of layout elements A1 to A13 is 1, 6, 10, 2, 8, 11, 3, 9, 12, 4, 7, 5, 13 respectively.
[0197] Then, the tablet computer 10 can sequentially layout the layout elements A1 to A13 in the second desktop interface with a grid division method of 6×4 grids based on the layout order of the layout elements A1 to A13. During the layout process, a coordinate system XOY can be established with the upper left corner of the 6×4 grid as the origin in the same manner as the third desktop interface, and each layout element can be laid out in a free grid area with the same grid size as the layout element in the 6×4 grid, a free grid area with the smallest Y coordinate of the upper left corner grid, and a free grid area with the smallest X coordinate (that is, the free grid area that is first traversed in the order of rows and columns with the upper left corner grid as the traversal starting point).
[0198] refer to Fig. 13BThe tablet computer 10 may sequentially place the layout element A1 in the grid of the first row and the first column, place the layout element A4 (layout order is 2) in the 4×4 grid area with the coordinate system coordinates of the upper left grid being (2, 1), place the layout element A7 (layout order is 3) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A10 (layout order is 4) in the grid with the coordinate system coordinates of (1, 2), place the layout element A12 (layout order is 5) in the grid with the coordinate system coordinates of (1, 3), place the layout element A2 (layout order is 6) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (2, 3), place the layout element A11 (layout order is 7) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A12 (layout order is 5) in the grid with the coordinate system coordinates of (1, 3), place the layout element A13 (layout order is 6) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (2, 3), place the layout element A14 (layout order is 7) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A15 (layout order is 7) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A16 (layout order is 7) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A17 (layout order is 7) in the 2×1 grid area with the coordinate system coordinates of the upper left grid being (4, 1), place the layout element A18 (layout order is 7) in the 2×1 grid area with the The layout element A5 (layout order is 8) is placed in the 4×4 grid area with coordinate system coordinates (3, 3), the layout element A5 (layout order is 8) is placed in the grid with coordinate system coordinates (1, 4), the layout element A8 (layout order is 9) is placed in the 1×2 grid area with coordinate system coordinates (1, 5) of the upper left grid, the layout element A3 (layout order is 10) is placed in the grid with coordinate system coordinates (3, 5), the layout element A6 (layout order is 11) is placed in the 1×2 grid area with coordinate system coordinates (1, 6) of the upper left grid, the layout element A9 (layout order is 12) is placed in the 1×2 grid area with coordinate system coordinates (3, 6) of the upper left grid, and the layout element A13 (layout order is 13) is placed in the grid with coordinate system coordinates (4, 5).
[0199] based on Fig.13A and Fig. 13B It can be seen that layout elements A1, A4, A10 and A7 are close to each other in the desktop interface before and after the display direction is changed; layout elements A3, A6, A8, A9 and A13 are close to each other in the desktop interface before and after the display direction is changed. In other words, the desktop interface after the display direction is changed retains part of the layout of the desktop interface before the display direction is changed, which is conducive to the user to quickly find the layout elements that need to be operated.
[0200] Similarly, for the second layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the second layout element traversal method (the lower left corner of the grid) as the origin, the row direction (traversing the rows first) as the X-axis (since the number of columns in the second layout element traversal method is from small to large, the positive direction of the X-axis is from the left side of the display interface to the right side of the display interface), and the column direction (traversing the columns later) as the Y-axis (since the number of rows in the second layout element traversal method is from large to small, the positive direction of the Y-axis is from the bottom of the display interface to the top of the display interface), and use the coordinates of the lower left corner grid of the layout element (the same as the position of the traversal starting point of the second layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system as the coordinate system coordinates of the layout element.
[0201] For the third layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the third layout element traversal method (the upper right corner of the grid) as the origin, the row direction (traversing the rows first) as the X-axis (since the number of columns in the third layout element traversal method is from large to small, the positive direction of the X-axis is from the right side of the display interface to the left side of the display interface), and the column direction (traversing the columns later) as the Y-axis (since the number of rows in the third layout element traversal method is from small to large, the positive direction of the Y-axis is from the top of the display interface to the bottom of the display interface), and use the coordinates of the upper right corner grid of the layout element (the same as the position of the traversal starting point of the third layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system as the coordinate system coordinates of the layout element.
[0202] For the fourth layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the fourth layout element traversal method (the lower right corner of the grid) as the origin, the row direction (traversing the rows first) as the X-axis (since the number of columns in the fourth layout element traversal method is from large to small, the positive direction of the X-axis is from the right side of the display interface to the left side of the display interface), and the column direction (traversing the columns later) as the Y-axis (since the number of rows in the fourth layout element traversal method is from large to small, the positive direction of the Y-axis is from the bottom of the display interface to the top of the display interface), and the coordinates of the lower right corner grid of the layout element (the same as the position of the traversal starting point of the first layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system are used as the coordinate system coordinates of the layout element.
[0203] Correspondingly, for the second layout element traversal mode to the fourth layout element traversal mode, after the XOY coordinate system is established, the tablet computer 10 can traverse each layout element according to the order of the coordinate system coordinate Y coordinate value of each layout element from small to large, and in the process of traversing the layout elements with the same Y coordinate value, traverse according to the coordinate system coordinate X coordinate value of the layout element from small to large. During the traversal process, the tablet computer 10 can determine the layout order of each layout element according to the order in which each layout element is traversed, wherein the earlier the layout element is traversed, the higher the layout order. Then the tablet computer 10 can layout the layout elements in the grid of the second desktop interface in sequence according to the layout order of the layout elements. During the layout process, each layout element can be laid out in the free grid area with the same grid size as the layout element in the grid of the second desktop interface, the free grid area with the smallest Y coordinate and the free grid area with the smallest X coordinate in the grid corresponding to the traversal starting point (for example, corresponding to the fifth layout element traversal mode, the traversal starting point is the upper left corner, then it is the grid in the upper left corner of the free grid area).
[0204] For the fifth layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the fifth layout element traversal method (the upper left corner of the grid) as the origin, the column direction (traversing the columns first) as the X-axis (since the number of rows in the fifth layout element traversal method is from small to large, the positive direction of the X-axis is from the top of the display interface to the bottom of the display interface), and the row direction (traversing the rows later) as the Y-axis (since the number of columns in the fifth layout element traversal method is from small to large, the positive direction of the Y-axis is from the left side of the display interface to the right side of the display interface), and the coordinates of the upper left corner grid of the layout element (the same as the position of the traversal starting point of the fifth layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system are used as the coordinate system coordinates of the layout element.
[0205] Similarly, for the sixth layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the sixth layout element traversal method (the lower left corner of the grid) as the origin, the X-axis in the column direction (traversing the columns first) (since the number of rows in the fifth layout element traversal method is from large to small, the positive direction of the X-axis is from the bottom of the display interface to the top of the display interface), and the Y-axis in the row direction (traversing the rows later) (since the number of columns in the fifth layout element traversal method is from small to large, the positive direction of the Y-axis is from the left side of the display interface to the right side of the display interface), and use the coordinates of the lower left corner grid of the layout element (the same as the position of the traversal starting point of the sixth layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system as the coordinate system coordinates of the layout element.
[0206] For the seventh layout element traversal method, the tablet computer 10 can establish a coordinate system with the traversal starting point of the seventh layout element traversal method (the upper right corner of the grid) as the origin, the column direction (the columns are traversed first) as the X-axis (since the number of rows in the fifth layout element traversal method is from small to large, the positive direction of the X-axis is from the top of the display interface to the bottom of the display interface), and the row direction (the rows are traversed later) as the Y-axis (since the number of columns in the fifth layout element traversal method is from large to small, the positive direction of the Y-axis is from the right side of the display interface to the left side of the display interface), and the coordinates of the upper right corner grid of the layout element (the same as the position of the traversal starting point of the seventh layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system are used as the coordinate system coordinates of the layout element.
[0207] For the eighth layout element traversal method, the tablet computer 10 may establish a coordinate system with the traversal starting point (the lower right corner of the grid) of the eighth layout element traversal method as the origin, the X-axis in the column direction (traversing the columns first) (since the number of rows in the fifth layout element traversal method is from large to small, the positive direction of the X-axis is from the bottom of the display interface to the top of the display interface), and the Y-axis in the row direction (traversing the rows later) (since the number of columns in the fifth layout element traversal method is from large to small, the positive direction of the Y-axis is from the right side of the display interface to the left side of the display interface), and the coordinates of the sorted grid of the lower right corner grid of the layout element (the same as the position of the traversal starting point of the eighth layout element traversal method relative to the grid of the third desktop interface) in the XOY coordinate system are used as the coordinate system coordinates of the layout element.
[0208] Correspondingly, for the fifth layout element traversal mode to the eighth layout element traversal mode, after the XOY coordinate system is established, the tablet computer 10 can traverse each layout element in the order of the coordinate system coordinate Y coordinate value of each layout element from small to large, and in the process of traversing the layout elements with the same Y coordinate value, traverse according to the coordinate system coordinate X coordinate value of the layout element from small to large. During the traversal process, the tablet computer 10 can determine the layout order of each layout element according to the order in which each layout element is traversed, wherein the earlier the layout element is traversed, the higher the layout order. Then the tablet computer 10 can layout the layout elements in the grid of the second desktop interface in sequence according to the layout order of the layout elements. During the layout process, each layout element can be laid out in the free grid area of the grid of the second desktop interface with the same grid size as the layout element, the free grid area with the smallest Y coordinate and the free grid area with the smallest X coordinate of the grid corresponding to the traversal starting point (for example, corresponding to the fifth layout element traversal mode, the traversal starting point is the upper left corner, then it is the grid in the upper left corner of the free grid area).
[0209] Second layout method:
[0210] Compared to the first layout method, when traversing the grid in the third desktop interface, the tablet computer 10 may not follow the aforementioned first layout element traversal method to the eighth layout element traversal method, but may consider both the positional relationship of the layout elements and the size relationship of the grids occupied by the layout elements. In this way, when the display elements are laid out in the second desktop interface, the layout method of each display element in the third desktop interface can be retained more. In addition, when the tablet computer 10 lays out the display elements in the grid of the second desktop interface according to the layout order of each display element, it can also adjust the laid out display elements to retain more of the layout method of each display element in the third desktop interface.
[0211] In the second layout mode, the tablet computer 10 may first determine a sorting grid of each layout element (used to indicate a grid referring to each layout element during traversal of the layout elements), and determine a layout order of each layout element according to the sorting grid of each layout element and the positional relationship between each layout element. For example, if the traversal starting point is the upper left grid and the row and column order is row priority, or the traversal starting point is the lower right grid and the row and column order is column priority, the sorting grid of the display elements occupying multiple grids is the grid in the lower left corner of the multiple grids occupied by it; if the traversal starting point is the upper right grid and the row and column order is row priority, or the traversal starting point is the lower left grid and the row and column order is column priority, the sorting grid of the display elements occupying multiple grids is the grid in the lower right corner of the multiple grids occupied by it; if the traversal starting point is the lower left grid and the row and column order is row priority, or the traversal starting point is the upper right grid and the row and column order is column priority, the sorting grid of the display elements occupying multiple grids is the grid in the upper left corner of the multiple grids occupied by it; if the traversal starting point is the lower right grid and the row and column order is row priority, or the traversal starting point is the upper left grid and the row and column order is column priority, the sorting grid of the display elements occupying multiple grids is the grid in the upper right corner of the multiple grids occupied by it.
[0212] In some embodiments, row priority means traversing row by row according to the difference between the number of rows of each row grid and the number of rows of the traversal starting point from small to large. When traversing the layout elements occupying a row, traverse the columns by column according to the difference between the number of columns occupied by each layout element and the number of columns of the traversal starting point from small to large, and if the next untraversed layout element does not meet the line break condition, traverse the untraversed layout elements whose column number of the sorted grid is the same as the column number of the sorted grid of the next untraversed layout element and whose difference between the number of rows of the sorted grid and the number of rows of the traversal starting point is less than or equal to the difference between the number of rows of the row and the number of rows of the traversal starting point, and the layout element whose difference between the number of rows of the sorted grid and the number of rows of the traversal starting point is the smallest; if the next untraversed layout element meets the line break condition, then turn to traversing the untraversed layout elements occupying the next row. The line break condition may include: the next untraversed layout element in the row occupies the grid in the next row (the difference between the number of rows in the next row and the number of rows at the traversal starting point is greater than the difference between the number of rows in the row and the number of rows at the traversal starting point).
[0213] In some embodiments, column priority means traversing column by column according to the difference between the number of columns of each column grid and the number of columns of the traversal starting point from small to large. When traversing the layout elements occupying a certain column, traverse row by row according to the difference between the number of rows occupied by each layout element and the number of rows of the traversal starting point from small to large, and if the next untraversed layout element does not meet the column folding condition, traverse the untraversed layout elements whose row number of the sorted grid is the same as the row number of the sorted grid of the next untraversed layout element, and whose difference between the number of columns of the sorted grid and the number of columns of the traversal starting point is less than or equal to the difference between the number of columns of the column and the number of columns of the traversal starting point, and the layout element whose difference between the number of columns of the sorted grid and the number of columns of the traversal starting point is the smallest; if the next untraversed layout element meets the column folding condition, turn to traversing the untraversed layout element occupying the next column. The column folding condition may include: the next untraversed layout element in the column occupies the grid in the next column (the difference between the number of columns of the next column and the number of columns of the traversal starting point is greater than the difference between the number of columns of the column and the number of columns of the traversal starting point).
[0214] In some embodiments, the traversal of layout elements in the m×n grid may be in various forms:
[0215] The ninth layout element traversal method takes the upper left corner of the grid as the traversal starting point, and traverses the layout elements in a row-priority order. The tablet computer 10 traverses each layout element in the order of the 1st row to the mth row. In the process of traversing the layout elements occupying the i-th row, traverse in order from small to large according to the number of columns where the sorting grid of the layout elements is located. If the next untraversed layout element occupying the i-th row also occupies the grid in the i+1th row (equivalent to satisfying the line break condition), then turn to traversing the untraversed layout elements in the i+1th row; otherwise, traverse the untraversed layout elements whose sorting grid has the same number of columns as the sorting grid of the next untraversed layout element and whose sorting grid has a row number less than or equal to i, and the layout element with the smallest number of rows. After traversing the last layout element occupying the i-th row, traverse the untraversed layout elements occupying the i+1th row, and so on.
[0216] For example, refer to Fig.14A , the third desktop interface with a grid division method of 4×6 grid includes layout elements B1 to B11. The grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid sizes of layout elements B7 to B11 are all greater than 1×1, then the grid in the lower left corner of the grid occupied by each layout element is used as the sorting grid of each layout element. The grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 4), (3, 2), (3, 4), (5, 1), (5, 2). Based on this, the traversal process of layout elements B1 to B11 can include:
[0217] The tablet computer 10 may first traverse the layout elements occupying the first row according to the ninth layout element traversal method. Since the layout element B1 occupying the first row and the first column does not occupy the grid of the second row, the layout element B1 is traversed.
[0218] After traversing the layout element B1, since the next untraversed layout element B5 occupying the grid in the first row does not occupy the grid in the second row (does not meet the line break condition), the tablet computer 10 traverses the untraversed layout elements (layout element B5) whose sorted grid column number is the same as that of the sorted grid of the layout element B5 (the second column) and whose sorted grid row number is less than or equal to 1, and the layout element (layout element B5) whose sorted grid row number is the smallest;
[0219] After traversing the layout element B5, the next untraversed layout element B8 occupying the grid in the first row occupies the grid in the second row (satisfying the line break condition), and the tablet computer 10 turns to traversing the layout element occupying the grid in the second row. Since the next untraversed layout element B2 occupying the grid in the second row does not occupy the grid in the third row, the tablet computer 10 traverses the untraversed layout elements (layout element B2) whose sorted grid column number is the same as that of the sorted grid of layout element B2 (column 1) and whose sorted grid row number is less than or equal to 2, and the layout element (layout element B2) whose sorted grid row number is the smallest;
[0220] After traversing the layout element B2, since the next untraversed layout element B6 occupying the grid in the second row does not occupy the grid in the third row (does not meet the line break condition), the tablet computer 10 traverses the untraversed layout elements (layout element B6) whose sorted grid column number is the same as that of the sorted grid of the layout element B6 (the second column) and whose sorted grid row number is less than or equal to 2, and the layout element (layout element B6) whose sorted grid row number is the smallest;
[0221] After traversing layout element B6, since the next untraversed layout element B8 occupying the grid in the second row does not occupy the grid in the third row (does not meet the line break condition), the tablet computer 10 traverses the untraversed layout elements (layout element B8) whose sorted grid column number is the same as that of the sorted grid of layout element B8 (the third column) and whose sorted grid row number is less than or equal to 2, and the layout element with the smallest sorted grid row number (layout element B8).
[0222] After traversing layout element B8, since the next untraversed layout element B11 occupying the grid in the second row does not occupy the grid in the third row (does not meet the line break condition), the tablet computer 10 traverses the untraversed layout elements (layout element B10, layout element B11) whose sorted grid column number is the same as that of the sorted grid of layout element B11 (the fifth column) and whose sorted grid row number is less than or equal to 2, and the layout element with the smallest sorted grid row number (layout element B10).
[0223] After traversing the layout element B10, since the traversal of the layout elements occupying the first row is completed, the traversal proceeds to the untraversed layout elements occupying the second row. Since the next untraversed layout element B11 occupying the grid in the second row does not occupy the grid in the third row, the tablet computer 10 traverses the untraversed layout elements (layout element B11) whose sorted grid column number is the same as that of the sorted grid of the layout element B11 (the fifth column) and whose sorted grid row number is less than or equal to 2, and the layout element (layout element B11) whose sorted grid row number is the smallest.
[0224] After traversing the layout element B11, since the traversal of the layout elements occupying the second row is completed, the traversal turns to the untraversed layout elements occupying the third row. Since the next untraversed layout element B3 occupying the grid in the third row does not occupy the grid in the fourth row (does not meet the line break condition), the tablet computer 10 traverses the untraversed layout elements (layout element B3) whose sorted grid column number is the same as the sorted grid column number (first column) of the layout element B3 and whose sorted grid row number is less than or equal to 3, and the layout element (layout element B3) whose sorted grid row number is the smallest.
[0225] After traversing the layout element B3, since the next untraversed layout element B7 occupying the grid in the 3rd row occupies the grid in the 4th row (satisfying the line break condition), the tablet computer 10 turns to traversing the untraversed layout elements in the 4th row. Since the 4th row is the last row, there will be no layout element occupying the next row (no layout element satisfying the line break condition), and the tablet computer 10 can traverse the untraversed layout elements (layout element B4) whose sorted grid has the same column number (1st column) as the sorted grid of the next untraversed layout element B4 occupying the grid in the 4th row and whose sorted grid has a row number less than or equal to 4, and the layout element (layout element B4) whose sorted grid has the smallest row number.
[0226] After traversing the layout element B4, the tablet computer 10 may traverse the untraversed layout elements (layout element B7) whose sorting grid has the same column number as the column number (second column) of the next untraversed layout element B7 occupying the grid in the fourth row and whose sorting grid has a row number less than or equal to 4, and the layout element with the smallest sorting grid row number (layout element B7).
[0227] After traversing the layout element B7, the tablet computer 10 may traverse the layout element (layout element B9) with the smallest number of rows in the sorted grid among the untraversed layout elements (layout element B9) whose number of columns in the sorted grid is the same as the number of columns (column 3) of the next untraversed layout element B9 occupying the grid in the fourth row and whose number of rows in the sorted grid is less than or equal to 4. At this point, the traversal of the layout elements in the third desktop interface is completed.
[0228] Based on the above process, the layout order of layout element B1 to layout element B11 is layout element B1→layout element B5→layout element B2→layout element B6→layout element B8→layout element B10→layout element B11→layout element B3→layout element B4→layout element B7→layout element B9.
[0229] The tenth layout element traversal method takes the lower left corner of the grid as the traversal starting point, and traverses the layout elements in a row-first order. The tablet computer 10 traverses the sorting grids of each layout element in the order from the mth row to the 1st row. In the process of traversing the layout element occupying the i-th row, the sorting grids of the layout elements are traversed in order from small to large in terms of the number of columns. If the next untraversed layout element occupying the i-th row also occupies the grid in the i-1th row (equivalent to satisfying the line break condition), then turn to traversing the untraversed layout elements in the i-1th row; otherwise, traverse the layout element with the largest number of rows in the sorting grid among the untraversed layout elements whose number of columns is the same as that of the sorting grid of the next untraversed layout element and whose number of rows is greater than or equal to i. After traversing the last layout element occupying the i-th row, traverse the untraversed layout element occupying the i-1th row, and so on.
[0230] For example, refer to Fig. 14B ,for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid sizes of layout elements B7 to B11 are all greater than 1×1, and the grid in the upper left corner of the grid occupied by each is used as the sorting grid of each layout element. The grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3), (5, 1), (5, 2). Based on the tenth layout element traversal method, the layout order of layout elements B1 to B11 is layout element B4→layout element B3→layout element B7→layout element B9→layout element B2→layout element B6→layout element B1→layout element B5→layout element B8→layout element B11→layout element B10.
[0231] The eleventh layout element traversal method takes the upper right corner of the grid as the traversal starting point, and traverses the layout elements in a row-first order of rows and columns. The tablet computer 10 traverses the sorting grids of each layout element in the order of the 1st row to the mth row. In the process of traversing the layout element occupying the i-th row, the sorting grids of the layout elements are traversed in descending order of the number of columns. If the next untraversed layout element occupying the i-th row also occupies the grid in the i+1th row (equivalent to satisfying the line break condition), then turn to traversing the untraversed layout elements in the i+1th row; otherwise, traverse the untraversed layout elements whose sorting grids have the same number of columns as the sorting grid of the next untraversed layout element and whose sorting grids have a number of rows less than or equal to i, and the layout element whose sorting grid has the smallest number of rows. After traversing the last layout element occupying the i-th row, traverse the untraversed layout elements occupying the i+1th row, and so on.
[0232] For example, refer to Fig. 14C ,for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid sizes of layout elements B7 to B11 are all greater than 1×1, and the grid in the lower right corner of the grid occupied by each is used as the sorting grid of each layout element. The grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 4), (4, 2), (6, 4), (6, 1), (6, 2). Based on the eleventh layout element traversal method, the layout order of layout elements B1 to B11 is layout element B10→layout element B11→layout element B8→layout element B5→layout element B1→layout element B6→layout element B2→layout element B9→layout element B7→layout element B3→layout element B4.
[0233] The twelfth layout element traversal method takes the lower right corner of the grid as the traversal starting point and traverses in row-by-row order. The tablet computer 10 traverses the sorting grids of each layout element in the order from the mth row to the 1st row. In the process of traversing the layout element occupying the i-th row, the sorting grids of the layout elements are traversed in descending order according to the number of columns. If the next untraversed layout element occupying the i-th row also occupies the grid in the i-1th row (equivalent to satisfying the line break condition), then turn to traversing the untraversed layout elements in the i-1th row; otherwise, traverse the layout element with the largest number of rows in the sorting grid among the untraversed layout elements whose number of columns is the same as the number of columns in the sorting grid of the next untraversed layout element and whose number of rows is greater than or equal to i. After traversing the last layout element occupying the i-th row, traverse the untraversed layout element occupying the i-1th row, and so on.
[0234] For example, refer to Fig.14D ,for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid sizes of layout elements B7 to B11 are all greater than 1×1, and the grid in the upper right corner of the grid occupied by each is used as the sorting grid of each layout element. The grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (4, 1), (6, 3), (6, 1), (6, 2). Based on the twelfth layout element traversal method, the layout order of layout elements B1 to B11 is layout element B9→layout element B7→layout element B4→layout element B3→layout element B11→layout element B10→layout element B8→layout element B6→layout element B2→layout element B5→layout element B1.
[0235] The thirteenth layout element traversal method takes the upper left corner of the grid as the traversal starting point and traverses in the order of rows and columns with column priority. The tablet computer 10 traverses the sorting grids of each layout element in the order of the 1st column to the nth column. In the process of traversing the layout element occupying the i-th column, traverse in order from small to large in the order of the number of rows where the sorting grids of the layout elements are located. If the next untraversed layout element occupying the i-th column also occupies the grid in the i+1th column (equivalent to satisfying the column folding condition), then turn to traversing the untraversed layout elements in the i+1th column; otherwise, traverse the untraversed layout elements whose sorting grids have the same number of rows as the sorting grids of the next untraversed layout element and whose sorting grids have a number of columns less than or equal to i, and the layout element whose sorting grids have the smallest number of columns. After traversing the last layout element occupying the i-th column, traverse the untraversed layout elements occupying the i+1th column, and so on.
[0236] For example, for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid size of layout elements B7 to B11 is greater than 1×1, and the grid in the upper right corner of the grid occupied by each layout element is used as the sorting grid of each layout element. Fig.14D , the grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (4, 1), (6, 3), (6, 1), (6, 2). Based on the thirteenth layout element traversal method, the layout order of layout elements B1 to layout elements B11 is layout element B1→layout element B2→layout element B3→layout element B4→layout element B5→layout element B6→layout element B7→layout element B8→layout element B10→layout element B11→layout element B9.
[0237] The fourteenth layout element traversal method takes the upper right corner of the grid as the traversal starting point and traverses in a column-priority row and column order. The tablet computer 10 traverses the sorting grids of each layout element in the order from the nth column to the 1st column. In the process of traversing the layout element occupying the i-th column, the sorting grids of the layout elements are traversed in order from small to large in terms of the number of rows. If the next untraversed layout element occupying the i-th column also occupies the grid in the i-1th column (equivalent to satisfying the column folding condition), then turn to traversing the untraversed layout elements in the i-1th column; otherwise, traverse the layout element with the largest number of columns in the sorting grid among the untraversed layout elements whose sorting grids have the same number of rows as the sorting grid of the next untraversed layout element and whose sorting grids have a number of columns greater than or equal to i. After traversing the last layout element occupying the i-th column, traverse the untraversed layout elements occupying the i-1th column, and so on.
[0238] For example, for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid size of layout elements B7 to B11 is greater than 1×1, and the grid in the upper left corner of the grid occupied by each layout element is used as the sorting grid of each layout element. Fig. 14B , the grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (4, 1), (6, 3), (6, 1), (6, 2). Based on the fourteenth layout element traversal method, the layout order of layout elements B1 to B11 is layout element B10 → layout element B11 → layout element B8 → layout element B9 → layout element B5 → layout element B6 → layout element B7 → layout element B1 → layout element B2 → layout element B3 → layout element B4.
[0239] The fifteenth layout element traversal method takes the lower left corner of the grid as the traversal starting point and traverses in a column-priority row and column order. The tablet computer 10 traverses the sorting grids of each layout element in the order of the 1st column to the nth column. In the process of traversing the layout element occupying the i-th column, the sorting grids of the layout elements are traversed in descending order according to the number of rows. If the next untraversed layout element occupying the i-th column also occupies the grid in the i+1th column (equivalent to satisfying the column folding condition), then turn to traversing the untraversed layout elements in the i+1th column; otherwise, traverse the untraversed layout elements whose sorting grids have the same number of rows as the sorting grid of the next untraversed layout element and whose sorting grids have a number of columns less than or equal to i, and the layout element whose sorting grid has the smallest number of columns. After traversing the last layout element occupying the i-th column, traverse the untraversed layout elements occupying the i+1th column, and so on.
[0240] For example, for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid size of layout elements B7 to B11 is greater than 1×1, and the grid in the lower right corner of the grid occupied by each layout element is used as the sorting grid of each layout element. Fig. 14C , the grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (4, 1), (6, 3), (6, 1), (6, 2). Based on the fifteenth layout element traversal method, the layout order of layout elements B1 to B11 is layout element B4 → layout element B3 → layout element B2 → layout element B1 → layout element B7 → layout element B6 → layout element B5 → layout element B9 → layout element B8 → layout element B11 → layout element B10.
[0241] The sixteenth layout element traversal method takes the lower right corner of the grid as the traversal starting point and traverses in a column-priority row and column order. The tablet computer 10 traverses the sorting grids of each layout element in the order from the nth column to the 1st column. In the process of traversing the layout element occupying the i-th column, the sorting grids of the layout elements are traversed in descending order according to the number of rows. If the next untraversed layout element occupying the i-th column also occupies the grid in the i-1th column (equivalent to satisfying the column folding condition), then turn to traversing the untraversed layout elements in the i-1th column; otherwise, traverse the layout element with the largest number of columns in the sorting grid among the untraversed layout elements whose number of rows is the same as that of the sorting grid of the next untraversed layout element and whose number of columns is greater than or equal to i. After traversing the last layout element occupying the i-th column, traverse the untraversed layout elements occupying the i-1th column, and so on.
[0242] For example, for Fig.14A In the third desktop interface shown, the grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid occupied by each layout element as the sorting grid of each layout element. The grid size of layout elements B7 to B11 is greater than 1×1, and the grid in the lower left corner of the grid occupied by each layout element is used as the sorting grid of each layout element. Fig.14A , the grid coordinates of the sorting grids of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (4, 1), (6, 3), (6, 1), (6, 2). Based on the sixteenth layout element traversal method, the layout order of layout elements B1 to B11 is layout element B9 → layout element B11 → layout element B10 → layout element B8 → layout element B7 → layout element B6 → layout element B5 → layout element B4 → layout element B3 → layout element B2 → layout element B1.
[0243] After obtaining the layout order corresponding to each layout element based on any one of the above-mentioned ninth layout element traversal method to the sixteenth layout element traversal method, the tablet computer 10 can use the traversal starting point corresponding to each layout element traversal method as the layout starting point, and layout the layout elements of the third desktop interface in the grid of the second desktop interface according to the layout order of each layout element. Wherein, when laying out a layout element, if there are multiple layout elements that meet the squeeze and shift conditions among the layout elements that have been laid out in the grid of the second desktop, the layout element will be laid out after performing the squeeze and shift operation on the multiple layout elements; if there are no layout elements that meet the squeeze and shift conditions among the layout elements that have been laid out in the grid of the second desktop, the layout element will be laid out in the vacant grid area with the same grid size as the layout element in the grid of the second desktop, and in the grid area that is first traversed according to the corresponding layout element traversal method.
[0244] Among them, for the layout elements to be laid out with a grid size of p×q, the squeezing and shifting conditions may include:
[0245] For the ninth layout element traversal mode to the twelfth layout element traversal mode: after performing a squeeze-and-shift operation on multiple laid-out layout elements laid out in an r×s grid area, the multiple laid-out layout elements can be laid out in p-row grids in the grid of the second desktop interface at the same time as the layout elements to be laid out, and there are no empty grids in the p×t grid area (t is less than s) where the multiple laid-out layout elements are located, where t+p is less than or equal to the number of grid columns m of the second desktop interface. Furthermore, the squeeze-and-shift operation includes: laying out the multiple laid-out layout elements in the p×t grid area that is first traversed according to the corresponding layout element traversal mode.
[0246] For the thirteenth layout element traversal mode to the sixteenth layout element traversal mode: after performing a squeeze-and-shift operation on multiple laid-out layout elements laid out in the r×s grid area, the multiple laid-out layout elements can be laid out in the q-column grids of the grid of the second desktop interface at the same time as the layout element to be laid out, and there are no empty grids in the u×q grid area (u is less than r) where the multiple laid-out layout elements are located, wherein u+q is less than or equal to the number of grid rows n of the second desktop interface. Furthermore, the squeeze-and-shift operation includes: laying out the multiple laid-out layout elements in the u×q grid area of the p×t grid area that is first traversed according to the corresponding layout element traversal mode.
[0247] In some embodiments, corresponding to the ninth layout element traversal mode, the traversal starting point is the upper left corner, and the row-priority row and column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the smallest number of rows and the smallest number of columns where the upper left corner grid is located. Corresponding to the tenth layout element traversal mode, the traversal starting point is the lower left corner, and the row-priority row and column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the largest number of rows and the smallest number of columns where the lower left corner grid is located. Corresponding to the eleventh layout element traversal mode, the traversal starting point is the upper right corner, and the row-priority row and column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the smallest number of rows and the largest number of columns where the upper right corner grid is located. Corresponding to the twelfth layout element traversal mode, the traversal starting point is the lower right corner, and the row-priority row-column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the largest number of rows where the grid at the lower right corner is located and the grid area with the largest number of columns where the grid at the lower right corner is located. Corresponding to the thirteenth layout element traversal mode, the traversal starting point is the upper left corner, and the column-priority row-column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the smallest number of columns where the grid at the upper left corner is located and the grid area with the smallest number of rows where the grid at the upper left corner is located. Corresponding to the fourteenth layout element traversal mode, the traversal starting point is the upper right corner, and the column-priority row-column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the largest number of columns where the grid at the upper right corner is located and the grid area with the smallest number of rows where the grid at the upper right corner is located. Corresponding to the fifteenth layout element traversal mode, the traversal starting point is the lower left corner, and the column-priority row-column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the smallest number of columns where the grid at the lower left corner is located and the grid area with the largest number of rows where the grid at the lower left corner is located. Corresponding to the sixteenth layout element traversal mode, the traversal starting point is the lower right corner, and the column-priority row-column order is adopted. The first traversed grid area can be, among one or more grid areas, the grid area with the largest number of columns where the grid at the lower right corner is located and the grid area with the largest number of rows where the grid at the lower right corner is located.
[0248] The following describes a scheme in which the tablet computer 10 determines the layout order of the layout elements in the third desktop interface based on the ninth layout element traversal method, and layouts the display elements into the grid of the second desktop interface according to the layout order of the layout elements.
[0249] Exemplarily, since the traversal starting point of the ninth layout element traversal mode is the upper left corner of the grid, and row-priority row and column order traversal is adopted, the tablet computer 10 can establish a coordinate system XOY with the traversal starting point of the ninth layout element traversal mode (the upper left corner of the grid) as the origin, the row direction (row priority) as the X-axis (since the number of columns in the ninth layout element traversal mode is from small to large, the positive direction of the X-axis is from the left side of the display interface to the right side of the display interface), and the column direction (later traversed column) as the Y-axis (since the number of rows in the ninth layout element traversal mode is from small to large, the positive direction of the Y-axis is from the top of the display interface to the bottom of the display interface), and use the coordinates of the sorted grid of the layout elements in the XOY coordinate system as the coordinates of the layout elements in the coordinate system.
[0250] For example, refer to Fig.15A ,correspond Fig.14A In the third desktop interface shown, the layout elements include layout elements B1 to B11. The grid size of layout elements B1 to B6 is 1×1, and the tablet computer 10 can use the grid coordinates of the grids occupied by each layout element as the coordinates of each layout element in the coordinate system XOY. The grid sizes of layout elements B7 to B11 are all greater than 1×1, and the grids with the smallest X coordinate and the largest Y coordinate in the grids occupied by each layout element are used as the coordinates of each layout element in the coordinate system XOY (that is, the coordinates of the grid in the lower left corner of the grid occupied by each layout element in the coordinate system XOY). Based on this, the coordinate system coordinates of layout elements B1 to B11 are (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 4), (3, 2), (3, 4), (5, 1), (5, 2), respectively.
[0251] After determining the coordinate system coordinates of each layout element, the tablet computer 10 can traverse each layout element in the order of X coordinate first and Y coordinate second, starting from the coordinate system coordinate (1, 1). In the process of traversing the layout elements occupying the i-th row, the layout elements are traversed in the order of X coordinates from small to large. If the Y coordinate of the next untraversed layout element occupying the i-th row is greater than i, then traverse the untraversed layout elements in the i+1th row; otherwise, traverse the layout element with the smallest Y coordinate among the untraversed layout elements whose X coordinate is the same as the X coordinate of the next untraversed layout element and whose Y coordinate is less than or equal to i. After traversing the last layout element occupying the i-th row, traverse the untraversed layout elements occupying the i+1th row, and so on.
[0252] Specifically:
[0253] The tablet computer 10 may first traverse the layout elements occupying the first row. Since the Y coordinate (1) of the layout element B1 occupying the first row and the first column is equal to 1, the layout element B1 is traversed.
[0254] After traversing the layout element B1, since the next untraversed Y coordinate (1) of the grid in the first row is equal to 1, the tablet computer 10 traverses the untraversed layout elements (layout element B5) whose X coordinate is the same as the X coordinate (2) of the layout element B5 and whose Y coordinate is less than or equal to 1, and the layout element with the smallest Y coordinate (layout element B5);
[0255] After traversing the layout element B5, since the Y coordinate (2) of the next untraversed layout element B8 occupying the grid in the first row is greater than 1, the tablet computer 10 turns to traversing the layout elements occupying the grid in the second row. Since the Y coordinate (2) of the next untraversed layout element B2 occupying the grid in the second row is equal to 2, the tablet computer 10 traverses the layout element (layout element B2) with the smallest Y coordinate among the untraversed layout elements (layout element B2) whose X coordinate is the same as the X coordinate (1) of the layout element B2 and whose Y coordinate is less than or equal to 2;
[0256] After traversing the layout element B2, since the Y coordinate (2) of the next untraversed layout element B6 occupying the grid in the second row is equal to 2, the tablet computer 10 traverses the layout element (layout element B6) with the smallest Y coordinate among the untraversed layout elements (layout element B6) whose X coordinate is the same as the X coordinate (2) of the layout element B6 and whose Y coordinate is less than or equal to 2;
[0257] After traversing the layout element B6, since the Y coordinate (2) of the next untraversed layout element B8 occupying the grid in the second row is equal to 2, the tablet computer 10 traverses the layout element (layout element B8) with the smallest Y coordinate among the untraversed layout elements (layout element B8) whose X coordinate is the same as the X coordinate (3) of the layout element B8 and whose Y coordinate is less than or equal to 2.
[0258] After traversing layout element B8, since the Y coordinate (2) of the next untraversed layout element B11 occupying the grid in the second row is equal to 2, the tablet computer 10 traverses the untraversed layout elements (layout element B10, layout element B11) whose X coordinates are the same as the X coordinate (5) of layout element B11 and whose Y coordinates are less than or equal to 2, and finds the layout element with the smallest Y coordinate (layout element B10).
[0259] After traversing the layout element B10, since the traversal of the layout elements occupying the first row is completed, the traversal proceeds to the untraversed layout elements occupying the second row. Since the Y coordinate (2) of the next untraversed layout element B11 occupying the grid in the second row is equal to 2, the tablet computer 10 traverses the layout element (layout element B11) with the smallest Y coordinate among the untraversed layout elements (layout element B11) whose X coordinate is the same as the X coordinate (5) of the layout element B11 and whose Y coordinate is less than or equal to 2.
[0260] After traversing the layout element B11, since the traversal of the layout elements occupying the second row is completed, the traversal proceeds to the untraversed layout elements occupying the third row. Since the Y coordinate (3) of the next untraversed layout element B3 occupying the grid in the third row is equal to 3, the tablet computer 10 traverses the layout element (layout element B3) with the smallest Y coordinate among the untraversed layout elements (layout element B3) whose X coordinate is the same as the X coordinate (1) of the layout element B3 and whose Y coordinate is less than or equal to 3.
[0261] After traversing the layout element B3, since the Y coordinate (4) of the next untraversed layout element B7 occupying the grid in the third row is greater than 3, the tablet computer 10 turns to traversing the untraversed layout elements in the fourth row. Since the fourth row is the last row, there is no layout element with a Y coordinate greater than 4. The tablet computer 10 traverses the layout element with the smallest Y coordinate (layout element B4) among the untraversed layout elements (layout element B4) whose X coordinate is the same as the X coordinate (1) of the layout element B4 and whose Y coordinate is less than or equal to 4.
[0262] After traversing the layout element B4, the tablet computer 10 traverses the layout element (layout element B7) with the smallest Y coordinate among the untraversed layout elements (layout element B7) whose X coordinate is the same as the X coordinate (2) of the next untraversed layout element B7 in the 4th row and whose Y coordinate is less than or equal to 4.
[0263] After traversing the layout element B7, the tablet computer 10 traverses the layout element (layout element B9) with the smallest Y coordinate among the untraversed layout elements (layout element B9) whose X coordinate is the same as the X coordinate (3) of the next untraversed layout element B9 in the fourth row and whose Y coordinate is less than or equal to 4. At this point, the layout element traversal in the third desktop interface is completed.
[0264] Based on the above process, the layout order of layout element B1 to layout element B11 is layout element B1→layout element B5→layout element B2→layout element B6→layout element B8→layout element B10→layout element B11→layout element B3→layout element B4→layout element B7→layout element B9, that is, the layout order of layout element B1 to layout element B11 is 1, 3, 8, 9, 2, 4, 10, 5, 11, 6, 7 respectively.
[0265] Then, the tablet computer 10 can sequentially layout the layout elements B1 to B11 in the second desktop interface whose grid division method is 6×4 grid based on the layout order of the layout elements B1 to B11. In the layout process, the coordinate system XOY can be established in the same way as the third desktop interface. When laying out a layout element, if there are multiple layout elements that meet the squeeze and shift condition among the layout elements that have been laid out in the 6×4 grid, the layout element will be laid out after the squeeze and shift operation is performed on the multiple layout elements; if there is no layout element that meets the squeeze and shift condition among the layout elements that have been laid out in the 6×4 grid, the layout element will be laid out in the free grid area with the same grid size as the layout element in the 6×4 grid, and in the grid corresponding to the traversal starting point (for example, corresponding to the first layout element traversal method, the traversal starting point is the upper left corner, then it is the grid at the upper left corner of the free grid area) with the smallest Y coordinate and the smallest X coordinate.
[0266] refer to Fig. 15B , the tablet computer 10 can sequentially place layout element B1 (layout order is 1), layout element B5 (layout order is 2), layout element B2 (layout order is 3), and layout element B6 (layout order is 4) in the grids of row 1 and column 1 to row 1 and column 4, respectively. When placing layout element B8 (layout order is 5), the tablet computer 10 can detect that layout element B1, layout element B5, layout element B2, and layout element B6 meet the squeeze-shift condition (after placing layout element B1, layout element B5, layout element B2, and layout element B6 in a 2×2 grid area, layout element B1, layout element B5, layout element B2, layout element B6, and layout element B8 can be placed in two rows of grids at the same time). Then, the tablet computer 10 can perform a squeeze and move operation on the layout element B1, the layout element B5, the layout element B2 and the layout element B6, and layout the layout element B1, the layout element B5, the layout element B10 and the layout element B2 in the 2×2 grid area corresponding to the four grids of the 1st row and the 1st column, the 1st row and the 2nd column, the 2nd row and the 1st column, and the 2nd row and the 2nd column, and then layout the layout element B6 in the 2×2 grid area corresponding to the four grids of the 1st row and the 3rd column, the 1st row and the 4th column, the 2nd row and the 3rd column, and the 2nd row and the 4th column.
[0267] Secondly, the tablet computer 10 can sequentially place the layout element B10 (layout order is 6) in the 1×2 grid area with the grid coordinates of the upper left grid being (1, 3), place the layout element B11 (layout order is 7) in the 1×2 grid area with the grid coordinates of the upper left grid being (3, 3), place the layout element B3 (layout order is 8) in the grid with the grid coordinates of (1, 4), and place the layout element B4 (layout order is 9) in the grid with the grid coordinates of the upper left grid being (2, 4). When placing the layout element B7 (layout order is 10), the tablet computer 10 can detect that the layout elements B10, B11, B3, and B4 meet the squeeze-shift condition (after placing the layout elements B10, B11, B3, and B4 in the 2×3 grid area, the layout elements B10, B11, B3, B4, and B7 can be placed simultaneously in two rows of grids). Then, the tablet computer 10 may perform a squeeze-and-move operation on the layout element B10, the layout element B11, the layout element B3, and the layout element B4, keep the position of the layout element B10 unchanged, layout the layout element B11 in the 1×2 grid area with the grid coordinates of the upper left grid being (1, 4), layout element B3 and layout element B4 in the grids of the 3rd row and the 3rd column and the 4th row and the 3rd column, respectively. Then, the tablet computer 10 may layout the layout element B7 in the 2×1 grid area with the grid coordinates of the upper left grid being (4, 3).
[0268] Finally, the tablet computer 10 may sequentially layout the layout element B9 in a 2×4 grid area with a grid coordinate of (1, 5) in the upper left corner grid, and display the second desktop interface after the layout is completed.
[0269] Depend on Fig. 15B It can be seen that the relative positions of layout elements B1, B5, B2, B6 and B8 in the third desktop interface and the second desktop interface are the same, the relative positions of layout elements B10 and B11 in the third desktop interface and the second desktop interface are the same, and the relative positions of layout elements B3, B4 and B7 in the third desktop interface and the second desktop interface are the same. The second desktop interface retains the layout of at least some of the layout elements in the third desktop interface, which makes it easy for users to quickly find the layout elements that need to be operated.
[0270] The third layout method
[0271] In some scenarios, such as scenarios where the display elements in the third desktop interface are relatively complex, the aforementioned first layout method and / or the aforementioned second layout method may not be able to layout all the display elements in the third desktop interface in a second desktop interface. The tablet computer 10 can also use the third layout method to layout all the display elements in the third desktop in a second desktop interface.
[0272] Specifically, the tablet computer 10, based on the grid size of the display elements in the third desktop interface, takes a corner (upper left corner, lower left corner, upper right corner or lower right corner) of the grid of the second desktop interface as the layout starting point, and layouts the display elements in the grid of the second desktop interface in descending order of grid size. When laying out each display element, it is always laid out in the grid of the second desktop interface, in an empty grid area with the same grid size as the display element, in the grid area that is first traversed in a certain row and column order (row first, then column or column first, then row) with the layout starting point as the traversal starting point.
[0273] It should be understood that, for display elements with the same grid size, when the third layout manner is used to layout the display elements, the layout order of the display elements with the same grid size can be interchanged.
[0274] The third layout method is introduced below by taking the upper left corner grid of the grid of the second desktop interface as an example.
[0275] For example, refer to Fig.16The third desktop interface with a grid division method of 6×10 grids includes display elements C1 to C16, and the display elements C1 to C16 are display element C10, display element C14, display element C15, display element C5, display element C11, display element C13, display element C1, display element C2, display element C8, display element C9, display element C12, display element C16, display element C3, display element C4, display element C5, and display element C6 in order from large to small grid sizes. The tablet computer 10 can: arrange the display element C10 in a 4×4 grid area where the grid coordinates of the upper left corner grid in the second desktop interface of the 10×6 grid division method are (1, 1); arrange the display element C14 and the display element C15 in a 2×4 grid area where the grid coordinates of the upper left corner grid in the 10×6 grid are (1, 5) and (1, 7) respectively; arrange the display element C5, the display element C11 and the display element C13 in a 2×2 grid area where the grid coordinates of the upper left corner grid in the 10×6 grid are (5, 1), (5, 3) and (5, 5) respectively ; display element C1, display element C2, display element C8, display element C9, display element C12 and display element C16 are respectively arranged in the 1×2 grid area whose grid coordinates of the upper left corner grid in the 10×6 grid are (5, 7), (5, 8), (1, 9), (3, 9), (5, 9), (1, 10); display element C3, display element C4, display element C5 and display element C6 are respectively arranged in the grid whose grid coordinates of the upper left corner grid in the 10×6 grid are (3, 10), (4, 10), (5, 10), (6, 10).
[0276] In some embodiments, for Fig.16 In the case shown, the layout order of display elements with the same grid size can be interchanged. For example, the positions of display element C14 and display element C15 can be interchanged, the positions of display element C5, display element C11 and display element C13 can be interchanged, the positions of display element C1, display element C2, display element C8, display element C9, display element C12 and display element C16 can be interchanged, and the positions of display element C3, display element C4, display element C5 and display element C6 can be interchanged.
[0277] Based on the above-mentioned first layout mode, second layout mode and third layout mode, the layout modes preset in the tablet computer 10 may include any one or more of the aforementioned first layout modes, one or more of the aforementioned second layout modes and one or more of the aforementioned third layout modes. When it is detected that the display direction of the tablet computer 10 has changed, the tablet computer 10 may first layout the display elements in the third desktop interface using the second layout mode. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the second layout mode, the tablet computer 10 may layout the display elements in the third desktop interface based on the first layout mode. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the first layout mode, the tablet computer 10 may layout the display elements in the third desktop interface in the second desktop interface based on the third layout mode.
[0278] In some embodiments, the layout methods preset in the tablet computer 10 may include any one or more of the aforementioned first layout methods and one or more of the aforementioned third layout methods. When detecting that the display direction of the tablet computer 10 has changed, the tablet computer 10 may first layout the display elements in the third desktop interface using the first layout method. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the first layout method, the tablet computer 10 may lay out the display elements in the third desktop interface in the second desktop interface based on the third layout method.
[0279] In some embodiments, the layout methods preset in the tablet computer 10 may include any one or more of the aforementioned second layout methods and one or more of the aforementioned third layout methods. When detecting that the display direction of the tablet computer 10 has changed, the tablet computer 10 may first layout the display elements in the third desktop interface using the second layout method. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the second layout method, the tablet computer 10 may lay out the display elements in the third desktop interface in the second desktop interface based on the third layout method.
[0280] In some embodiments, the layout methods preset in the tablet computer 10 may include one or more of the aforementioned first layout method, second layout method, and third layout method. When a change in the display direction of the tablet computer 10 is detected, the tablet computer 10 may select different layout methods based on the complexity of the display elements in the currently displayed third desktop interface to layout the display elements in the third desktop interface to the second desktop interface. For example, when the complexity of the display elements in the second desktop interface is low, the first layout method or the second layout method is used to layout the display elements in the second desktop interface to the third desktop interface; when the complexity of the display elements in the second desktop interface is high, the third layout method is used to layout the display elements in the third desktop interface to the second desktop interface.
[0281] In some embodiments, the complexity of the display elements can be determined by the types of grid sizes of the display elements in the second desktop interface, the number of large-size display elements, etc. The more types of grid sizes of the display elements, the higher the complexity, and the more large-size display elements, the higher the complexity.
[0282] Based on the aforementioned first layout mode, second layout mode and third layout mode, in some embodiments, the layout mode preset in the tablet computer 10 may include one or more of the aforementioned first layout mode, second layout mode and third layout mode. After detecting the user's desktop modification operation, the target display element after the user's modification operation is performed is pre-layout based on the preset layout mode. If the target display element can be laid out in a second desktop interface by using any of the preset layout modes, it is determined that the target display element can be laid out in a second desktop interface, and the user's desktop modification operation is performed; otherwise, the user's desktop modification operation is not performed.
[0283] For example, the tablet computer 10 may preset one or more of the first layout modes and one or more of the third layout modes, or preset one or more of the second layout modes and one or more of the third layout modes, or preset one or more of the first layout modes, one or more of the second layout modes, and one or more of the third layout modes. After detecting the user's desktop modification operation, the tablet computer 10 may pre-layout the target display element after the user's modification operation is performed based on the third layout mode. If the target display element can be laid out in a second desktop interface using any of the third layout modes, it is determined that the target display element can be laid out in a second desktop interface, and the user's desktop modification operation is performed; otherwise, the user's desktop modification operation is not performed.
[0284] For another example, the tablet computer 10 may preset one or more of the first layout modes and one or more of the third layout modes, or preset one or more of the second layout modes and one or more of the third layout modes, or preset one or more of the first layout modes, one or more of the second layout modes, and one or more of the third layout modes. After detecting the user's desktop modification operation, the tablet computer 10 may pre-layout the target display elements after the user's modification operation is performed based on all preset layout modes. If the target display element can be laid out in a second desktop interface using any of the preset layout modes, it is determined that the target display element can be laid out in a second desktop interface, and the user's desktop modification operation is performed; otherwise, the user's desktop modification operation is not performed.
[0285] Based on the foregoing embodiments, an embodiment of the present application provides a display method.
[0286] For example, Fig.17 According to some embodiments of the present application, a flow chart of a display method is shown. The execution subject of the method is a tablet computer 10, such as Fig.17 As shown, the method comprises the following steps:
[0287] S1701: Display a first desktop interface, wherein a display direction of the first desktop interface is a first direction.
[0288] In some embodiments, the first direction may be Figure 2 Any display direction.
[0289] In some embodiments, the first desktop interface may include one or more display elements.
[0290] S1702: Detecting a first desktop modification operation of a user, and predicting whether a target display element can be fully displayed in a second desktop interface displayed in a second direction after the first desktop modification operation is performed.
[0291] In some embodiments, the first desktop modification operation is used to reduce the layout space for layout display elements in the first desktop interface (e.g., the empty grid in the grid of the first desktop interface). Exemplarily, the first desktop modification operation can be used to increase the first display element of the first size in the first desktop interface, for example Figure 4A The operation of adding a service card U33 or a service card U35 to the desktop interface P3 is shown; the first desktop modification operation can also be used to increase the size of the second display element in the first desktop interface by a first size, for example Figure 4C The operation of increasing the grid size of the address book card U14 is shown. In addition, the size of the free area in the first desktop interface is greater than or equal to the first size, and the second direction is perpendicular to the first direction.
[0292] When the tablet computer 10 detects a first desktop modification operation in which the user adds a first display element or increases the size of a second display element in the first desktop interface, it can predict whether the target display element can be fully displayed in a second desktop interface displayed in the second direction after the first desktop modification operation is performed. If it is predicted that the target display element can be fully displayed in a second desktop interface displayed in the second direction after the first desktop modification operation is performed, the process goes to step S1703; otherwise, the process goes to step S1704.
[0293] In some embodiments, for the case where the first desktop modification operation is to increase the size of a first display element of a first size in the first desktop interface, the target display elements include all display elements in the first desktop interface and the first display element; for the case where the first desktop modification operation is to increase the size of a second display element in the first desktop interface by the first size, the target display elements include the display elements in the first desktop interface except the second display element and the second display element after the size is increased.
[0294] In some embodiments, the tablet computer 10 can predict whether the target display element can be fully displayed in a second desktop interface displayed in the second direction after executing the first desktop modification operation by judging whether the first desktop modification operation satisfies the modification condition. Exemplarily, the modification condition can include any one of the aforementioned first conditions, or the target display element can be pre-layouted in a second desktop interface by any preset layout method.
[0295] In some embodiments, the first size may be a grid size. In some embodiments, the grid division method of the first desktop interface may be m×n, and the tablet computer 10 may predict whether the target display element can be fully displayed in a second desktop interface displayed in the second direction after executing the first desktop modification operation by determining whether the grid division method of the first desktop interface and the grid size of each target display element satisfy the aforementioned first condition. When it is determined that the grid division method of the first desktop interface and the grid size of each target display element satisfy the first condition, it indicates whether the target display element can be fully displayed in a second desktop interface displayed in the second direction, and goes to step S1703; otherwise, goes to step S1704. The specific content of the first condition can be referred to the aforementioned FIG. 4A to FIG. 10C The embodiments of the present invention are not described in detail here.
[0296] In some embodiments, the tablet computer 10 can also pre-layout the target display elements in the grid of the second desktop interface through a preset layout method. If the tablet computer 10 can pre-layout the target display elements in a second desktop interface through any preset layout method, it means that the target display elements can be fully displayed in a second desktop interface displayed in the second direction, and go to step S1703; otherwise, go to step S1704.
[0297] For example, if the preset layout mode includes one or more of the first layout mode and one or more of the third layout mode, or one or more of the second layout mode and one or more of the third layout mode, or one or more of the first layout mode, one or more of the second layout mode and one or more of the third layout mode. The tablet computer 10 can pre-layout the target display element after performing the first desktop modification operation based on the third layout mode. If any of the third layout modes can be used to layout the target display element in a second desktop interface, it is determined that the target display element can be laid out in a second desktop interface, and the process goes to step S1703; otherwise, the process goes to step S1704.
[0298] For another example, if the preset layout mode includes one or more of the first layout mode and one or more of the third layout mode, or one or more of the second layout mode and one or more of the third layout mode, or one or more of the first layout mode, one or more of the second layout mode and one or more of the third layout mode. The tablet computer 10 can pre-layout the target display element after performing the first desktop modification operation based on all preset layout modes. If the target display element can be laid out in a second desktop interface using any one of the third layout modes, it is determined that the target display element can be laid out in a second desktop interface, and the process goes to step S1703; otherwise, the process goes to step S1704.
[0299] In other embodiments, the tablet computer 10 may also predict whether the target display element can be fully displayed in a second desktop interface displayed in the second direction in other ways, which are not limited here.
[0300] S1703: corresponding to predicting that the target display element can be fully displayed in a second desktop interface, performing a first desktop modification operation, and displaying a third desktop interface after performing the first desktop modification operation.
[0301] The tablet computer 10 predicts that the target display element can be fully displayed in a second desktop interface, performs the first desktop modification operation, and displays a third desktop interface after the first desktop modification operation is performed.
[0302] For example, corresponding to the first desktop modification operation of adding a first display element of a first size to the first desktop interface, the tablet computer 10 may add the first display element to the first desktop interface to obtain a third desktop interface.
[0303] For another example, corresponding to the situation where the first desktop modification operation is to increase the size of the second display element of the first desktop interface by the first size, the tablet computer 10 may increase the size of the second display element by the first size to obtain a third desktop interface.
[0304] S1704: In response to predicting that the target display element cannot be fully displayed in one second desktop interface, the first desktop modification operation is not performed and the user is prompted.
[0305] When the tablet computer 10 predicts that the target display element cannot be fully displayed in one second desktop interface, the tablet computer 10 does not perform the first desktop modification operation and prompts the user.
[0306] Based on the above method, the tablet computer 10 can ensure that the desktop modification operation performed by the user will not cause the display elements in the desktop interface to be unable to be displayed in one desktop interface when the display direction changes, which is beneficial to improving the user experience.
[0307] The present application also provides a display method. Fig.17 In the method shown, the tablet computer 10 can select to execute or not execute the first desktop modification operation according to the user operation when predicting that the target display element cannot be fully displayed in a second desktop interface after executing the first desktop modification operation. The execution subject of the method is the tablet computer 10, such as Fig.18 As shown, the method comprises the following steps:
[0308] S1801: Display a first desktop interface, wherein a display direction of the first desktop interface is a first direction.
[0309] S1802: Detecting a first desktop modification operation of the user, and predicting whether a target display element can be fully displayed in a second desktop interface displayed in a second direction after the first desktop modification operation is performed.
[0310] In some embodiments, the first desktop modification operation may be an operation of adding a first display element of a first size to the first desktop interface, or an operation of increasing the size of a second display element in the first desktop interface by the first size, and the free area in the first desktop interface is greater than or equal to the first size.
[0311] When the tablet computer 10 detects a first desktop modification operation in which the user adds a first display element or increases the size of a second display element in the first desktop interface, it can predict whether the target display element can be fully displayed in a second desktop interface displayed in the second direction after the first desktop modification operation is performed. If it is predicted that the target display element can be fully displayed in a second desktop interface displayed in the second direction after the first desktop modification operation is performed, the process goes to step S1803; otherwise, the process goes to step S1804.
[0312] The specific manner in which the tablet computer 10 predicts whether the target display element can be fully displayed in a second desktop interface displayed in the second direction after executing the first desktop modification operation can be referred to the aforementioned step S1702, which will not be described in detail here.
[0313] S1803: corresponding to predicting that the target display element can be fully displayed in one second desktop interface, executing the first desktop modification operation, and displaying a third desktop interface after executing the first desktop modification operation.
[0314] The tablet computer 10 predicts that the target display element can be fully displayed in a second desktop interface, performs the first desktop modification operation, and displays a third desktop interface after the first desktop modification operation is performed. For details, please refer to the aforementioned step S1703, which will not be described in detail here.
[0315] S1804: corresponding to predicting that the target display element cannot be fully displayed in one second desktop interface, prompting the user that the target display element cannot be fully displayed in one second desktop interface.
[0316] When predicting that the target display element cannot be fully displayed in one second desktop interface, the tablet computer 10 prompts the user that the target display element cannot be fully displayed in one second desktop interface.
[0317] For example, for the aforementioned Figure 4A In the situation shown, after detecting the user's selection of the service card U33, the tablet computer 10 can predict that the target display element cannot be displayed in a second desktop interface. Fig.19A ,and Figure 4A The difference in the illustrated situation is that the tablet computer 10 may display a prompt control U43 to prompt the user that “the service card size is too large and may not be displayed after the interface is rotated.” The prompt control U43 may also include a “continue” option and a “return” option.
[0318] For example, for the aforementioned Figure 4CIn the illustrated scenario, after detecting that the user drags the control U41 to point D and releases it, the tablet computer 10 can predict that after the grid size of the address book card U14 is adjusted to 4×4, the target display element cannot be displayed in a second desktop interface. Fig.19B ,and Figure 4C The difference in the illustrated situation is that the tablet computer 10 may display a prompt control U44 to prompt the user that “the service card size is too large and may not be displayed after the interface is rotated.” The prompt control U44 may also include a “continue” option and a “return” option.
[0319] S1805: In response to detecting that the user confirms the operation of executing the first desktop modification operation, the first desktop modification operation is executed, and a third desktop interface after the execution of the first desktop modification operation is displayed.
[0320] For example, for Fig.19A In the situation shown in the figure, after detecting that the user selects the "Continue" option in the prompt control U43, the tablet computer 10 can detect that the user confirms the operation of performing the first desktop modification operation, adds the service card U33 to the desktop interface P3, and displays Fig.19C The desktop interface P9 is shown (as the third desktop interface).
[0321] For example, for Fig.19B In the situation shown in the figure, after detecting that the user selects the "Continue" option in the prompt control U44, the tablet computer 10 can detect that the user confirms the execution of the first desktop modification operation, adjusts the size of the address book card U14 to 4×4 to obtain the address book card U14′, and displays Fig.19D The desktop interface P10 shown includes an address book card U14 ′ (as a third desktop interface).
[0322] S1806: In response to detecting that the user confirms not to execute the first desktop modification operation, the first desktop modification operation is not executed.
[0323] For example, for Fig.19A In the situation shown, after detecting that the user selects the "return" option in the prompt control U43, the tablet computer 10 can detect that the user confirms not to perform the first desktop modification operation and redisplays the desktop interface P3.
[0324] Based on the above method, when the user's desktop modification operation causes the display direction to change and the display elements in the desktop interface cannot be displayed in one desktop interface, the user can be prompted and the user's desktop modification operation can be selected to be executed or not according to the user's operation. In this way, the user can be given more choices, which is conducive to improving the user experience.
[0325] For example, Fig. 20A According to some embodiments of the present application, a flow chart of a display method is shown. The execution subject of the method is a tablet computer 10, such as Fig. 20A As shown, the method comprises the following steps:
[0326] S2001, displaying a third desktop interface, wherein the display direction of the third desktop is the first direction.
[0327] In some embodiments, the display elements in the third desktop interface can be arranged in a desktop interface displayed in the second direction. For example, the third desktop interface can be based on Fig.17 The third desktop interface generated by the example shown (such as the aforementioned desktop interface P6), or Fig.18 In the illustrated embodiment, the third desktop interface is generated when the user chooses not to perform the first desktop modification operation. In this case, the grid division method of the third desktop interface and the display elements in the third desktop interface meet the aforementioned first condition, or the display elements in the third desktop interface can be arranged in a desktop interface displayed in the second direction based on a preset layout method.
[0328] In some embodiments, the display elements in the third desktop interface may not be arranged in a desktop interface displayed in the second direction. For example, the third desktop interface may be based on Fig.18 In the example shown, when the user confirms to execute the first desktop modification operation, a third desktop interface (such as the aforementioned desktop interface P9 and desktop interface P10) is generated.
[0329] In some embodiments, the first direction may be a length direction or a width direction.
[0330] S2002, detecting that the display direction of the tablet computer 10 is switched to a second direction, and laying out display elements in the third desktop interface in the second desktop interface based on a preset layout method, wherein the second direction is perpendicular to the first direction.
[0331] In some embodiments, the tablet computer 10 may be preset with one or more preset layout modes, and the display elements in the third interface may be arranged in the second desktop interface based on the one or more preset layout modes.
[0332] In some embodiments, if the first direction is the length direction (i.e., the tablet computer 10 is displayed in portrait mode), then the second direction is the width direction (i.e., the tablet computer 10 is displayed in landscape mode); if the first direction is the width direction (i.e., the tablet computer 10 is displayed in landscape mode), then the second direction is the length direction (i.e., the tablet computer 10 is displayed in portrait mode).
[0333] In some embodiments, the tablet computer 10 may obtain the posture of the tablet computer 10 to determine the display direction of the tablet computer 10. For example, when the direction of the gravity on the tablet computer 10 is along the width direction or the angle between the gravity on the tablet computer 10 and the width direction is less than a certain angle, the width direction is determined to be the display direction. For another example, when the direction of the gravity on the tablet computer 10 is along the length direction or the angle between the gravity on the tablet computer 10 and the length direction is less than a certain angle, the length direction is determined to be the display direction.
[0334] Exemplarily, any one or more of the aforementioned first layout modes, one or more of the aforementioned second layout modes, and one or more of the aforementioned third layout modes may be preset in the tablet computer 10. The tablet computer 10 may first layout the display elements in the third desktop interface using the second layout mode. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the second layout mode, the tablet computer 10 may layout the display elements in the third desktop interface based on the first layout mode. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the first layout mode, the tablet computer 10 may lay out the display elements in the third desktop interface in a second desktop interface based on the third layout mode. In this way, since the second layout mode can retain more relative positional relationships of the display elements in the third desktop interface than the first layout mode, and the first layout mode can retain more relative positional relationships of the display elements in the third desktop interface than the third layout mode, it can be ensured that the relative positional relationships of the display elements in the third desktop interface can be retained as much as possible in the re-layouted second desktop interface, which is conducive to users quickly finding display elements for performing related operations.
[0335] In some embodiments, if the third layout method also cannot arrange the display elements in the third desktop interface into a second desktop interface, the tablet computer 10 can determine the layout order of each display element through the second layout method, and arrange some of the display elements arranged in the front into the second desktop interface, and arrange the display elements that cannot be arranged in the second desktop interface into other desktop interfaces. In this way, the relative position relationship of the display elements in the third desktop interface can be retained as much as possible, which is conducive to the user to quickly find the display elements for performing related operations.
[0336] Exemplarily, one or more of the aforementioned first layout methods and one or more of the aforementioned third layout methods may be preset in the tablet computer 10. The tablet computer 10 may first layout the display elements in the third desktop interface using the first layout method. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the first layout method, the tablet computer 10 may layout the display elements in the third desktop interface in the second desktop interface based on the third layout method. In this way, since the first layout method can retain more relative positional relationships of the display elements in the third desktop interface than the third layout method, it can be ensured that the relative positional relationships of the display elements in the third desktop interface can be retained as much as possible in the re-layouted second desktop interface, which is beneficial for users to quickly find display elements for performing related operations.
[0337] In some embodiments, if the third layout method also cannot arrange the display elements in the third desktop interface into a second desktop interface, the tablet computer 10 can determine the layout order of each display element through the first layout method, and arrange some of the display elements arranged in the front into the second desktop interface, and arrange the display elements that cannot be arranged in the second desktop interface into other desktop interfaces. In this way, the relative position relationship of the display elements in the third desktop interface can be retained as much as possible, which is conducive to the user to quickly find the display elements for performing related operations.
[0338] For example, Fig. 20B A schematic diagram of a process of placing display elements in a third desktop interface into a second desktop interface based on a preset layout mode by a tablet computer 10 is shown. Fig. 20B As shown, the process includes the following steps:
[0339] S2002a, determining whether all display elements in the third desktop interface can be arranged in a second desktop interface by using the first layout method.
[0340] Exemplarily, the tablet computer 10 may pre-layout the display elements in the third desktop interface using the first layout method. If all the display elements in the third desktop interface can be pre-layouted in a second desktop interface, it means that all the display elements in the third desktop interface can be laid out in a second desktop interface using the first layout method, and the process proceeds to step S2002b; otherwise, it means that all the display elements in the third desktop interface cannot be laid out in a second desktop interface using the first layout method, and the process proceeds to step S2002c.
[0341] The tablet computer 10 may first pre-layout the display elements in the third desktop interface using the first layout method to determine whether all the display elements in the third desktop interface can be laid out in a second desktop interface using the first layout method.
[0342] S2002b: Layout all display elements in the third desktop interface on the second desktop interface using the first layout method.
[0343] When the tablet computer 10 can arrange all display elements in the third desktop interface in a second desktop interface by adopting the first layout method, the display elements in the third desktop interface are arranged in the second desktop interface by adopting the first layout method.
[0344] Since the first layout method can retain the relative position relationship of some display elements in the third desktop interface, it is helpful for the user to quickly find the display elements that need to perform related operations in the second desktop interface, which is helpful to improve the user experience.
[0345] S2002c: Layout all display elements in the third desktop interface on the second desktop interface using a third layout method.
[0346] When the tablet computer 10 cannot arrange all display elements in the third desktop interface in one second desktop interface by adopting the first layout method, the tablet computer 10 arranges the display elements in the third desktop interface in the second desktop interface by adopting the third layout method.
[0347] If the first layout method cannot layout all display elements in the third desktop interface in a second desktop interface, the display elements in the third desktop interface can be laid out in the second desktop interface based on the third layout method, which can ensure that the display elements in the third desktop interface are all displayed in the second desktop interface, avoiding moving the display elements to other desktop interfaces.
[0348] based on Fig. 20B In the process shown, when the display elements in the third desktop interface can be arranged in a second desktop interface by using the first layout method, since the first layout method can retain the relative position relationship of some display elements in the third desktop interface, it is beneficial for the user to quickly find the display elements that need to perform related operations in the second desktop interface, which is beneficial to improving the user experience.
[0349] For example, Fig. 20C The present invention shows a schematic diagram of a process of a tablet computer laying out display elements in a third desktop interface into a second desktop interface based on a preset layout method. Fig. 20B The illustrated embodiment can adapt to the situation where the display elements in the third desktop interface can or cannot be laid out on a second desktop.
[0350] like Fig. 20C As shown, the process includes the following steps:
[0351] S2002d: Determine whether all display elements in the third desktop interface can be arranged in a second desktop interface by using the first layout method.
[0352] Exemplarily, the tablet computer 10 may pre-layout the display elements in the third desktop interface using the first layout method. If all the display elements in the third desktop interface can be pre-layouted in a second desktop interface, it means that all the display elements in the third desktop interface can be laid out in a second desktop interface using the first layout method, and the process proceeds to step S2002e; otherwise, it means that all the display elements in the third desktop interface cannot be laid out in a second desktop interface using the first layout method, and the process proceeds to step S2002f.
[0353] S2002e: All display elements in the third desktop interface are arranged in the second desktop interface using the first layout method.
[0354] S2002f, determining whether all display elements in the third desktop interface can be arranged in a second desktop interface by using the third layout method.
[0355] Exemplarily, the tablet computer 10 may pre-layout the display elements in the third desktop interface using the first layout method. If all the display elements in the third desktop interface can be pre-layouted in a second desktop interface, it means that all the display elements in the third desktop interface can be laid out in a second desktop interface using the first layout method, and the process goes to step S2002h; otherwise, it means that all the display elements in the third desktop interface cannot be laid out in a second desktop interface using the first layout method, and the process goes to step S2002g.
[0356] S2002g: Layout some display elements in the third desktop interface on the second desktop interface using the first layout method.
[0357] The tablet computer 10 may determine the layout order of the display elements in the third desktop interface by using the first layout method, and then sequentially layout the display elements in the second desktop interface according to the layout order of the display elements. When there is no free space in the second desktop interface that can accommodate a display element (for example, the free grid area is smaller than the grid size of the display element), the display element and other display elements whose layout order follows the display element are laid out in other desktop interfaces.
[0358] In other embodiments, when neither the first layout mode nor the third layout mode can arrange all display elements in the third desktop interface in a second desktop interface, the third layout mode may be adopted to arrange some display elements in the third desktop interface in the second desktop interface according to the size order of each display element. When there is no free space in the second desktop interface to accommodate a display element (for example, the free grid area is smaller than the grid size of the display element), the display element and the display elements that have not been arranged are arranged in other desktop interfaces.
[0359] 2002h, all display elements in the third desktop interface are arranged on the second desktop interface using a third layout method.
[0360] based on Fig. 20C In the method shown, when the tablet computer 10 cannot arrange all the display elements in the third desktop interface in the second desktop interface in the first layout mode or the third layout mode, the tablet computer 10 can arrange some display elements in the third desktop interface in the second desktop interface in the first layout mode. In this way, the relative position relationship of some display elements arranged in the second desktop interface can be retained, which is conducive to the user to quickly find the display elements that need to be operated.
[0361] Exemplarily, one or more of the aforementioned second layout methods and one or more of the aforementioned third layout methods may be preset in the tablet computer 10. When a change in the display direction of the tablet computer 10 is detected, the tablet computer 10 may first layout the display elements in the third desktop interface using the second layout method. If the display elements in the third desktop interface cannot be laid out in a second desktop interface based on the second layout method, the tablet computer 10 may layout the display elements in the third desktop interface into the second desktop interface based on the third layout method. In this way, since the second layout method can retain more relative positional relationships of the display elements in the third desktop interface than the third layout method, it can be ensured that the relative positional relationships of the display elements in the third desktop interface can be retained as much as possible in the re-layouted second desktop interface, which is beneficial for users to quickly find display elements for performing related operations. For details, please refer to the aforementioned Fig. 20B The illustrated embodiments are not described in detail here.
[0362] In some embodiments, if the third layout method also cannot layout the display elements in the third desktop interface into a second desktop interface, the tablet computer 10 can determine the layout order of each display element through the second layout method, and layout some of the display elements that are laid out in the front into the second desktop interface, and layout the display elements that cannot be laid out in the second desktop interface into other desktop interfaces. In this way, the relative position relationship of the display elements in the third desktop interface can be retained as much as possible, which is conducive to the user to quickly find the display elements for performing related operations. For details, please refer to the aforementioned Fig. 20C The illustrated embodiments are not described in detail here.
[0363] Exemplarily, multiple layout modes (e.g., one or more of the aforementioned first layout modes, one or more of the second layout modes, and one or more of the third layout modes) may be preset in the tablet computer 10. When a change in the display direction of the tablet computer 10 is detected, the tablet computer 10 may select different layout modes based on the complexity of the display elements in the third desktop interface currently displayed to layout the display elements in the third desktop interface to the second desktop interface. For example, when the complexity of the display elements in the second desktop interface is low, the first layout mode or the second layout mode is used to layout the display elements in the second desktop interface to the third desktop interface; when the complexity of the display elements in the second desktop interface is high, the third layout mode is used to layout the display elements in the third desktop interface to the second desktop interface.
[0364] Exemplarily, the complexity of the display elements can be determined by the types of grid sizes of the display elements in the second desktop interface, the number of large-size display elements, etc. The more types of grid sizes of display elements, the higher the complexity, and the more large-size display elements, the higher the complexity.
[0365] S2003, displaying a second desktop interface, wherein a grid size of display elements in the second desktop interface in the second desktop interface is the same as a grid size in the third desktop interface.
[0366] After the display elements in the third desktop interface are laid out in the second desktop interface, the tablet computer 10 may display the second desktop interface.
[0367] Based on the above method, it can be ensured that the relative position relationship of the display elements in the third desktop interface can be retained as much as possible in the rearranged second desktop interface, which is conducive to the user to quickly find the display elements for performing related operations.
[0368] further, Fig.21 According to some embodiments of the present application, a structural schematic diagram of a tablet computer 10 is shown.
[0369] like Fig.21As shown, the tablet computer 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, and a display screen 194. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0370] The processor 110 may include one or more processing units, for example, the processor 110 may include a central processing unit (CPU), an AP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a microcontroller unit (MCU), a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), a field programmable gate array (FPGA), etc. In some embodiments, different processing units may be independent devices or integrated into one or more processors.
[0371] In some embodiments, the processor 110 may be configured to execute one or more programs / instructions corresponding to the display methods provided in the aforementioned embodiments.
[0372] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also supply power to the tablet computer 10 through the power management module 141 .
[0373] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
[0374] The wireless communication function of the tablet computer 10 can be implemented through the antenna 1, the wireless communication module 160, the modem processor and the baseband processor.
[0375] The antenna 1 is used to transmit and receive electromagnetic wave signals.
[0376] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity networks), Bluetooth (BT), global navigation satellite system (GNSS), near field communication (NFC), infrared (IR), etc., which are applied to the tablet computer 10. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 1, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 1.
[0377] The tablet computer 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0378] The display screen 194 is used to display images.
[0379] The camera 193 is used to capture still images or videos.
[0380] The external memory interface 120 can be used to connect an external memory card. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing application data of an application in the external memory card.
[0381] The internal memory 121 can be used to store one or more programs and corresponding data. The internal memory 121 may include a program storage area and a data storage area. In some embodiments, the program storage area may store an operating system, an application required for at least one function, etc., such as the program / instructions corresponding to the display method provided in the aforementioned embodiments. The data storage area may store data created during the use of the tablet computer 10, such as application data of an application program, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc. The processor 110 executes various functional applications of the tablet computer 10 by running one or more programs stored in the internal memory 121, and / or one or more programs stored in a memory provided in the processor 110.
[0382] The tablet computer 10 can implement audio functions, such as music playback, through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0383] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.
[0384] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.
[0385] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.
[0386] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0387] The earphone jack 170D is used to connect a wired earphone.
[0388] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The tablet computer 10 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the tablet computer 10 detects the intensity of the touch operation based on the pressure sensor 180A. The tablet computer 10 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
[0389] In some embodiments, the tablet computer 10 may determine whether the user displays the screen-off interface / lock screen interface based on the electrical signal detected by the pressure sensor 180A.
[0390] The air pressure sensor 180C may be used to detect the air pressure at the geographical location where the tablet computer 10 is located.
[0391] The acceleration sensor 180E can detect the magnitude of the acceleration of the tablet computer 10 in various directions (generally three axes). When the tablet computer 10 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180 can also be used to identify the posture of the tablet computer 10, and is applied to applications such as horizontal and vertical screen switching and pedometers. In some embodiments, the tablet computer 10 can determine whether the posture of the tablet computer 10 has changed based on the data collected by the acceleration sensor 180E, thereby determining whether the display direction of the tablet computer 10 has changed.
[0392] The ambient light sensor 180L is used to sense the ambient light brightness. The tablet computer 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the tablet computer 10 is in a pocket to prevent accidental touches.
[0393] The fingerprint sensor 180H is used to collect fingerprints. The tablet computer 10 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0394] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the tablet computer 10, which is different from the position of the display screen 194.
[0395] In some embodiments, the tablet computer 10 can interact with the user based on the data collected by the touch sensor 180K to detect the user's desktop modification operation, confirm the operation of executing or not executing the desktop modification operation, switch the display direction, etc.
[0396] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The tablet computer 10 may receive button inputs and generate key signal inputs related to user settings and function controls of the tablet computer 10.
[0397] The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, notifications, etc.
[0398] It is understood that the structure of the tablet computer 10 shown in the embodiment of the present application does not constitute a specific limitation on the tablet computer 10. In other embodiments of the present application, the tablet computer 10 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0399] It should be understood that in the embodiments of the present application, "or" describes the association relationship of associated objects, indicating that two relationships may exist. For example, A or B can represent: A exists alone, and B exists alone, where A and B can be singular or plural.
[0400] It should be understood that the term "connection" involved in the embodiments of the present application describes the connection relationship between two objects and can represent two connection relationships. For example, the connection between A and B can represent two situations: A is directly connected to B, and A is connected through C and B.
[0401] It should be understood that in the embodiments of the present application, "for example", "in some embodiments", "in another embodiment", "in another embodiment", "exemplarily" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word example is intended to present concepts in a concrete way.
[0402] It should be understood that the words "first", "second" and the like involved in the embodiments of the present application are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order. The words "equal to" involved in the embodiments of the present application can be used in conjunction with "greater than", and are applicable to the technical solutions adopted when "greater than" is used, and can also be used in conjunction with "less than", and are applicable to the technical solutions adopted when "less than" is used. It should be noted that when "equal to" is used in conjunction with "greater than", it cannot be used in conjunction with "less than"; when "equal to" is used in conjunction with "less than", it cannot be used in conjunction with "greater than".
[0403] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0404] It should be understood that in the examples and descriptions of this patent, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article, or device. In the absence of further restrictions, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.
Claims
1. A display method, applied to an electronic device, characterized in that: include: Displaying a first desktop interface in a first display direction of the electronic device, wherein a size of an empty display area in a display area for layout display elements in the first desktop interface is a first size; A first operation of a user is detected, wherein the first operation includes a modification operation on a first display element, and the modification operation is used to reduce the size of the vacant display area by a second size, and the second size is less than or equal to the first size; Corresponding to the first operation not satisfying the modification condition, the first operation is not performed.
2. The method according to claim 1, characterized in that: The grid of the display area for layout display elements in the first desktop interface includes a grid of m rows and n columns, where m and n are positive integers greater than 1 and m and n are different; and The first operation is an operation of adding the first display element in the grid of m rows and n columns, wherein the second size is less than or equal to the first size comprises: the grid size of the first display element is less than or equal to the size of an empty grid in the grid of m rows and n columns; Alternatively, the first display element is a display element in the first desktop interface, and the first operation is an operation of increasing the grid size of the first display element, wherein the second size is less than or equal to the first size includes: the size of the grid size of the first display element increased is less than or equal to the size of the free grid in the m-row and n-column grid.
3. The method according to claim 2, characterized in that The modification condition indicates that the target display element can be laid out in a second desktop interface displayed in a second display direction without adjusting the grid size of the target display element, wherein the grid for laying out the display area of the display element in the second desktop interface includes a grid of n rows and m columns, and the second display direction is perpendicular to the first display direction; and In the case where the first operation is an operation of increasing the size of the first display element, the target display element includes display elements other than the first display element among the display elements of the first desktop interface, and the first display element after the size is increased, In the case where the first operation is an operation of adding the first display element in the grid of m rows and n columns, the target display element includes a display element in the first desktop interface and the first display element.
4. The method according to claim 3, characterized in that The modification conditions include: Both m and n are integer multiples of 4; Alternatively, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; Alternatively, b and d are both 2, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c+8×e, where e is the minimum value of a and c; Or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column in the target display element is greater than or equal to an odd number of m and n; Alternatively, one of b and d is an odd number and the other is an even number, and both b and d are greater than or equal to 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid and the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column in the target display element is greater than or equal to an odd number among m and n; Alternatively, b and d are both odd numbers and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns in the target display element is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column in the target display element is greater than or equal to the maximum of m and n; Alternatively, b and d are both 3, the sum of the number of grids occupied by the display elements with a grid size larger than 2 rows and 4 columns in the target display element is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size larger than 1 row and 1 column in the target display element is greater than or equal to the maximum of m and n; Alternatively, all the target display elements can be laid out in the n-row and m-column grid by a preset layout method.
5. The method according to claim 3, characterized in that: The method further comprises: Corresponding to the first operation satisfying the modification condition, the first operation is executed, and a third desktop interface after executing the first operation is displayed, wherein the grid of the display area for laying out display elements in the third desktop interface includes a grid of m rows and n columns, and the target display element is laid out in the grid of m rows and n columns.
6. The method according to claim 5, characterized in that The method further comprises: detecting that the display direction of the electronic device is switched from the first display direction to the second display direction, laying out the target display element in an n-row and m-column grid of the second desktop interface, and displaying the laid-out second desktop interface in the second display direction, The grid size of the target display element in the second desktop interface is the same as the grid size in the third desktop interface.
7. The method according to claim 6, characterized in that The step of laying out the target display element in a grid of n rows and m columns on the second desktop interface includes: Corresponding to the situation where the grid size of the target display element is not adjusted, the target display elements can be all arranged in the n-row and m-column grid by using the first method, the target display elements are arranged in the n-row and m-column grid of the second desktop interface by using the first method; Correspondingly, when the grid size of the target display elements is not adjusted, the first method cannot layout all the target display elements in the n-row and m-column grid, and the second method is used to layout all the target display elements in the n-row and m-column grid of the second desktop interface.
8. The method according to claim 7, characterized in that The step of using the first method to lay out the target display element in a grid of n rows and m columns of the second desktop interface includes: Traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, and determining the layout order of each of the layout elements, wherein the layout elements that are traversed earlier have a higher layout order, and the layout elements include the target display element and the free grids in the m-row and n-column grid of the third desktop interface; According to the layout order of each of the layout elements, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, wherein any first layout element among the layout elements is laid out in: an idle grid area in the n-row and m-column grid of the second desktop interface having the same grid size as the first layout element, and an idle grid area that is first traversed according to the first traversal method; Among them, the first traversal method is to take the m-row and n-column grid of the second desktop interface or the grid of the first corner point of the n-row and m-column grid as the traversal starting point, and traverse in the first row and column order, the first corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the first row and column order is the order of rows first and then columns or the order of columns first and then rows.
9. The method according to claim 8, characterized in that The adopting the second method to layout all the target display elements in the n-row and m-column grid of the second desktop interface includes: The target display elements are sequentially laid out in the n-row and m-column grid of the second desktop interface in the order of the grid sizes of the target display elements from large to small, wherein any first target display element among the target display elements is laid out in: an idle grid area with the same grid size as the first target display element in the n-row and m-column grid of the second desktop interface, and an idle grid area that is first traversed in the second traversal mode; Among them, the second traversal method is to take the second corner point of the n-row and m-column grid of the second desktop interface as the traversal starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is the order of rows first and then columns or the order of columns first and then rows.
10. The method according to claim 7, characterized in that The step of using the first method to lay out the target display element in a grid of n rows and m columns of the second desktop interface includes: Traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the second traversal method, determining the layout order of each of the layout elements, wherein the layout elements that are traversed earlier have a higher layout order, and the layout elements include the target display element and free grids in the m-row and n-column grid of the third desktop interface; The second traversal method is: Taking the grid of the first row and the first column in the grid of m rows and n columns of the third desktop interface as the traversal starting point, traverse each layout element row by row in the order of the first row to the mth row, and when traversing the layout element occupying the i-th row, traverse each column by column from small to large according to the difference between the number of columns occupied by each layout element and the number of columns of the traversal starting point, where i is a positive integer less than or equal to m; While traversing the layout elements occupying the i-th row: Corresponding to the next untraversed second layout element occupying the i-th row, the grid in the i+1-th row is also occupied, and the untraversed layout elements in the i+1-th row are traversed. Corresponding to the grid in the (i+1)th row not occupied by the second layout element, the layout element with the smallest number of sorted grid rows among the untraversed layout elements whose sorted grids have the same number of columns as the sorted grid of the second layout element and whose sorted grids have a number of rows less than or equal to i is traversed; Wherein, the sorting grid is the grid in the upper left corner of the grid occupied by the corresponding display element; According to the layout order of each of the layout elements, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface.
11. The method according to claim 10, characterized in that The step of sequentially arranging the layout elements into an n-row and m-column grid of the second desktop interface according to the layout order of the layout elements includes: The third layout element with a grid size of p rows and q columns in the layout elements is laid out in the grid of n rows and m columns in the following manner, where p and q are positive integers: Corresponding to the fact that positions of at least some of the multiple laid out elements laid out in the r-row and s-column grid region can be laid out in the p-row and t-column grid region and occupy all grids of the p-row and t-column grid region after adjustment, the positions of the multiple laid out elements are adjusted so that the multiple laid out elements are laid out in the p-row and t-column grid region, and the third layout element is laid out in the remaining grid region of the p-row grid where the p-row and t-column grid region is located, r, s, t are positive integers, and p is greater than r, t is less than s, and the sum of q and t is less than m; Corresponding to the multiple laid out elements in the grid area of r rows and s columns that can be laid out in the grid area of p rows and t columns and occupy all grids in the grid area of p rows and t columns after their positions are adjusted, the third layout element is laid out in the grid of n rows and m columns, in an idle grid area with the same grid size as that of the third layout element, in the idle grid area that is first traversed in the order of starting from the 1st row and the 1st column and firstly the rows and then the columns.
12. The method according to any one of claims 1 to 11, characterized in that The display element includes at least one of an icon and a service card.
13. A display method, applied to an electronic device, characterized in that: include: Displaying a third desktop interface in a first display direction, wherein a grid in a display area for arranging display elements in the third desktop interface includes an m-row n-column grid, and a plurality of display elements are arranged in the m-row n-column grid; detecting that the display direction of the electronic device is switched from the first display direction to the second display direction; Corresponding to the situation where the grid size of the multiple display elements is not adjusted, the multiple display elements can be all arranged in the n-row and m-column grid by using the first method, the multiple display elements are arranged in the n-row and m-column grid of the second desktop interface by using the first method, and the second desktop interface is displayed in the second display direction; The step of arranging the plurality of display elements in the n-row and m-column grid of the second desktop interface by using the first method includes: Traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, determining the layout order of each of the layout elements, wherein the layout elements that are traversed earlier have a higher layout order, and the layout elements include the multiple display elements and the free grids in the m-row and n-column grid of the third desktop interface; According to the layout order of each of the layout elements, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, wherein any fourth layout element among the layout elements is laid out in: in the n-row and m-column grid of the second desktop interface, in at least one free grid area with the same grid size as that of the fourth layout element, the free grid area that is first traversed according to the first traversal method; Among them, the first traversal method is to take the grid of the first corner point of the m-row and n-column grid or the n-row and m-column grid as the starting point, and traverse in the first row and column order, the first corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the first row and column order is the order of rows first and then columns or the order of columns first and then rows.
14. The method according to claim 13, characterized in that The method further comprises: Corresponding to the situation where the grid size of the multiple display elements is not adjusted, the multiple display elements cannot be all arranged in the n-row and m-column grid by using the first method, the multiple display elements are arranged in the n-row and m-column grid of the second desktop interface by using the second method, and the second desktop interface is displayed; The method of using the second method to arrange all the multiple display elements in an n-row and m-column grid of the second desktop interface includes: The plurality of display elements are sequentially laid out in the n-row and m-column grid of the second desktop interface in the order of the grid sizes of the plurality of display elements from large to small, wherein any second display element among the plurality of display elements is laid out in: an idle grid area having the same grid size as the second display element in the n-row and m-column grid of the second desktop interface, and an idle grid area that is first traversed in accordance with the second traversal method; Among them, the second traversal method is to take the grid of the second corner point of the n-row and m-column grid as the starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is the order of rows first and then columns or the order of columns first and then rows.
15. The method according to claim 13 or 14, characterized in that The plurality of display elements and the m-row n-column grid satisfy the following conditions: Both m and n are integer multiples of 4; Alternatively, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements having a grid size greater than 2 rows and 4 columns among the plurality of display elements is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; Alternatively, b and d are both 2, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, where e is the minimum value of a and c; Or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements; Alternatively, one of b and d is an odd number and the other is an even number, and both b and d are greater than or equal to 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to an odd number among m and n; Alternatively, b and d are both odd numbers and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to the maximum of m and n; Alternatively, b and d are both 3, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid and the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to the maximum value of m and n.
16. The method according to claim 13, characterized in that The method further comprises: Corresponding to the situation where the grid size of the multiple display elements is not adjusted, the multiple display elements cannot all be laid out in the n-row and m-column grid by using the first method, traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the first traversal method, and determining the layout order of each of the layout elements; Multiple layout elements with a front layout order among the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface according to the corresponding layout order, wherein any fifth layout element among the multiple layout elements is laid out during layout in: at least one free grid area with the same grid size as that of the fifth layout element in the n-row and m-column grid of the second desktop interface, which is the free grid area that is first traversed according to the first traversal method.
17. The method according to any one of claims 13 to 16, characterized in that The display element includes at least one of an icon and a service card.
18. A display method, applied to an electronic device, characterized in that: include: Displaying a third desktop interface in the first display direction, wherein a grid of a display area of the third desktop interface for arranging display elements comprises an m-row n-column grid, and a plurality of display elements are arranged in the m-row n-column grid; detecting that the display direction of the electronic device is switched from the first display direction to the second display direction; Corresponding to the situation where the grid size of the multiple display elements is not adjusted, the multiple display elements can be all arranged in the n-row and m-column grid by using the first method, the multiple display elements are arranged in the n-row and m-column grid of the second desktop interface by using the first method, and the second desktop interface is displayed in the second display direction; The step of arranging the plurality of display elements in the n-row and m-column grid of the second desktop interface by using the first method includes: Traversing the layout elements in the m-row and n-column grid in the third desktop interface based on the second traversal method, determining the layout order of each of the layout elements, wherein the layout elements that are traversed earlier have a higher layout order, and the layout elements include the multiple display elements and the free grids in the m-row and n-column grid of the third desktop interface; The second traversal method is: Taking the grid of the first row and the first column in the grid of m rows and n columns of the third desktop interface as the starting point, traverse each layout element row by row in the order of the first row to the mth row, and when traversing the layout element occupying the i-th row, traverse the columns one by one from small to large according to the difference between the number of columns occupied by each layout element and the number of columns at the traversal starting point, where i is a positive integer less than or equal to m; While traversing the layout elements occupying the i-th row: If the next untraversed second layout element that occupies the i-th row also occupies the grid in the i+1-th row, then the untraversed layout elements in the i+1-th row are traversed. Corresponding to the grid in the (i+1)th row not occupied by the second layout element, the layout element with the smallest number of sorted grid rows among the untraversed layout elements whose sorted grids have the same number of columns as the sorted grid of the second layout element and whose sorted grids have a number of rows less than or equal to i is traversed; Wherein, the sorting grid is the grid in the upper left corner of the grid occupied by the corresponding display element; According to the layout order of each of the layout elements, the layout elements are sequentially laid out in the n-row and m-column grid of the second desktop interface, and a sixth layout element with a grid size of p rows and q columns among the layout elements is laid out in the n-row and m-column grid in the following manner, where p and q are positive integers: Corresponding to the multiple laid out elements that have been laid out in the grid area of r rows and s columns being able to be laid out in the grid area of p rows and t columns and occupying all grids of the grid area of p rows and t columns after their positions are adjusted, the positions of the multiple laid out elements are adjusted so that the multiple laid out elements are laid out in the grid area of p rows and t columns, and the sixth layout element is laid out in the free grid area of p rows of the grid where the grid area of p rows and t columns is located, r, s, and t are positive integers, and p is greater than r, t is less than s, and the sum of q and t is less than m; Corresponding to the fact that there are no multiple laid out elements laid out in the grid area of r rows and s columns that can be laid out in the grid area of p rows and t columns after the positions are adjusted and all the grids in the grid area of p rows and t columns are occupied, the sixth layout element is laid out in the grid of n rows and m columns, in an idle grid area with the same grid size as the sixth layout element, in the idle grid area that is first traversed in the order of starting from the 1st row and the 1st column and first the row and then the column.
19. The method according to claim 18, characterized in that The method further comprises: Corresponding to the situation where the grid size of the multiple display elements is not adjusted, the multiple display elements cannot be all arranged in the n-row and m-column grid by using the first method, the multiple display elements are arranged in the n-row and m-column grid of the second desktop interface by using the second method, and the second desktop interface is displayed; The step of arranging all of the plurality of display elements in a grid of n rows and m columns of the second desktop interface in a second manner includes: The plurality of display elements are sequentially laid out in the n-row and m-column grid of the second desktop interface in the order of the grid sizes of the plurality of display elements from large to small, wherein any third display element among the plurality of display elements is laid out in: an idle grid area of the n-row and m-column grid of the second desktop interface, which has the same grid size as the third display element, and an idle grid area that is first traversed in the second traversal manner; Among them, the second traversal method is to take the grid of the second corner point of the n-row and m-column grid as the starting point, and traverse in a second row and column order, the second corner point is the upper left corner, the lower left corner, the upper right corner or the lower right corner, and the second row and column order is the order of rows first and then columns or the order of columns first and then rows.
20. The method according to claim 18 or 19, characterized in that The plurality of display elements and the m-row n-column grid satisfy the following conditions: Both m and n are integer multiples of 4; Alternatively, a remainder b obtained by dividing m by 4 is different from a remainder d obtained by dividing n by 4, b and d are both even numbers, and the sum of the number of grids occupied by display elements having a grid size greater than 2 rows and 4 columns among the plurality of display elements is less than or equal to 16a×c, where a is (mb) / 4 and c is (nd) / 4; Alternatively, b and d are both 2, and the sum of the number of grids occupied by display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, where e is the minimum value of a and c; Or, one of b and d is an odd number and the other is an even number and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements; Alternatively, one of b and d is an odd number and the other is an even number, and both b and d are greater than or equal to 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to an odd number among m and n; Alternatively, b and d are both odd numbers and at least one of b and d is less than 2, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c, and the difference between the total number of grids in the m rows and n columns grid minus the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to the maximum of m and n; Alternatively, b and d are both 3, the sum of the number of grids occupied by the display elements with a grid size greater than 2 rows and 4 columns among the multiple display elements is less than or equal to 16a×c+8×e, and the difference between the total number of grids in the m rows and n columns grid and the sum of the number of grids occupied by the display elements with a grid size greater than 1 row and 1 column among the multiple display elements is greater than or equal to the maximum value of m and n.
21. The method according to any one of claims 18 to 20, characterized in that The display element includes at least one of an icon and a service card.
22. An electronic device, characterized in that: include: A memory for storing one or more programs; A processor, configured to execute the one or more programs so that the electronic device implements the display method according to any one of claims 1 to 21.
23. A readable storage medium, characterized in that: The readable storage medium includes one or more programs, and when the one or more programs are executed on an electronic device, the electronic device implements the display method described in any one of claims 1 to 21.
Citation Information
Cited By
Interface layout method and device
CN122019025A
Display method, readable storage medium, and electronic device
EP4776108A1
Display method, readable storage medium, and electronic device
WO2025256131A1
