Interface element moving method and related device

By exchanging the positions of interface elements on the foldable display screen, the cross-region movement of interface elements is achieved, which solves the problem of complicated operation steps in the prior art and improves the movement efficiency.

CN119828930APending Publication Date: 2025-04-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411699025.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, users need to move existing interface elements at the target position to other locations before they can move the target interface elements to the target position, resulting in cumbersome operation steps.

Method used

An interface element movement method is provided, allowing interface elements to move across regions between different display areas of a foldable display screen, and move by exchanging the positions of interface elements in the display area.

Benefits of technology

The operation steps of interface elements are simplified and the movement efficiency is improved. Even if there is not enough free position in the target display area, the successful movement of interface elements can be achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828930A_ABST
    Figure CN119828930A_ABST
Patent Text Reader

Abstract

The invention discloses an interface element moving method and a related device. The electronic equipment comprises a foldable display screen, the foldable display screen comprises a first display area and a second display area, and a first interface element is displayed at a first position of the second display area. And receiving and responding to an operation of moving the first interface element to a second position in the first display area by the user, and if one or more interface elements are displayed in the second position in the first layout and the second display area can accommodate and display the one or more interface elements. If yes, the electronic device displays the one or more interface elements in the second display area and displays the first interface element in the second position. Thus, even if there is no enough position on the first display area, one or more interface elements originally located at the second position can be displayed in the second display area, it is ensured that the first interface element is successfully moved in a cross-screen mode, the operation steps of a user are simplified, and the moving efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202310325688.X, and the original application date is March 22, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of electronic technology, and in particular to a method for moving an interface element and a related device. Background Art

[0003] With the continuous development of electronic technology, terminal devices with display screens are used more and more frequently in daily life, and the scenarios of interface elements (such as application icons, service cards, etc.) displayed on mobile display screens are also increasing.

[0004] When a user needs to move a target interface element displayed on a display screen from a starting position to a target position, if the target position is already occupied by an interface element, the user needs to move the existing interface element at the target position to another position before the target interface element can be moved to the target position. In this way, the operation steps for the user to move the interface element are cumbersome. Summary of the invention

[0005] The present application provides an interface element movement method and related devices, which realize the cross-region movement of interface elements and are easy to operate.

[0006] In a first aspect, the present application provides a method for moving an interface element, which is applied to an electronic device including a foldable display, wherein the foldable display includes a first display area and a second display area; the method includes: when the electronic device is in an unfolded form, displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, the second page including a first interface element, and the first interface element is at a first position in the second display area; receiving a first operation of a user on the first interface element, the first operation is used to move the first interface element to a second position in the first display area, the second position displaying one or more interface elements arranged in a first layout; in response to the first operation, displaying one or more interface elements arranged in the first layout at the first position, and displaying the first interface element at the second position.

[0007] In this way, even if there is not enough space in the first display area to display the first interface element, the electronic device can exchange the position of one or more interfaces arranged in the first layout in the first display area with the position of the first interface element in the second display area, thereby simplifying the operation steps and improving efficiency.

[0008] In a possible implementation manner, the method further includes: in response to the first operation, the first interface element moves along a trajectory of the first operation.

[0009] In a possible implementation, during the process in which the first interface element moves following the trajectory of the first operation, the method further includes: displaying an initial position prompt at the first position, where the initial position prompt is used to prompt the first position.

[0010] In a possible implementation manner, the method further includes: displaying movement tracks of one or more interface elements.

[0011] In this way, the movement track can also be displayed during the movement of the interface element, and the starting point, end point and movement track of the user interface element can be prompted.

[0012] In one possible implementation, before the electronic device is in the unfolded form, the method also includes: when the electronic device is in the folded form, displaying a first page in the first display area, and displaying a first interface or a black screen in the second display area, the first interface being different from the desktop.

[0013] In a possible implementation, the method further includes: when the electronic device is in a folded form, receiving a fifth operation from the user on the first display area; and displaying the second page in the first display area in response to the fifth operation.

[0014] In a possible implementation, the method further includes: when the electronic device is in the folded form, receiving a sixth operation from the user; and in response to the sixth operation, switching the electronic device from the folded form to the unfolded form.

[0015] In a possible implementation, the electronic device further includes another display screen, and the display screen includes a third display area; before the electronic device is in the unfolded form, the method further includes: when the electronic device is in the folded form, displaying the first page in the third display area.

[0016] In a possible implementation, the method further includes: when the electronic device is in a folded form, receiving a seventh operation from the user on the third display area; and displaying the second page in the first display area in response to the seventh operation.

[0017] In a possible implementation, the method further includes: when the electronic device is in the folded form, receiving an eighth operation from the user; and in response to the eighth operation, switching the electronic device from the folded form to the unfolded form.

[0018] In a second aspect, the present application provides another method for moving interface elements, which is applied to an electronic device including a foldable display, the foldable display including a first display area and a second display area; the method includes: when the electronic device is in an unfolded form, displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, the second page including a second interface element, and the second interface element is at a third position in the second display area; receiving a second operation of the user on the second interface element, the second operation is used to move the second interface element to a fourth position in the first display area, the fourth position displaying a portion of one or more interface elements arranged in a second layout; in response to the second operation, displaying one or more interface elements arranged in the second layout at a fifth position in the second display area, and displaying the second interface element at the fourth position.

[0019] In this way, the electronic device can display the one or more interface elements at the fourth position in other unoccupied positions of the second display area in the second layout.

[0020] The content of the second aspect can also be combined with any item in the first aspect.

[0021] In a third aspect, the present application provides a method for moving an interface element, which is applied to an electronic device including a foldable display, the foldable display including a first display area and a second display area; the method includes: when the electronic device is in an unfolded form, displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, the second page including a third interface element, and the third interface element is at a sixth position in the second display area; receiving a third operation of the user on the third interface element, the third operation is used to move the third interface element to a seventh position in the first display area, the seventh position displaying a portion of a fourth interface element and a fifth interface element arranged in a third layout; in response to the third operation, displaying the third interface element at the seventh position, and displaying the fourth interface element at an eighth position in the second display area, and displaying the fifth interface element at a ninth position in the second display area.

[0022] In this way, the electronic device can also display the one or more interface elements (including the fourth interface element and the fifth interface element) at the seventh position in a dispersed manner in unoccupied positions in the second display area.

[0023] The content of the third aspect can also be combined with any item in any aspect.

[0024] In a fourth aspect, the present application provides another method for moving interface elements, which is applied to an electronic device including a foldable display, the foldable display including a first display area and a second display area; the method includes: when the electronic device is in an unfolded form, displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, the second page including a sixth interface element, and the sixth interface element is at a tenth position in the second display area; receiving a fourth operation of the user on the sixth interface element, the fourth operation is used to move the sixth interface element to an eleventh position in the first display area, the eleventh position displaying a portion of a seventh interface element and an eighth interface element arranged in a fourth layout; in response to the fourth operation, displaying the sixth interface element at the eleventh position, and displaying the seventh interface element at the twelfth position in the first display area, and displaying the eighth interface element at the thirteenth position in the second display area.

[0025] In this way, the electronic device can also display the one or more interface elements (including the seventh interface element and the eighth interface element) at the eleventh position in unoccupied positions in the first display area and the second display area.

[0026] The content of the fourth aspect can also be combined with any item in any aspect.

[0027] In a fifth aspect, the present application provides another method for moving interface elements, which is applied to an electronic device including a foldable display screen, wherein the foldable display screen includes a first display area and a second display area; the method includes: when the electronic device is in an unfolded form, displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, the second page including a ninth interface element, the ninth interface element being at the fourteenth position in the second display area, displaying part or all of one or more interface elements arranged in a fifth layout at the fifteenth position in the first display area, and displaying part or all of the tenth interface element at the sixteenth position in the first display area; receiving a ninth operation from the user on the ninth interface element, the ninth operation being used to move the ninth interface element to the fifteenth position in the first display area; in response to the ninth operation, displaying the ninth interface element at the fifteenth position, and displaying one or more interface elements arranged in the fifth layout at the seventeenth position in the first display area, and displaying the tenth interface element at the eighteenth position in the second display area, and the sixteenth position and the seventeenth position are on the same side of the fifteenth position.

[0028] In this way, one or more interface elements at the fifteenth position can be displayed in other positions of the first display area while maintaining the original layout, and one or more interface elements (including the tenth element) displayed at the sixteenth position can be displayed in the second display area while maintaining the original layout. In some embodiments, the one or more interface elements can also be displayed at different positions of the second display area.

[0029] In one possible implementation, the sixteenth position is the same as the seventeenth position.

[0030] The sixteenth position may be the same as or different from the seventeenth position.

[0031] The content of the fifth aspect can also be combined with any item in any aspect.

[0032] In a sixth aspect, the present application provides another electronic device, comprising one or more processors, one or more display screens, and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the method for moving an interface element in any possible implementation of any of the above aspects. The one or more display screens may include a foldable display screen and / or a non-foldable display screen.

[0033] In a seventh aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method for moving an interface element in any possible implementation of any of the above aspects.

[0034] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method for moving an interface element in any possible implementation of any of the above aspects.

[0035] The beneficial effects of the sixth to eighth aspects can refer to the beneficial effects of the first to fifth aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1A A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0037] Figures 1B to 1E A schematic diagram of a device form of a group of electronic devices 100 provided in an embodiment of the present application;

[0038] Figure 1F to Figure 1IA schematic diagram of another set of electronic devices 100 provided in an embodiment of the present application;

[0039] Figure 1J A distribution diagram of a custom control grid (unit) layout on a display screen of an electronic device 100 provided in an embodiment of the present application;

[0040] Figure 1K A schematic diagram of another electronic device 100 provided in an embodiment of the present application;

[0041] FIG. 2A to FIG. 2E A schematic diagram of an interface of a group of electronic devices 100 provided in an embodiment of the present application during the process of switching from a folded form to an unfolded form;

[0042] Figures 2F to 2H A schematic diagram of an interface of a method for moving a set of interface elements provided in an embodiment of the present application;

[0043] FIG. 3A to FIG. 3F A schematic diagram of an interface of a method for moving a set of interface elements provided in an embodiment of the present application;

[0044] 4A to 4F A schematic diagram of another group of interface element moving methods provided in an embodiment of the present application;

[0045] FIG. 5A to FIG. 5F A schematic diagram of another group of interface element moving methods provided in an embodiment of the present application;

[0046] FIG. 6A to FIG. 6E A schematic diagram of another group of interface element moving methods provided in an embodiment of the present application;

[0047] FIG. 7A to FIG. 7D A schematic diagram of another group of interface element moving methods provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0049] Fig. 9 A schematic diagram of a flow chart of another method for moving interface elements provided in an embodiment of the present application;

[0050] Fig.10 A schematic diagram of a flow chart of another method for moving interface elements provided in an embodiment of the present application;

[0051] Fig.11 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0052] Fig.12 A schematic diagram of functional modules of an electronic device 100 provided in an embodiment of the present application;

[0053] Fig.13 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0054] Fig.14 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0055] Fig.15 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0056] Fig.16 A schematic diagram of a flow chart of a method for moving interface elements provided in an embodiment of the present application;

[0057] Fig.17 A flowchart of a method for moving interface elements provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0060] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0061] The following introduces the hardware architecture of an electronic device provided in an embodiment of the present application.

[0062] Figure 1A A schematic structural diagram of an electronic device 100 is shown.

[0063] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0064] The electronic device 100 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, and a display screen 194. In some embodiments, the electronic device 100 may also include any one or more of the following: antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, etc. The sensor module 180 may include a touch sensor 180K, a gyroscope sensor 180B, and an acceleration sensor 180E. Optionally, the sensor module 180 may also include one or more other sensors, such as a pressure sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.

[0065] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 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.

[0066] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0067] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0068] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0069] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0070] 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, and supplies power to the processor 110, the internal memory 121, the display screen 194 and other modules. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance) and the like. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0071] In some embodiments, the wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide solutions for wireless communication including 2G / 3G / 4G / 5G applied to the electronic device 100. Wireless communication module 160 can provide solutions for wireless communication including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and the like applied to the electronic device 100. Wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0072] The electronic device 100 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.

[0073] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), and the display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0074] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0075] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0076] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0077] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0078] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0079] The audio module 170 may include any one or more of the following: a speaker, a receiver, a microphone, an earphone interface, etc. The electronic device 100 may implement audio functions such as music playing and recording through the audio module 170 and an application processor.

[0080] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0081] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.

[0082] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0083] 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 electronic device 100, which is different from the position of the display screen 194.

[0084] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0085] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0086] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0087] In an embodiment of the present application, the electronic device 100 may include a foldable display screen, and the foldable display screen may include one or more display areas. When the foldable display screen of the electronic device 100 is unfolded, the device form of the electronic device 100 is an unfolded form. When the foldable display screen is folded, the device form of the electronic device 100 is a folded form. The folded form may include a forward folding form and a reverse folding form. The following takes the electronic device 100 including two display screens as an example to introduce several different device forms of the electronic device 100 provided in an embodiment of the present application.

[0088] Figures 1B to 1E A schematic diagram of the device form of a group of electronic devices 100 provided in an embodiment of the present application is shown.

[0089] like Figure 1B As shown, the electronic device 100 is in an unfolded state. The electronic device 100 includes a foldable display screen, which is in an unfolded state. The foldable display screen may include a display area 1 and a display area 2, and the display area 1 and the display area 2 are distributed left and right. The display area 1 may be the left half of the foldable display screen, and the display area 2 may be the right half of the foldable display screen. There is a folding edge between the display area 1 and the display area 2. Figure 1B In the embodiment, the electronic device 100 is in the unfolded state, and the user can see the contents displayed in the display area 1 and the display area 2 at the same time. A front camera and a receiver may be provided on the top of the display area 1. When the display area 1 rotates along the direction indicated by the arrow 11a with the folded edge as the axis, and the display area 2 rotates along the direction indicated by the arrow 11b with the folded edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the unfolded state. Figure 1C or Figure 1D When the display area 1 rotates along the direction indicated by arrow 22a with the folded edge as the axis, and the display area 2 rotates along the direction indicated by arrow 22b with the folded edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the Figure 1E The reverse folding morphology is shown.

[0090] Figure 1C FIG. 1 shows a forward folding state of an electronic device 100. Figure 1C As shown, the device form of the electronic device 100 is a forward folding form. The forward folding form is a device form formed after the front of the display area 1 and the front of the display area 2 of the electronic device 100 are folded inward along the folding edge. In the forward folding form, the user can see the back of the display area 1 or the back of the display area 2, and the user cannot see the content displayed in the display area 1 and the display area 2. Among them, the front of the display area is the side used to display the interface, and the back of the display area is the side opposite to the front. A rear camera may be provided on the back of the display area 1.

[0091] Figure 1D FIG. 1 shows another forward folding state of the electronic device 100. In addition to the foldable display screen, the electronic device 100 may also include another display screen, which may be located at the back of the display area 1 (or at the back of the display area 2). Figure 1D As shown, when the electronic device 100 is in the forward folded state, the user can see the display screen on the back of the display area 1, and the display area on the display screen can be called the display area 3. A rear camera can also be arranged on the back of the display area 2.

[0092] like Figure 1E As shown, the device form of the electronic device 100 is a reverse folding form. The reverse folding form is a device form formed after the back of the display area 1 and the back of the display area 2 of the electronic device 100 are folded inward along the folding edge. In the reverse folding form, the user can see the content displayed in the display area 1 or the content displayed in the display area 2, and the user cannot see the back of the display area 1 and the back of the display area 2.

[0093] Figure 1F to Figure 1I A schematic diagram of the device form of another group of electronic devices 100 provided in an embodiment of the present application is shown.

[0094] like Figure 1F As shown, the electronic device 100 is in an unfolded state. The electronic device 100 may include a display area 1 and a display area 2, and the display area 1 and the display area 2 are arranged vertically, and a folding edge exists between the display area 1 and the display area 2. Figure 1F In the embodiment, the electronic device 100 is in the unfolded state, and the user can see the contents displayed in the display area 1 and the display area 2 at the same time. A front camera and a receiver may be provided on the top of the display area 1. When the display area 1 rotates along the direction indicated by the arrow 33a with the folded edge as the axis, and the display area 2 rotates along the direction indicated by the arrow 33b with the folded edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the unfolded state. Figure 1G or Figure 1H When the display area 1 rotates along the direction indicated by arrow 44a with the folded edge as the axis, and the display area 2 rotates along the direction indicated by arrow 44b with the folded edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the Fig. 1I The reverse folding morphology is shown.

[0095] Figure 1G FIG. 1 shows a forward folding state of an electronic device 100. Figure 1GAs shown, the device form of the electronic device 100 is a forward folding form. The forward folding form is a device form formed after the front of the display area 1 and the front of the display area 2 of the electronic device 100 are folded inward along the folding edge. In the forward folding form, the user can see the back of the display area 1 or the back of the display area 2, and the user cannot see the content displayed in the display area 1 and the display area 2. Among them, the definition of the front and back of the display area can refer to the relevant description in the above embodiment, and the back of the display area 1 can be provided with a rear camera.

[0096] Figure 1H FIG. 1 shows another forward folding state of the electronic device 100. In addition to the foldable display screen, the electronic device 100 may also include another display screen, which may be located at the back of the display area 1 (or at the back of the display area 2). Figure 1D As shown, when the electronic device 100 is in the forward folded state, the user can see the display screen on the back of the display area 1, and the display area on the display screen can be called the display area 3. A rear camera can also be arranged on the back of the display area 2.

[0097] like Fig. 1I As shown, the device form of the electronic device 100 is a reverse folding form. The reverse folding form is a device form formed after the back of the display area 1 and the back of the display area 2 of the electronic device 100 are folded inward along the folding edge. In the reverse folding form, the user can see the content displayed in the display area 1 or the content displayed in the display area 2, and the user cannot see the back of the display area 1 and the back of the display area 2.

[0098] It is understandable that the above Figures 1B to 1I The illustrated embodiments are merely illustrative of the device forms of several electronic devices 100. In the embodiments of the present application, the foldable display screen may also include more than two display areas, and the arrangement of two or more display areas may also include more forms than those in the above embodiments, which is not limited in the present application.

[0099] It should be noted that in the embodiment of the present application, the foldable display screen may include multiple display areas (such as display area 1 and display area 2), and the foldable display screen is spliced ​​by the multiple display areas. Each display area of ​​the foldable display screen corresponds to an independent view and has an independent grid layout. When the electronic device 100 displays a desktop including multiple interface elements, the same interface element cannot occupy a position in two display areas at the same time (that is, it cannot straddle the middle seam). Moreover, display area 1 cannot perceive the content displayed in display area 2, and display area 2 cannot perceive the content displayed in display area 1.

[0100] The following is a distribution diagram of a custom control grid (unit) layout on a display area provided by an embodiment of the present application.

[0101] like Figure 1J As shown, the electronic device 100 may include a display area 1 and a display area 2, and the electronic device 100 is in an unfolded form. The minimum area for accommodating display (also referred to as placement) of interface elements on multiple display areas (including display area 1, display area 2, etc.) on the foldable display screen is a control grid, which can also be referred to as a unit. When an interface element is displayed on the display area, the interface element occupies one or more units on the display area. The size of the interface element can be used to indicate the number of units occupied by the interface element on the display area and the arrangement form of all units occupied by the interface element. The size of the interface element 1 may include a horizontal size and a vertical size. The horizontal size of the interface element 1 refers to the number of columns of units that the interface element 1 needs to occupy in the display area, and the vertical size refers to the number of rows of units that the interface element 1 needs to occupy in the display area. Exemplarily, if the size of the interface element 1 is 1*2, that is, the horizontal size is 2 and the vertical size is 1, then the interface element 1 needs to occupy two units in the display area, and the arrangement form of the two units is a 1*2 row and column distribution, that is, the interface element 1 needs to occupy 1 row and 2 columns of units in the display area. As another example, if the size of interface element 1 is 4*2, that is, the horizontal size is 2 and the vertical size is 4, then interface element 1 needs to occupy 8 units in the display area, and the arrangement of the 8 units is 4*2 rows and columns, that is, interface element 1 needs to occupy 4 rows and 2 columns of units in the display area.

[0102] The number of rows and columns of cells in a display area is related to the size of the display area. Figure 1J As shown in FIG. 1 , when the horizontal dimension of the display area 1 is 4 times the horizontal dimension of a unit and the vertical dimension of the display area 1 is 6 times the vertical dimension of a unit, the display area 1 may include a plurality of units distributed in 6*4 rows and columns, 6 represents the number of rows of units in the display area 1, and 4 represents the number of columns of units in the display area 1. Figure 1J In the illustrated embodiment, the size of the display area 2 is the same as that of the display area 1, and the display area 2 may also include a plurality of units distributed in 6*4 rows and columns.

[0103] The row and column order of the cells on the display area can be used to indicate the position of the cells on the display area. Figure 1J In the illustrated embodiment, the cell (1, 1) on the display area 1 is used to indicate the cell in the first row from the top and the first column from the left on the display area 1, that is, when indicating the row sequence and column sequence of the cells, the numbers on the left side of the brackets are used to indicate the row sequence of the cells on the display area, and the numbers on the right side of the brackets are used to indicate the column sequence of the cells on the display area.

[0104] In some embodiments, a two-dimensional coordinate system can also be constructed on each display area, and the position of the unit on the display area is represented by the coordinates on the coordinate system. Taking the construction of a two-dimensional coordinate system on the display area 1 as an example, the electronic device 100 can use any point (such as the upper left corner, the center point, the upper right corner, the lower right corner, etc.) of the display area 1 as the origin to construct a two-dimensional coordinate system on the display area 1. In some embodiments, the electronic device 100 can also use the upper left corner of the display area 1 as the origin, downward as the positive direction of the horizontal axis, rightward as the positive direction of the vertical axis, the horizontal dimension of a unit as the vertical unit 1, and the vertical dimension of a unit as the horizontal unit 1 to construct a two-dimensional coordinate system on the display area 1. In this case, the two-dimensional coordinate system on the display area 1 can overlap with a plurality of units distributed in rows and columns on the display area 1, and the row order and column order of each unit can be regarded as the horizontal coordinate and vertical coordinate of the unit in the coordinate system. It is understandable that the electronic device 100 may also use other two-dimensional coordinate systems. In this case, the electronic device 100 may obtain the coordinates of each unit in the coordinate system by converting the row sequence and column sequence of the unit and the coordinates. The specific conversion method can refer to the following Figure 8 The illustrated embodiment will not be described in detail here.

[0105] Understandably, Figure 1J The embodiment shown is only an example. In the embodiment of the present application, the size of the display area 1 may be different from that of the above embodiment, the display area 1 may be divided into more, fewer or differently arranged units, and the size of the display area 1 may be different from that of the display area 2. The present application does not limit this. In addition, in some embodiments, the electronic device 100 may also include more display areas, and each display area may be divided into a plurality of units distributed in rows and columns based on the size of the display area and the size of the unit.

[0106] In the embodiment of the present application, the interface elements may include any one or more of the following: application icons, service cards, application components, application folders, etc. Among them, the application icon can be used to trigger the electronic device 100 to display the application interface corresponding to the application icon; the service card can be used to trigger the electronic device 100 to display the service interface corresponding to the service card; the application component can be used to trigger the electronic device 100 to display the function interface of the application corresponding to the application component; the application folder can be used to trigger the electronic device 100 to display the icons of one or more applications in the application folder. The application folder can include a small application folder (i.e., a conventional application folder, hereinafter referred to as an application folder) and a large application folder, and the large application folder is larger in size.

[0107] Understandably, Figures 1B to 1JThe electronic devices 100 shown are all devices with foldable display screens. In some embodiments, the electronic device 100 may not include a foldable display screen, that is, the electronic device 100 may not be a foldable device. Figure 1K As shown, the display screen of the electronic device 100 may be a non-foldable display screen, and the display screen of the electronic device 100 may be divided into a plurality of display areas, such as a display area 1 and a display area 2. The display area 1 may be the left half of the display screen, and the display area 2 may be the right half of the display screen. The display area 1 and the display area 2 may also refer to the above Figure 1J The illustrated embodiment determines a grid layout for each display area.

[0108] Understandably, Figure 1K The embodiment shown is only an example to illustrate that the electronic device 100 may not include a foldable display screen. The electronic device 100 may be Figure 1K The tablet shown may also be other electronic devices with one or more display screens, and the electronic device 100 may also include more display areas, which is not limited in the present application.

[0109] In an embodiment of the present application, when the electronic device 100 is in a folded form, the electronic device 100 can display a page of the desktop through a display area (for example, display area 1, display area 2 or display area 3). When the electronic device 100 is switched from a folded form to an unfolded form, the electronic device 100 can display the page and one or more adjacent pages on the foldable display screen.

[0110] The following is a schematic diagram of interface changes of a group of electronic devices 100 provided in an embodiment of the present application when switching from a folded form to an unfolded form.

[0111] For example, Figure 2A As shown, the electronic device 100 is in a folded state. The folded state may be a reverse folded state. A desktop 1000 is displayed in a display area 1 of the foldable display screen. The desktop 1000 may display a page 1 on which one or more interface elements are placed. The one or more interface elements may include music application icons, film and television application icons, etc.

[0112] The electronic device 100 can receive and respond to the user's leftward sliding operation on the display area 1, switch the page displayed in the display area 1, and display the following on the desktop 1000: Figure 2B Page 2 is shown.

[0113] like Figure 2BAs shown, the electronic device 100 displays page 2, and one or more interface elements are placed in page 2, such as game application icons, gallery cards, etc. Wherein, page 2 is the next page of page 1 among the multiple pages displayed on the desktop 1000.

[0114] When the electronic device 100 is in the folded state and the display area 1 displays the above Figure 2A or Figure 2B When the desktop 1000 is shown, the display area 2 may display the following Figure 2C Alternatively, the display area 2 of the electronic device 100 may also display the interface 1010 as shown. Figure 2D The black screen shown is the screen-off interface, wherein the interface 1010 is different from the desktop 1000 .

[0115] The electronic device 100 in the folded state can receive and respond to the user's operation of unfolding the foldable display screen, and switch the device state of the electronic device 100 from the folded state to the unfolded state, displaying the following information: Figure 2E Desktop 1000 is shown.

[0116] like Figure 2E As shown, after the electronic device 100 is unfolded, the electronic device 100 can display a desktop 1000 in the display area 1 and the display area 2, and the display area 1 and the display area 2 have the same size. The desktop 1000 includes multiple pages with one or more interface elements placed thereon. Among them, page 1 of the desktop 1000 is displayed in the display area 1, and page 2 is displayed in the display area 2. Page 1 is similar to the above Figure 2A Page 1 is the same as shown, and page 2 is the same as above Figure 2B The same as page 2 shown.

[0117] In other embodiments, if the electronic device 100 is in the forward folding state, and in the forward folding state, the electronic device 100 can display the desktop in the display area 3 of another display screen. In this case, the desktop displayed in the display area 3 of the electronic device 100 in the folded state can refer to the above Figure 2A and Figure 2B When the electronic device 100 is switched from the folded state to the unfolded state, the desktop displayed by the electronic device 100 in the unfolded state can refer to the above Figure 2E The embodiment shown.

[0118] It should be noted that in the above FIG. 2A to FIG. 2EIn the illustrated embodiment, the display area 1 and the display area 2 have the same size, so after the electronic device 100 switches from the folded form to the unfolded form, page 1 can be displayed in the display area 1, and page 2 can be displayed in the display area 2. In other embodiments, the sizes of the display area 1 and the display area 2 may be different. In this case, after the electronic device 100 switches from the folded form to the unfolded form, a portion of one of the pages can be displayed in the display area with a larger size, and another portion of the page and another page can be displayed in the display area with a smaller size. Moreover, in the folded form, the size of the page can be adaptively adjusted based on the size of the display area where the page is located, and in the unfolded form, the size of the page can be adaptively adjusted based on the size of the foldable display screen. It can be understood that the embodiment here is only an exemplary description of the foldable display screen including two display areas. In the embodiment of the present application, the foldable display screen can also include more display areas, and the present application is not limited here.

[0119] Combine the following Figures 2F to 2H A method for moving interface elements provided in an embodiment of the present application is introduced.

[0120] like Figure 2F As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2, wherein the display area 1 may display page 1 of the desktop 200, and the display area 2 may display page 2 of the desktop 200. Page 1 includes one or more interface elements, such as a music application icon 202, a film and television application icon 203, a calendar application icon 204, and a recipe application icon 205, etc. Page 2 may include one or more interface elements, such as a gallery card 201, etc. The gallery card 201 is displayed at the initial position in page 2, and the size of the gallery card 201 is 2*2, occupying 4 units. In page 1, there are only two units in an idle state.

[0121] The electronic device 100 may receive and respond to the user's operation of dragging the gallery card 201 from page 2 to the target position of page 1 (eg, a long-press drag operation), and display the following Figure 2G Desktop 200 is shown.

[0122] like Figure 2G As shown, in desktop 200, gallery card 201 is displayed at the target position of page 1. Figure 2FIt can be seen that one or more interface elements are displayed at the target position of page 1, including music application icon 202, film and television application icon 203, calendar application icon 204 and recipe application icon 205. The gallery card 201 is displayed overlaid on the one or more interface elements. At the initial position of page 2, a rectangular frame 201a can also be displayed to indicate the position of the gallery card 201 before it is moved. Since there are only two idle cells in page 1, and the one or more interface elements need to occupy four cells, the display area 1 cannot accommodate the display of the one or more interface elements.

[0123] After determining that the display area 1 cannot accommodate the one or more interface elements, the electronic device 100 may display the following information in response to receiving and responding to the user releasing the gallery card 201: Figure 2H The desktop 200 shown, Figure 2H The desktop 200 shown is similar to the above Figure 2F The desktops 200 shown are identical.

[0124] like Figure 2H As shown, after receiving the user's operation of releasing the gallery card 201, since there is no unit in the display area 1 that can access the one or more interface elements, the gallery card 201 returns to the initial position in the page 2. That is, the cross-screen movement of the gallery card 201 fails.

[0125] It can be seen from the above embodiments that, when the above-mentioned method of moving interface elements is adopted, if the display area where the target position is located does not have enough free cells (cells in an idle state), it is impossible to move the interface elements of other display areas to the display area through a single operation. At this time, the electronic device needs to first receive and respond to the user's operation of moving one or more interface elements at the target position to other display areas in sequence, and move the one or more conflicting elements to other display areas in sequence. Afterwards, the electronic device can receive and respond to the user's operation of moving interface elements from other display areas to the display area, and move the interface elements to the display area. Using the above-mentioned method of moving interface elements, the operation steps are cumbersome and the efficiency is low.

[0126] The present application provides a method for moving an interface element, which is applied to an electronic device 100 including a foldable display screen, and the foldable display screen may include multiple display areas (for example, display area 1 and display area 2). Display area 1 displays one or more interface elements, and display area 2 displays one or more interface elements (including interface element 1). The electronic device 100 receives and responds to the user's operation of moving interface element 1 to position 1 in display area 1. After detecting that one or more interface elements (i.e., conflicting elements) were originally displayed in a first layout at position 1, it determines whether there is a position set in display area 2 that can accommodate and display each conflicting element respectively. If the position set exists in display area 2, the electronic device 100 displays each conflicting element at the position corresponding to the conflicting element in the position set, and displays interface element 1 at position 1.

[0127] In this way, even if there is not enough space on display area 1 to accommodate the conflicting elements, the conflicting elements can be displayed in display area 2 to ensure that interface element 1 moves successfully across the screen, simplifying the user's operation steps and improving movement efficiency.

[0128] The following describes the interface element moving method provided by the embodiment of the present application in conjunction with the application scenario.

[0129] In some application scenarios, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display page 1 of the desktop on the display area 1 and page 2 of the desktop on the display area 2. Page 2 may include an interface element 1 displayed at an initial position. When the electronic device 100 receives an operation by a user to move the interface element 1 from the initial position in page 2 to position 1 in page 1, if the initial position can accommodate one or more interface elements (also referred to as conflicting elements) originally displayed in the first layout arrangement at position 1, the interface element 1 is exchanged with the one or more interface elements originally displayed in the first layout arrangement at position 1, that is, the interface element 1 is displayed at position 1, and the one or more interface elements displayed in the first layout arrangement are displayed at the initial position. It should be noted that if position 1 displays all of the one or more interface elements displayed in the first layout arrangement (that is, each interface element is complete in position 1), the initial position can also accommodate the one or more interface elements displayed in the first layout arrangement. If position 1 displays part of one or more interface elements arranged in the first layout (ie, at least one interface element at position 1 is incomplete), the initial position cannot accommodate the one or more interface elements arranged in the first layout.

[0130] In this way, even if there is not enough space in the display area 1 to accommodate the display interface element 1, the electronic device 100 can exchange the positions of one or more conflicting elements arranged in the first layout in the display area 1 with the position of the interface element 1 in the display area 2, thereby simplifying the operation steps and improving efficiency.

[0131] For example, Figure 3A As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2, and the foldable display screen is in an unfolded state. A desktop 300 is displayed on the foldable display screen.

[0132] The desktop 300 displays two pages with interface elements (such as application icons, service cards, application folders, etc.), including page 1 and page 2. Page 1 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 may display one or more interface elements (such as music application icon 305, film and television application icon 306, calendar application icon 307, recipe application icon 308, etc.), and page 2 may display one or more interface elements (such as gallery card 304, theme application icon, life application icon, etc.). Optionally, a page indicator 303 is also displayed below the desktop 300 to indicate the total number of pages on the desktop and the positional relationship between the currently displayed page and other pages. For example, the desktop 300 may include eight pages, and the elliptical mark (i.e., the capsule-shaped mark) in the page indicator includes the two dots on the far left, which can indicate that the currently displayed page includes the first two pages from the left of the eight pages. Optionally, a status bar 301 is also displayed above the desktop 300, and the status bar 301 may include information such as a communication signal strength indicator, a battery value, and a time. Further optionally, a tray (dock) area 302 may be provided below the page indicator, and the dock area 302 may include one or more trays, such as a tray 302a displayed in page 1 and a tray 302b displayed in page 2. One or more icons (such as a dialing application icon, a message application icon, an address book application icon, a browser application icon, etc.) may be displayed in the tray 302a, and one or more icons (such as a camera application icon, a setting application icon, etc.) may also be displayed in the tray 302b. One or more trays in the dock area may remain displayed when the page is switched.

[0133] Combine the following Figure 3AIntroduce the display position of the interface elements in the page. Both display area 1 and display area 2 can include multiple units. When display area 1 displays page 1, each interface element in page 1 can occupy one or more units in display area 1. When display area 2 displays page 2, each interface element in page 2 can occupy one or more units in display area 2. The number of units occupied by an interface element and the positional relationship between the multiple occupied units are determined by the size of the interface element. For specific relationships, please refer to the above Figure 1J The embodiment shown. Without considering the tray area for the moment, taking the arrangement of the units in display area 1 into six rows and four columns as an example, a 6*4 dimensional matrix can be constructed, each number in the matrix can correspond to a unit in display area 1, and the row and column sequence of the number in the matrix can correspond to the row and column sequence of the unit in display area 1. In the matrix, the number "1" represents that the unit is occupied (i.e., an interface element is displayed), and the number "0" represents that the unit is not occupied. According to Figure 3A In the page 1 shown, the occupation of each unit in the display area 1 by each interface element in the page 1 can be represented by the 6*4 dimensional screen occupation matrix A0 as shown below:

[0134]

[0135] According to the above formula (1), when display area 1 displays page 1, display area 1 can include 4*6=24 cells, and among the 24 cells, only cells (2,3) and cells (2,4) are unoccupied cells, and the other cells all display interface elements. Among them, the numbers on the left side of the brackets represent the row order of the cell in the display area, and the rows are sorted from top to bottom. The numbers on the right side of the brackets represent the column order of the cell in the display area, and the columns are sorted from left to right.

[0136] Similarly, according to Figure 3A In the page 2 shown, the occupation of each unit in the display area 2 by each interface element in the page 2 can be represented by the 6*4 dimensional screen occupation matrix B0 as shown below:

[0137]

[0138] According to the above formula (2), when display area 2 displays page 2, display area 2 can include 4*6=24 cells, and among the 24 cells, only cell (1,3), cell (1,4) and cell (2,4) are unoccupied cells, and the other cells all display interface elements. Among them, the left number in the bracket represents the row order of the cell in the display area, and the rows are sorted from top to bottom, and the right number in the bracket represents the column order of the cell in the display area, and the columns are sorted from left to right.

[0139] In page 1 displayed in display area 1, there are displayed music application icon 305, film and television application icon 306, calendar application icon 307 and recipe application icon 308. These four application icons occupy the following four units in display area 1 respectively: unit (3,3), unit (3,4), unit (4,3) and unit (4,4). In page 2 displayed in display area 2, there is displayed a gallery card 304. The size of gallery card 304 is 2*2, that is, gallery card 304 needs to occupy four units, and the four units are arranged in a square. Figure 3A As shown in page 2, the positions occupied by the gallery card 304 in the display area 2 include the following four units: unit (3, 1), unit (3, 2), unit (4, 1) and unit (4, 2).

[0140] The electronic device 100 may receive and, in response to a user's long press operation on the gallery card 304 , display an edit bar 309 near the gallery card 304 .

[0141] like Figure 3B As shown, the edit bar 309 may display one or more controls, such as a remove control, a more service card control, and an edit control. The remove control may be used to trigger the electronic device 100 to remove the gallery card 304 in page 2, the more service card control may be used to trigger the electronic device 100 to display more service cards, and the edit control may be used to trigger the electronic device 100 to display an editing interface of the gallery control. Optionally, while displaying the edit bar 309, the electronic device 100 may also blur other interface elements (interface elements other than the gallery card 304 and the edit bar 309) on the desktop 300 to highlight the gallery card 304, so that the user can focus on the gallery card 304 and the edit bar 309.

[0142] The electronic device 100 can receive and respond to the user's drag operation on the gallery card 304, such as Figure 3C As shown, the edit bar 309 is closed and the gallery card 304 is moved along the track of the user's dragging operation.

[0143] like Figure 3C As shown, in the desktop 300, the edit bar 309 is turned off, and the gallery card 304 can move along the track of the user's drag operation. Optionally, during the movement of the gallery card 304, the gallery card 304 can display an initial position prompt at its initial position in the display area 2, such as Figure 3CThe rectangular frame 304a shown may include all cells occupied by the initial position. The initial position prompt may be used to prompt the user of the initial position of the gallery card 304 before it is moved. It is understandable that in other embodiments, the initial position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in this application.

[0144] In response to the user moving the gallery card to position 1, the electronic device 100 may display the following Figure 3D The desktop 300 shown. The size of position 1 is consistent with the size of the gallery card 304. In some embodiments, the electronic device 100 can detect the trajectory and movement speed of the user's drag operation on the gallery card 304, and determine position 1 based on the movement speed. When it is detected that the user drags the gallery card 304 to the display area 1 and the movement speed is less than a preset value, the electronic device 100 can determine one or more interface elements originally displayed at the position 1 based on the gallery card 304 in the display area 1, also referred to as conflicting elements.

[0145] like Figure 3D As shown, the gallery card 304 is displayed at position 1 in display area 1, and position 1 includes the following four cells in display area 1: cell (3,3), cell (3,4), cell (4,3), and cell (4,4). The numbers in brackets represent the row and column of the cell in display area 1, respectively. For details, please refer to the relevant description in the above formula (1). Figure 3A It can be seen that before the user's drag operation, the interface element originally displayed at unit (3,3) in display area 1 is a music application icon, the interface element originally displayed at unit (3,4) is a film and television application icon, the interface element originally displayed at unit (4,3) is a calendar application icon, and the interface element originally displayed at unit (4,4) is a recipe application icon. Therefore, the electronic device 100 can determine that the one or more conflicting elements included in the conflicting element set are: music application icon, film and television application icon, calendar application icon and recipe application icon. Since the size of the gallery card 304, the size of the initial position and the size of position 1 are all 2*2, and all conflicting elements displayed at position 1 are complete interface elements (that is, all of one or more conflicting elements are displayed at position 1), therefore, the size of the position that the conflicting element set needs to occupy is also 2*2. The electronic device 100 can determine that one or more conflicting elements in the conflicting element set can maintain the original position relationship and be placed in the initial position in display area 2.

[0146] After determining that the initial position of the gallery card 304 in the display area 2 can maintain the relative position of the one or more conflicting elements and place the one or more conflicting elements (i.e., can accommodate and display the one or more conflicting elements arranged in the original layout), as shown in FIG. Figure 3E As shown, the electronic device 100 can maintain the relative positions of the one or more conflicting elements and display the one or more conflicting elements at the initial positions of the display area 2.

[0147] like Figure 3E As shown, in display area 2, the music application icon is displayed at unit (3,1), the film and television application icon is displayed at unit (3,2), the calendar application icon is displayed at unit (4,1), and the recipe application icon is displayed at unit (4,2). That is, the one or more conflicting elements maintain their relative positions before the user's drag operation and are displayed at the initial position of the gallery card 304. Optionally, in display area 1, a target position prompt may also be displayed at position 1, such as a rectangular frame 304b, and the rectangular frame 304b may include all the units occupied by position 1. The target position prompt is used to prompt the user that the target position can be used to place the gallery card 304. It will be understood that in other embodiments, the target position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in the present application.

[0148] The electronic device 100 can receive and respond to the user's operation of releasing the gallery card 304 at position 1, such as Figure 3F As shown, the gallery card 304 is displayed at position 1 in display area 1.

[0149] like Figure 3F As shown, the gallery card 304 is displayed at position 1 in the display area 1, and the text "Gallery" can also be displayed below the gallery card 304 to indicate the name of the gallery card 304. Figure 3A Compared to the desktop 300 shown in Figure 3F In the desktop 300 shown, the positions of the gallery card 304 and the conflicting element set (including the music application icon, the movie application icon, the calendar application icon and the recipe application icon) are swapped.

[0150] Understandably, FIG. 3A to FIG. 3FThe shown embodiment is only an example. In the embodiment of the present application, the electronic device 100 may also include more display areas, the interface element 1 may also be other interface elements other than the gallery card 304, the display area 1 and the display area 2 may also include more, fewer or different interface elements from the above embodiments, each display area may also include more, fewer or differently arranged units than the above embodiments, and the screen occupancy information matrix corresponding to the display area may also include units in the tray area, which is not limited in the present application.

[0151] In some application scenarios, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in the unfolded state, the electronic device 100 may display page 1 of the desktop on the display area 1, and display page 2 of the desktop on the display area 2. Page 2 may include an interface element 1 displayed at an initial position. When the electronic device 100 receives an operation by a user to move the interface element 1 from the initial position in page 2 to position 1 in page 1, if position 2 in the display area 2 can accommodate one or more interface elements (also referred to as conflicting elements) originally displayed in the first layout arrangement at position 1, one or more interface elements originally displayed in the first layout arrangement at position 1 are displayed at position 2 in the first layout arrangement, and the interface element 1 is displayed at position 1. Position 2 is different from the initial position. In this way, even if the initial position cannot accommodate one or more conflicting elements arranged in the first layout at display position 1, the electronic device 100 can traverse the display area 2, find position 2 in the display area 2 that can accommodate one or more conflicting elements arranged in the first layout, display the one or more conflicting elements in the first layout at position 2, and display the interface element 1 at position 1, thereby simplifying the operation steps and improving efficiency.

[0152] For example, Figure 4A As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display a desktop 400 on the foldable display screen.

[0153] Desktop 400 displays two pages with interface elements (such as application icons, service cards, application folders, etc.), including page 1 and page 2. Page 1 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 may display one or more interface elements (such as large application folder 402, setting application icon 403, health application icon 404, gallery application icon 405, etc.), and page 2 may display one or more interface elements (such as gallery card 401, wealth application icon, memo application icon, etc.). Optionally, desktop 400 may also display one or more items of page indicator, status bar, and tray area. The specific description of the one or more items can refer to the above. Figure 3A The relevant descriptions in the illustrated embodiment will not be repeated here. Figure 4A The display position of the interface elements in the introduction page in the display area. Both display area 1 and display area 2 can include multiple units. When display area 1 displays page 1, each interface element in page 1 can occupy one or more units in display area 1. When display area 2 displays page 2, each interface element in page 2 can occupy one or more units in display area 2. The number of units occupied by an interface element and the positional relationship between the multiple occupied units are determined by the size of the interface element. For specific relationships, please refer to the above Figure 1J The embodiment shown. Without considering the tray area for the moment, taking the arrangement of the units in display area 1 into six rows and four columns as an example, a 6*4 dimensional matrix can be constructed, each number in the matrix can correspond to a unit in display area 1, and the row and column sequence of the number in the matrix can correspond to the row and column sequence of the unit in display area 1. In this matrix, "1" represents that the unit is occupied (i.e., an interface element is displayed), and "0" represents that the unit is not occupied. According to Figure 4A In the page 1 shown, the occupation of each unit in the display area 1 by each interface element in the page 1 can be represented by a 6*4 dimensional screen occupation matrix A1 as shown below:

[0154]

[0155] According to the above formula (3), when display area 1 displays page 1, display area 1 can include 4*6=24 cells, and there is no unoccupied cell in the 24 cells, that is, each cell in display area 1 displays an interface element. The numbers on the left side of the brackets represent the row sequence of the cell in the display area, and the rows are sorted from top to bottom. The numbers on the right side of the brackets represent the column sequence of the cell in the display area, and the columns are sorted from left to right.

[0156] Similarly, according to Figure 4AIn the page 2 shown, the occupation of each unit in the display area 2 by each interface element in the page 2 can be represented by a 6*4 dimensional screen occupation matrix B1 as shown below:

[0157]

[0158] According to the above formula (4), when display area 2 displays page 2, display area 2 can include 4*6=24 cells, and among the 24 cells, the unoccupied cells include the following multiple cells: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2) and cell (3,3), and the other cells all display interface elements. Among them, the left number in the bracket represents the row order of the cell in the display area, and the row is sorted from top to bottom, and the right number in the bracket represents the column order of the cell in the display area, and the column is sorted from left to right.

[0159] In page 1 displayed in display area 1, interface elements such as large application folder 402, setting application icon 403, health application icon 404, and gallery application icon 405 are displayed. Among them, large application folder 402 has a size of 2*2 and occupies the following four units in display area 1: unit (3,3), unit (3,4), unit (4,3), and unit (4,4); setting application icon 403 occupies unit (4,2) in display area 1; health application icon 404 occupies unit (5,2) in display area 1; and gallery application icon 405 occupies unit (5,3) in display area 1. In page 2 displayed in display area 2, gallery card 401 is displayed. The size of gallery card 401 is 2*2, that is, gallery card 401 needs to occupy four units, and the four units are arranged in a square. Figure 4A As shown in page 2, the positions occupied by the gallery card 401 in the display area 2 include the following four units: unit (4, 1), unit (4, 2), unit (5, 1) and unit (5, 2).

[0160] The electronic device 100 may receive and, in response to a user's long press operation on the gallery card 401 , display an edit bar 406 near the gallery card 401 .

[0161] like Figure 4B As shown, the edit bar 406 may display one or more controls, such as a remove control, a more service card control, and an edit control. For a detailed description of the controls in the edit bar 406, please refer to the above Figure 3BOptionally, while displaying the edit bar 406, the electronic device 100 can also blur other interface elements on the desktop 400 (interface elements other than the gallery card 401 and the edit bar 406) to highlight the gallery card 401, so that the user can focus on the gallery card 401 and the edit bar 406.

[0162] The electronic device 100 can receive and respond to the user's drag operation on the gallery card 401, such as Figure 4C As shown, the edit bar 406 is closed and the gallery card 401 is moved along the track of the user's dragging operation.

[0163] like Figure 4C As shown, in the desktop 400, the display edit bar 406 is turned off, and the gallery card 401 can move along the track of the user's drag operation. Optionally, during the movement of the gallery card 401, the gallery card 401 can display an initial position prompt at its initial position in the display area 2, such as Figure 4C The rectangular frame 401a shown may include all cells occupied by the initial position. The initial position prompt may be used to prompt the user of the initial position of the gallery card 401 before it is moved. It is understandable that in other embodiments, the initial position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in this application.

[0164] In response to the user moving the gallery card 401 to position 1, the electronic device 100 may display the following Figure 4D The size of position 1 is the same as that of gallery card 401. In some embodiments, electronic device 100 can detect the trajectory and movement speed of the user's drag operation on gallery card 401. When it is detected that the user drags gallery card 401 to display area 1 and the movement speed is less than a preset value, as shown in FIG. Figure 4D As shown, the electronic device 100 can determine one or more conflicting elements originally displayed at position 1 of the gallery card 401 in the display area 1 .

[0165] like Figure 4D As shown, the gallery card 401 is displayed at position 1 in the display area 1, and position 1 includes the following four cells in the display area 1: cell (4,2), cell (4,3), cell (5,2), and cell (5,3). The numbers in the brackets represent the rows and columns where the cells are located in the display area, and the details can be referred to the relevant description in the above formula (3). Figure 4AIt can be seen that before the user's drag operation, in display area 1, the interface element originally displayed at unit (4,2) is the settings application icon 403, the interface element originally displayed at unit (4,3) is the large application folder 402 (the lower left part of the large application folder 402), the interface element originally displayed at unit (5,2) is the health application icon 404, and the interface element originally displayed at unit (5,3) is the gallery application icon 405. That is, there are incomplete conflicting elements in the conflicting elements displayed at position 1 (that is, what is displayed at position 1 is part of the one or more conflicting elements). Therefore, the electronic device 100 can determine that the one or more conflicting elements included in the conflicting element set are: the large application folder 402, the settings application icon 403, the health application icon 404, and the gallery application icon 405. The number of cells occupied by the conflicting element set is 7, and it occupies 3 rows and 3 columns in display area 1. The occupation of each cell in the 3*3 rows and columns by the conflicting element set can be represented by the 3*3 dimensional occupancy matrix C1 as shown below:

[0166]

[0167] According to the above formula (5), in the 3*3 cell row corresponding to the conflict element set, only the cell (1,1) and the cell (3,3) are not occupied, and all other cells are occupied by the conflict element set. That is, the conflict element set needs to occupy 7 cells, which include all cells in the 3*3 cell row except the cell in the upper left corner and the cell in the lower right corner.

[0168] In the process of the gallery card 401 moving to the display area 1 following the user's operation, the gallery card 401 leaves the display area 2, and the unoccupied cells in the display area 2 increase. At this time, the occupation of each unit in the display area 2 by each interface element in the page 2 can be represented by the 6*4-dimensional screen occupancy matrix D1 as shown below:

[0169] There are 4*6=24 cells, and among the 24 cells, the unoccupied cells include the following cells: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2), cell (3,3), cell (4,1), cell (4,2), cell (5,1) and cell (5,2), and the other cells all display interface elements.

[0170] Based on the screen occupancy matrix D1 of display area 2 and the occupancy matrix C1 of the conflicting element set, the electronic device 100 can determine that there is a position 2 in the display area 2, so that the electronic device 100 can maintain the positional relationship between the conflicting elements in the conflicting element set and place the conflicting element set at position 2. That is, position 2 of the display area 2 can accommodate one or more conflicting elements arranged in the original layout. Figure 4D As shown, position 2 includes the following seven cells in display area 2: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2), and cell (3,3).

[0171] After determining that there is a position 2 in the display area 2 that can maintain the relative position of the one or more conflicting elements and accommodate and display the one or more conflicting elements, as follows Figure 4E As shown, the electronic device 100 can maintain the relative positions of the one or more conflicting elements and display the one or more conflicting elements at position 2 of the display area 2.

[0172] like Figure 4E As shown, in display area 2, setting application icon 403 is displayed at unit (2, 2), health application icon 404 is displayed at unit (3, 2), gallery application icon 405 is displayed at unit (3, 3), and large application folder 402 occupies the following four units in display area 2: unit (1, 3), unit (1, 4), unit (2, 3), and unit (2, 4). That is, the one or more conflicting elements are displayed at position 2 of display area 2 while maintaining their relative positions before the user's drag operation. Optionally, in display area 1, a target position prompt may also be displayed at position 1, such as a rectangular frame 401b, which may include all units occupied by position 1. The target position prompt is used to prompt the user that the target position can be used to place gallery card 401. It is understandable that in other embodiments, the target position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in this application.

[0173] The electronic device 100 can receive and respond to the user's operation of releasing the gallery card 401 at position 1, such as Figure 4F As shown, the gallery card 401 is displayed at position 1 in display area 1.

[0174] like Figure 4F As shown, the gallery card 401 is displayed at position 1 in the display area 1, and the text "Gallery" can also be displayed below the gallery card 401 to indicate the name of the gallery card 401. Figure 4A The desktop 400 shown is compared to the Figure 4FIn the desktop 400 shown, the gallery card 401 is displayed in display area 1, and the conflicting element set (including the large application folder 402, the settings application icon 403, the health application icon 404 and the gallery application icon 405) is displayed in display area 2.

[0175] Understandably, 4A to 4F The shown embodiment is only an example. In the embodiment of the present application, the electronic device 100 may also include more display areas, the interface element 1 may also be other interface elements other than the gallery card 401, the display area 1 and the display area 2 may also include more, fewer or different interface elements from the above embodiments, each display area may also include more, fewer or differently arranged units than the above embodiments, and the screen occupancy information matrix corresponding to the display area may also include units in the tray area, which is not limited in the present application.

[0176] In some application scenarios, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display page 1 of the desktop on the display area 1, and display page 2 of the desktop on the display area 2. Page 2 may include an interface element 1 displayed at an initial position. When the electronic device 100 receives an operation by a user to move the interface element 1 from the initial position in page 2 to position 1 in page 1, if the display area 2 can accommodate one or more interface elements (also referred to as conflicting elements) displayed at the display position 1, the one or more interface elements displayed at position 1 are displayed at positions in the position set, and the interface element 1 is displayed at position 1. In this way, even if there is no position 2 in the display screen 2 that can accommodate one or more conflicting elements arranged in the first layout, the electronic device 100 can find a position set in the display area 2 that can accommodate each conflicting element, display one or more conflicting elements at positions in the position set, and display the interface element 1 at position 1, which simplifies the operation steps and improves efficiency.

[0177] For example, Figure 5A As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2, and the foldable display screen is in an unfolded state. A desktop 500 is displayed on the foldable display screen.

[0178] Desktop 500 displays two pages with interface elements (such as application icons, service cards, application folders, etc.), including page 1 and page 2. Page 1 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 may display one or more interface elements (such as common application folder 502, large application folder 503, setting application icon 504, etc.), and page 2 may display one or more interface elements (such as gallery card 501, wealth application icon, memo application icon, etc.). Optionally, desktop 500 may also display one or more items of page indicator, status bar, and tray area. The specific description of the one or more items can refer to the above. Figure 3A The relevant descriptions in the illustrated embodiment will not be repeated here. Figure 5A The display position of the interface elements in the introduction page in the display area. Both display area 1 and display area 2 can include multiple units. When display area 1 displays page 1, each interface element in page 1 can occupy one or more units in display area 1. When display area 2 displays page 2, each interface element in page 2 can occupy one or more units in display area 2. The number of units occupied by an interface element and the positional relationship between the multiple occupied units are determined by the size of the interface element. For specific relationships, please refer to the above Figure 1J Relevant content in the illustrated embodiment. Without considering the tray area for the moment, taking the arrangement of the units in each display area into six rows and four columns as an example, a 6*4 dimensional matrix can be constructed, and each number in the matrix can correspond to a unit in display area 1, and the row sequence and column sequence of the number in the matrix can correspond to the row sequence and column sequence of the unit in display area 1. In the matrix, "1" represents that the unit is occupied (i.e., an interface element is displayed), and "0" represents that the unit is not occupied. According to Figure 5A In the page 1 shown, the occupation of each unit in the display area 1 by each interface element in the page 1 can be represented by a 6*4 dimensional screen occupation matrix A2 as shown below:

[0179]

[0180] According to the above formula (7), when display area 1 displays page 1, display area 1 can include 4*6=24 cells, and there is no unoccupied cell in the 24 cells, that is, each cell in display area 1 displays an interface element. Among them, the left number in the bracket represents the row sequence of the cell in the display area, and the rows are sorted from top to bottom, and the right number in the bracket represents the column sequence of the cell in the display area, and the columns are sorted from left to right.

[0181] Similarly, according to Figure 5AIn the page 2 shown, the occupation of each unit in the display area 2 by each interface element in the page 2 can be represented by a 6*4 dimensional screen occupancy matrix B2 as shown below:

[0182]

[0183] According to the above formula (8), when display area 2 displays page 2, display area 2 can include 4*6=24 cells, and among the 24 cells, the unoccupied cells include the following multiple cells: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2) and cell (3,3), and the other cells all display interface elements. Among them, the left number in the bracket represents the row order of the cell in the display area, and the row is sorted from top to bottom, and the right number in the bracket represents the column order of the cell in the display area, and the column is sorted from left to right.

[0184] In page 1 displayed in display area 1, there are interface elements such as common application folder 502, large application folder 503, and setting application icon 504. Among them, the size of common application folder 502 is 1*2, and it occupies the following two units in display area 1: unit (3,1) and unit (3,2); the size of large application folder 503 is 2*2, and it occupies the following four units in display area 1: unit (3,3), unit (3,4), unit (4,3), and unit (4,4); the setting application icon 504 occupies unit (4,2) in display area 1. In page 2 displayed in display area 2, there is a gallery card 501, and the size of gallery card 501 is 2*2, that is, gallery card 501 needs to occupy four units, and the four units are arranged in a square. Figure 5A As shown in page 2, the positions occupied by the gallery card 501 in the display area 2 include the following four units: unit (4, 1), unit (4, 2), unit (5, 1) and unit (5, 2).

[0185] The electronic device 100 may receive and, in response to a user's long press operation on the gallery card 501 , display an edit bar 505 near the gallery card 501 .

[0186] like Figure 5B As shown, the edit bar 505 may display one or more controls, such as a remove control, a more service card control, and an edit control. For a detailed description of the controls in the edit bar 505, please refer to the above Figure 3BOptionally, while displaying the edit bar 505, the electronic device 100 can also blur other interface elements on the desktop 500 (interface elements other than the gallery card 501 and the edit bar 505) to highlight the gallery card 501, so that the user can focus on the gallery card 501 and the edit bar 505.

[0187] The electronic device 100 can receive and respond to the user's drag operation on the gallery card 501, such as Figure 5C As shown, the edit bar 505 is closed and the gallery card 501 is moved along the track of the user's dragging operation.

[0188] like Figure 5C As shown, in the desktop 500, the display edit bar 505 is turned off, and the gallery card 501 can move along the track of the user's drag operation. Optionally, during the movement of the gallery card 501, the gallery card 501 can display an initial position prompt at its initial position in the display area 2, such as Figure 5C The rectangular frame 501a shown may include all cells occupied by the initial position. The initial position prompt may be used to prompt the user of the initial position of the gallery card 501 before it is moved. It is understandable that in other embodiments, the initial position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in this application.

[0189] In response to the user moving the gallery card 501 to position 1, the electronic device 100 may display the following Figure 5D The size of position 1 is the same as that of gallery card 501. In some embodiments, electronic device 100 can detect the trajectory and movement speed of the user's drag operation on gallery card 501. When it is detected that the user drags gallery card 501 to display area 1 and the movement speed is less than a preset value, as shown in FIG. Figure 5D As shown, the electronic device 100 can determine one or more conflicting elements originally displayed at position 1 of the gallery card 501 in the display area 1 .

[0190] like Figure 5D As shown, the gallery card 501 is displayed at position 1 in the display area 1, and position 1 includes the following four cells in the display area 1: cell (3,2), cell (3,3), cell (4,2), and cell (4,3). The numbers in the brackets represent the row and column where the cell is located in the display area, and the details can be referred to the relevant description in the above formula (7). Figure 5AIt can be seen that before the user's drag operation, in display area 1, the interface element originally displayed at unit (3,2) is the commonly used application folder 502 (the right half of the commonly used application folder 502), the interface element originally displayed at unit (4,2) is the settings application icon 504, and the interface element originally displayed at units (3,3) and (4,3) is the large application folder 503 (the left half of the large application folder 503). That is, what is displayed at position 1 is part of the one or more conflicting elements. Therefore, the electronic device 100 can determine that the one or more conflicting elements included in the conflicting element set are: the commonly used application folder 502, the large application folder 503, and the settings application icon 504. The number of cells occupied by the conflicting element set is 7, and it occupies 2 rows and 4 columns in display area 1. The occupation of each cell in the 2*4 rows and columns by the conflicting element set can be represented by the 2*4-dimensional occupancy matrix C2 as shown below:

[0191]

[0192] According to the above formula (9), in the 2*4 cell row corresponding to the conflict element set, only cell (2,1) is not occupied, and all other cells are occupied by the conflict element set. That is, the conflict element set needs to occupy 7 cells, which include all cells in the 2*4 cell row except the cell in the lower left corner.

[0193] In the process of the gallery card 501 moving to the display area 1 following the user's operation, the gallery card 501 leaves the display area 2, and the number of unoccupied cells in the display area 2 increases. At this time, the occupation of each unit in the display area 2 by each interface element in the page 2 can be represented by the 6*4-dimensional screen occupancy matrix D2 as shown below:

[0194]

[0195] According to the above formula (10), in the process of dragging the gallery card 501 from the display area 2 to the display area 1, the display area 2 can include 4*6=24 cells, and among the 24 cells, the unoccupied cells include the following multiple cells: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2), cell (3,3), cell (4,1), cell (4,2), cell (5,1) and cell (5,2), and the other cells all display interface elements.

[0196] Based on the screen occupancy matrix D2 of the display area 2 and the occupancy matrix C2 of the conflicting element set, the electronic device 100 can determine that there is a position set in the display area 2, the position set includes position a, position b and position c, position a can be placed in the large application folder 503, position b can be placed in the common application folder 502, and position c can be placed in the setting application icon 504. Figure 5D As shown, position a includes the following four cells in display area 2: cell (1,3), cell (1,4), cell (2,3) and cell (2,4); position b includes the following two cells in display area 2: cell (3,2) and cell (3,3); position a includes cell (2,2) in display area 2.

[0197] After determining that there are one or more positions in the display area 2 that can accommodate and display the one or more conflicting elements, as shown in FIG. Figure 5E As shown, the electronic device 100 can display the large application folder 503 at position a in the display area 2, the commonly used application folder 502 at position b in the display area 2, and the setting application icon 504 at position c in the display area 2.

[0198] like Figure 5E As shown, the large application folder 503 occupies the following four units in the display area 2: unit (1,3), unit (1,4), unit (2,3) and unit (2,4). The commonly used application folder 502 occupies the following two units in the display area 2: unit (3,2) and unit (3,3). The application icon 504 is set to occupy unit (2,2) in the display area 2. Optionally, in the display area 1, a target position prompt may also be displayed at position 1, such as a rectangular frame 501b, and the rectangular frame 501b may include all the units occupied by position 1. The target position prompt is used to prompt the user that the target position can be used to place the gallery card 501. It can be understood that in other embodiments, the target position prompt may also be a prompt box or prompt window of other shapes, or other types of prompts such as text, animation, etc., which are not limited in this application.

[0199] The electronic device 100 can receive and respond to the user's operation of releasing the gallery card 501 at position 1, such as Fig. 5F As shown, the gallery card 501 is displayed at position 1 in display area 1.

[0200] like Fig. 5F As shown, the gallery card 501 is displayed at position 1 in the display area 1, and the text "Gallery" can also be displayed below the gallery card 501 to indicate the name of the gallery card 501. Figure 5A Compared to the desktop 500 shown in Fig. 5FIn the desktop 500 shown, the gallery card 501 is displayed in the display area 1 , and the conflict element set (including the common application folder 502 , the large application folder 503 and the setting application icon 504 ) is displayed in the display area 2 .

[0201] Understandably, FIG. 5A to FIG. 5F The shown embodiment is only an example. In the embodiment of the present application, the electronic device 100 may also include more display areas, the interface element 1 may also be other interface elements other than the gallery card 501, the display area 1 and the display area 2 may also include more, fewer or different interface elements from the above embodiments, each display area may also include more, fewer or differently arranged units than the above embodiments, and the screen occupancy information matrix corresponding to the display area may also include units in the tray area, which is not limited in the present application.

[0202] In some application scenarios, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in the unfolded state, the electronic device 100 may display page 1 of the desktop on the display area 1, and display page 2 of the desktop on the display area 2. Page 2 may include an interface element 1 displayed at an initial position. When the electronic device 100 receives an operation by the user to move the interface element 1 from the initial position in page 2 to position 1 in page 1, if the display area 2 cannot accommodate one or more interface elements (also referred to as conflicting elements) displayed at display position 1 respectively, the electronic device 100 may determine that the squeezing has failed, and after detecting the operation of the user releasing the interface element 1, the interface element 1 may be displayed at the initial position.

[0203] For example, Fig. 6A As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display a desktop 600 on the foldable display screen.

[0204] Desktop 600 displays two pages with interface elements (such as application icons, service cards, application folders, etc.), including page 1 and page 2. Page 1 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 can display one or more interface elements (such as common application folder 602, large application folder 603, setting application icon 604, etc.), and page 2 can display one or more interface elements (such as gallery card 601, wealth application icon, memo application icon, etc.). Optionally, desktop 600 can also display one or more items of page indicator, status bar, and tray area. The specific description of the one or more items can refer to the above. Figure 3A The relevant description in the illustrated embodiment will not be repeated here.

[0205] The electronic device 100 can receive and respond to the user's operation of dragging the gallery card 601 to the position 1 of the display area 1, and display the following Figure 6B The desktop 600 shown in FIG. 1 is a desktop 600. The operation of the user dragging the gallery card 601 to the position 1 of the display area 1 may include a long press operation and a drag operation of the user on the gallery card 601. The specific interface change diagram can refer to the above FIG. 3B to FIG. 3D , FIG. 4B to FIG. 4D , FIG. 5B to FIG. 5D The interface diagram is shown and will not be described in detail here.

[0206] like Figure 6B As shown, the interface elements displayed at position 1 may include: the common application folder 602, the large application folder 603, and the setting application icon 604. These interface elements are conflicting elements. And at position 1, the right half of the common application folder 602, the left half of the large application folder 603, and the entire setting application icon 604 are displayed. Optionally, an initial position prompt may also be displayed at the initial position of the gallery card 601. The initial position prompt may be Figure 6B The rectangular frame 601a shown in FIG. 601a may also be a prompt of other shapes. Figure 6B It can be seen that there is no position set in the display area 2 that can accommodate and display the above-mentioned conflicting elements respectively.

[0207] When the electronic device 100 determines that it is unable to find positions in the display area 2 that can accommodate and display the above-mentioned conflicting elements for the above-mentioned four conflicting elements, the electronic device 100 can receive and respond to the user's release operation, and display the following: Figure 6C The desktop 600 shown displays the gallery card 601 at the initial position in the display area 2.

[0208] like Figure 6C As shown, the electronic device 100 displays a desktop 600, and Figure 6C The displayed desktop 600 is the same as the above Fig. 6A The displayed desktop 600 is exactly the same.

[0209] In other embodiments, when the electronic device 100 receives an operation from the user to move the interface element 1 from the initial position in the page 2 to the position 1 in the page 1, if the display area 2 does not have one or more interface elements (also called conflicting elements) that can be respectively accommodated to be displayed at the display position 1, the electronic device 100 may also add a new page, arrange and display the one or more conflicting elements in the first layout in the new page, and display the interface element 1 at the position 1. In this way, when there is no position set sufficient to accommodate the conflicting elements on both the page 1 and the page 2, the new page can be added to ensure that the interface element 1 is moved successfully.

[0210] Exemplarily, in response to the user moving the gallery card 601 from the initial position of the display area 2 to the position 1 in the display area 1, the electronic device 100 displays the above Figure 6B Desktop 600 is shown.

[0211] When the electronic device 100 determines that it is unable to find positions in the display area 2 that can accommodate and display the above-mentioned conflicting elements for the above-mentioned four conflicting elements, the electronic device 100 can receive and respond to the user's release operation, and display the following: Fig.6D The desktop 600 is shown, and the gallery card 601 is displayed at position 1 in display area 1.

[0212] like Fig.6D As shown, a gallery card 601 is displayed in display area 1, and the four conflicting elements originally displayed at position 1 are no longer displayed in display area 1. In addition, Fig.6D The page indicator in the desktop 600 shown indicates that the desktop 600 is Figure 6B In the illustrated embodiment, two new pages are added.

[0213] The electronic device 100 can receive and respond to the user's operation of switching the page to the two rightmost pages (such as multiple left sliding operations), and display the following on the desktop 600: Fig. 6E Page 3 and Page 4. Page 3 displays the conflicting element that was originally displayed at position 1.

[0214] like Fig. 6E As shown, the desktop 600 may display page 3 and page 4, wherein page 3 displays the conflicting element originally displayed at position 1, and the conflicting element may be displayed while maintaining the original position relationship.

[0215] In some application scenarios, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display page 1 of the desktop on the display area 1, and display page 2 of the desktop on the display area 2. Page 2 may include an interface element 1 displayed at an initial position. When the electronic device 100 receives an operation by a user to move the interface element 1 from the initial position in page 2 to position 1 in page 1, if the display area 2 can accommodate and display (accommodate and display or accommodate and display in a second layout) one or more interface elements (also referred to as squeezed elements) displayed in a second layout at position 3 below position 1, the electronic device 100 may display the interface elements originally displayed in the first layout at position 1 at position 4 below position 1 in the first layout, display the conflicting elements originally displayed at position 3 in the display area 2, and display the interface element 1 at position 1. The size of position 4 is the size of the total area occupied by one or more interface elements arranged and displayed in the first layout in position 1. Position 3 may be the same as or different from position 4. In this way, the interface element at position 1 can be pushed downward, and the conflicting element at position 3 below position 1 can be pushed into other display areas. This improves efficiency, and allows the original interface element at position 1 to be displayed in display area 1 with the original layout, which is convenient for users. In some embodiments, position 3 can also be a position above, to the left, or to the right of position 1, which is not limited in this application.

[0216] For example, Fig. 7A As shown, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. When the foldable display screen is in an unfolded state, the electronic device 100 may display a desktop 600 on the foldable display screen.

[0217] The desktop 700 displays two pages with interface elements (such as application icons, service cards, application folders, etc.), including page 1 and page 2. Page 1 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 may display one or more interface elements (such as music application icon 702, film and television application icon 703, calendar application icon 704, recipe application icon 705, gallery application icon 706, voice application icon 707, Bluetooth application icon 708, and recording application icon 709, etc.), and page 2 may display one or more interface elements (such as gallery card 701, wealth application icon, memo application icon, etc.). Optionally, the desktop 700 may also display one or more items of page indicators, status bar, and tray area. The specific description of the one or more items can refer to the above. Figure 3A The relevant description in the illustrated embodiment will not be repeated here.

[0218] The electronic device 100 can receive and respond to the user's operation of dragging the gallery card 701 to the position 1 of the display area 1, and display the following Figure 7B The desktop 700 shown in FIG. 1 is a desktop 700. The operation of the user dragging the gallery card 701 to the position 1 of the display area 1 may include a long press operation and a drag operation of the user on the gallery card 701. The specific interface change diagram can refer to the above FIG. 3B to FIG. 3D , FIG. 4B to FIG. 4D , FIG. 5B to FIG. 5D The interface diagram is shown and will not be described in detail here.

[0219] like Figure 7B As shown, the gallery card 701 is displayed over the top of position 1. The following four interface elements are displayed at position 1 in page 1: music application icon 702, film and television application icon 703, calendar application icon 704 and recipe application icon 705, and the four interface elements are distributed in 2*2 rows and columns; the following four interface elements are displayed in position 3 below position 1: gallery application icon 706, voice application icon 707, Bluetooth application icon 708 and recording application icon 709, and the four interface elements are distributed in 2*2 rows and columns, and the size of position 3 is the same as the size of the positions occupied by the four interface elements at position 1. Optionally, an initial position prompt can also be displayed at the initial position of the gallery card 701, and the initial position prompt can be Figure 7B The rectangular frame 701a shown in FIG. 701a may also be a prompt of other shapes. Figure 7B It can be seen that the initial position in the display area 2 can accommodate the four interface elements displayed at the display position 3.

[0220] When the electronic device 100 detects that the user drags the gallery card 701 at a speed less than a preset value, the four interface elements displayed at position 1 may be pushed downward to display the following: Figure 7C Desktop 600 is shown.

[0221] like Figure 7C As shown, a gallery card 701 is displayed at position 1 of page 1, and a music application icon 702, a film and television application icon 703, a calendar application icon 704, and a recipe application icon 705 are displayed at position 3 below position 1, and the four interface elements are arranged in 2*2 rows and columns. A gallery application icon 706, a voice application icon 707, a Bluetooth application icon 708, and a recording application icon 709 are displayed at the initial position in display area 2, and the four interface elements are arranged in 2*2 rows and columns.

[0222] The electronic device 100 can receive and respond to the user's release operation, such as Fig.7D As shown, keep Figure 7C The layout of the interface elements in desktop 700 is shown.

[0223] Understandably, FIG. 7A to FIG. 7D The illustrated embodiment is merely an example. In the embodiment of the present application, if the initial position in the display area 2 can accommodate the interface element (i.e., the conflicting element) displayed at position 3 in the first layout in the first layout, the electronic device 100 can display the conflicting element in the first layout at the initial position; if there is a position 2 in the display area 2 that can accommodate the display of the above-mentioned conflicting element in the first layout, the electronic device 100 can also display the conflicting element at position 2 in the first layout, and position 2 is different from the initial position; if the display area 2 can accommodate the display of the above-mentioned conflicting elements separately, the electronic device 100 can also display the conflicting elements separately in the display area 2.

[0224] The following describes the method flow for moving interface elements provided in an embodiment of the present application.

[0225] Figure 8 A flow chart of a method for moving an interface element provided in an embodiment of the present application is shown.

[0226] like Figure 8 As shown, the specific process of the interface element moving method may include the following steps:

[0227] S801, the electronic device 100 is in an expanded state, display area 1 displays one or more interface elements, and display area 2 displays one or more interface elements, including interface element 1.

[0228] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, please refer to the above Figure 1B and Figure 1E The relevant contents in the illustrated embodiment will not be repeated here.

[0229] In the expanded state, display area 1 of the electronic device 100 displays one or more interface elements, and display area 2 may also display one or more interface elements (including interface element 1).

[0230] For example, in the above Figure 3A In the illustrated embodiment, one or more interface elements displayed in display area 1 may include a music application icon 305, a film and television application icon 306, a calendar application icon 307, a recipe application icon 308, etc., and one or more interface elements displayed in display area 2 may include a gallery card 304, a theme application icon, and a wealth application icon, etc., wherein interface element 1 may be a gallery card 304.

[0231] S802 , the electronic device 100 receives an operation 1 from a user on an interface element 1 , and in response to the operation 1 , displays a movement track of the interface element 1 .

[0232] Operation 1 may be a drag (also referred to as dragging, moving, etc.) operation of the user on the interface element 1. In some embodiments, operation 1 may also be a long-press drag operation, that is, operation 1 includes a long-press operation and a drag operation. Figure 3B In the embodiment shown, the drag operation is performed on the gallery card 304. Operation 1 may also include the above Figure 3A In the embodiment shown, the long press operation of the gallery card 304 and the above Figure 3B The drag operation on the gallery card 304 in the illustrated embodiment.

[0233] In response to operation 1 on interface element 1, electronic device 100 can display the movement track of interface element 1 based on the track of operation 1 on the foldable display screen (including display area 1 and display area 2). That is, electronic device 100 can make interface element 1 move along the track of operation 1.

[0234] In other embodiments, the electronic device 100 may also determine the target position of the interface element 1 (ie, position 1 hereinafter) based on the user's operation 1 on the interface element 1 , and display the movement trajectory of the interface element 1 based on the target position.

[0235] S803, the electronic device 100 obtains the initial position information of the interface element 1, including the size of the initial position and the coordinate 1 of the initial position in the coordinate system 2, where the initial position is the original position of the interface element 1 in the display area 2, and the coordinate system 2 is a two-dimensional coordinate system constructed on the display area 2 with the upper left corner of the display area 2 as the origin.

[0236] The initial position of the interface element 1 is the position of the interface element 1 in the display area 2 before the electronic device 100 responds to the operation 1 .

[0237] The size of the initial position may include the horizontal size and the vertical size of the initial position. In the embodiment of the present application, the size of the initial position is the same as the size of the interface element 1. The size of the interface element 1 may also include the horizontal size and the vertical size of the interface element 1.

[0238] The size of the interface element 1 is used to indicate the horizontal size and vertical size of the area that the interface element 1 needs to occupy in the display screen (display area 1 or display area 2). Figure 1JAs can be seen from the grid layout shown, the display area 2 can be divided into multiple rows and columns of units. In this case, the size of the interface element 1 can be used to indicate the number of units that the interface element 1 needs to occupy in the display area 2 and the arrangement of the units, wherein the horizontal size of the interface element 1 refers to the number of columns of units that the interface element 1 needs to occupy in the display screen, and the vertical size refers to the number of rows of units that the interface element 1 needs to occupy in the display screen. Exemplarily, if the size of the interface element 1 is 1*2, that is, the horizontal size is 2 and the vertical size is 1, then the interface element 1 needs to occupy two units in the display screen, and the arrangement of the two units is a 1*2 row and column distribution, that is, the interface element 1 needs to occupy 1 row and 2 columns of units in the display screen. Another exemplary example, if the size of the interface element 1 is 4*2, that is, the horizontal size is 2 and the vertical size is 4, then the interface element 1 needs to occupy 8 units in the display screen, and the arrangement of the 8 units is a 4*2 row and column distribution, that is, the interface element 1 needs to occupy 4 rows and 2 columns of units in the display screen.

[0239] The coordinate system 2 may be a coordinate system constructed on the display area 2 with the upper left corner of the display area 2 or any other point on the display area 2 (such as the center point, lower right corner, upper right corner, etc. of the display area 1) as the origin, which is not limited in this application. In some embodiments, the electronic device 100 may obtain the row and column order of each unit on the display area 2, and use this as the coordinate of the unit in the display area. For example, when the electronic device 100 takes the upper left corner of the display area 1 as the origin, downward as the positive direction of the horizontal axis, rightward as the positive direction of the vertical axis, the horizontal dimension of a unit is the vertical unit 1, and the vertical dimension of a unit is the horizontal unit 1, when constructing a two-dimensional coordinate system on the display area 1, the row and column order of each unit can be regarded as the horizontal and vertical coordinates of the unit in the coordinate system. In other embodiments, the origin of the coordinate system 2 may also be other points, each unit may correspond to an integer coordinate point, and there are no non-integer coordinates in the coordinate system 2. At this time, the electronic device 100 can determine the coordinates of each unit in the coordinate system 2 based on the row and column order of the unit. For example, if the display area 2 includes units distributed in 6*4 rows and columns, the coordinate system 2 can be a two-dimensional coordinate system constructed on the display area 2 with the upper left corner of the display area 2 (i.e., the unit in the first row and the first column from the left) as the origin, extending downward in the positive direction of the vertical axis, and extending rightward in the positive direction of the horizontal axis. In the coordinate system 2, the horizontal coordinate corresponding to the unit is the number of columns of the unit minus one, and the vertical coordinate of the unit is the number of rows of the unit minus one. That is, the coordinates of the unit in the first row and the first column under the coordinate system 2 are (0,0); the coordinates of the unit in the third row and the second column under the coordinate system 2 are (1,2). Among them, the numbers on the left side of the brackets are the horizontal coordinates, and the numbers on the right side of the brackets are the vertical coordinates. It can be understood that this is only an exemplary way of constructing a coordinate system 2. In the embodiment of the present application, the electronic device 100 can also construct the coordinate system 2 with any point on the display area 2 (such as the upper right corner, lower right corner, center point, etc. of the display area 2) as the origin, and the present application is not limited here.

[0240] Coordinate 1 is used to determine the position of the initial position in the display area 2. Coordinate 1 may be a coordinate point in the initial position (e.g., a coordinate point of the upper left corner of the initial position in the coordinate system 2). In some embodiments, when the horizontal dimension or the vertical dimension of the initial position is greater than 1, coordinate 1 may also be a coordinate set including multiple coordinate points.

[0241] For example, the above Figure 3ATaking the illustrated embodiment as an example, the interface element 1 is a gallery card 304, and the initial position includes the following four units in the display area 2: unit (3,1), unit (3,2), unit (4,1) and unit (4,2). Then, coordinate 1 can be the coordinate of unit (3,1) in coordinate system 2, such as coordinate (0,2); coordinate 1 can also include the coordinates of the above four units in coordinate system 2, such as: coordinate (0,2), (1,2), (0,3) and (1,3). It should be noted that when a unit is represented by a number, the number on the left side of the bracket is used to represent the row sequence of the unit in the corresponding display screen (such as display area 2), and the number on the right side of the bracket is used to represent the column sequence of the unit in the corresponding display screen (such as display area 2). When the coordinate is represented by a number, the number on the left side of the bracket is the horizontal coordinate, and the number on the right side of the bracket is the vertical coordinate.

[0242] S804, the electronic device 100 detects that the moving speed of the operation 1 on the display area 1 is less than a preset value, and determines the position 1 where the interface element 1 is temporarily displayed on the display area 1, and the size of the position 1 is the same as the size of the initial position.

[0243] When the user drags interface element 1 to display area 1 through operation 1, and the moving speed of operation 1 is less than a preset value, the electronic device 100 can determine the position where interface element 1 is temporarily displayed on display area 1 as position 1, and the size of position 1 is the same as the size of interface element 1, that is, the same as the size of the initial position.

[0244] In other embodiments, the electronic device 100 may also determine the position 1 based on other factors other than the moving speed (eg, a selection operation for the position 1, etc.), which is not limited in the present application.

[0245] According to the above Figure 1J As can be seen from the illustrated embodiment, the grid layout of the display area 1 may also include multiple rows and columns of cells, and position 1 may include one or more cells on the display area 1. The number of cells and the arrangement of the cells included in position 1 are the same as the number of cells and the arrangement of the cells indicated by the size of the interface element 1. Figure 3D In the illustrated embodiment, interface element 1 is a gallery card 304, the size of interface element 1 is 2*2, the size of position 1 is 2*2, that is, position 1 includes 4 units on display area 1, and the arrangement of the 4 units is a 2*2 row and column distribution.

[0246] S805, the electronic device 100 determines a conflicting element set based on position 1, including one or more interface elements displayed at position 1.

[0247] After determining position 1, the electronic device 100 may determine one or more interface elements displayed at position 1 as conflicting elements. Thereafter, the electronic device 100 may determine a conflicting element set, the conflicting element set including the one or more conflicting elements.

[0248] For example, in the above Figure 3D In the illustrated embodiment, the following four interface elements are displayed at position 1: a music application icon 305, a film and television application icon 306, a calendar application icon 307, and a recipe application icon 308. The electronic device 100 can determine that the conflicting element set includes the following four conflicting elements: the music application icon 305, the film and television application icon 306, the calendar application icon 307, and the recipe application icon 308.

[0249] S806, the electronic device 100 determines the temporary placeholder information of the conflicting element set, including the size of each conflicting element in the conflicting element set, the positional relationship between the conflicting elements, and the coordinate 2 of the conflicting element set in the coordinate system 1, where the coordinate system 1 is a two-dimensional coordinate system constructed on the display area 1 with the upper left corner of the display area 1 as the origin.

[0250] The temporary placeholder information may include the size of each conflicting element in the conflicting element set, the positional relationship between the conflicting elements, and the coordinate 2 of the conflicting element set under the coordinate system 1. The specific description of the size of the conflicting element may refer to the relevant description of the size of the interface element 1 in the above step S803. The positional relationship between the conflicting elements refers to the arrangement layout of all conflicting elements at position 1, which may also be referred to as the first layout in this application. Coordinate system 1 may be a coordinate system constructed on the display area 1 with the upper left corner of the display area 1 as the origin. In another possible implementation, coordinate system 1 may also be a coordinate system constructed on the display area 1 with any other point on the display area 1 (such as the center point, lower right corner, upper right corner, etc. of the display area 1) as the origin, which is not limited in this application. Coordinate 2 is used to determine the position of the conflicting element set in the display area 1. Coordinate 2 may be a coordinate point in the conflicting element set (such as the coordinate point of the upper left corner under the coordinate system 1). In some embodiments, when the horizontal coordinate or the vertical coordinate of the area occupied by the conflicting element set in the display area 1 is greater than 1, coordinate 2 may also be a coordinate set including multiple coordinate points.

[0251] The temporary placeholder information of the conflict element set is used to indicate that the relative positions of the conflict elements in the conflict element set are maintained to accommodate the size of the area required to display the conflict element set, that is, to maintain the original layout of the conflict elements to accommodate the number of units and the arrangement of the units required to display all the conflict elements.

[0252] In some embodiments, the electronic device 100 may construct a temporary placeholder matrix to represent temporary placeholder information of conflicting element sets.

[0253] For example, in the above Figure 3D In the illustrated embodiment, the conflict element set includes the following four conflict elements: a music application icon 305, a film and television application icon 306, a calendar application icon 307, and a recipe application icon 308. The size of each conflict element is 1*1, that is, each conflict element only needs to occupy one unit. And the four units occupied by the four conflict elements are arranged in a 2*2 row and column distribution. In this case, a 2*2 dimensional matrix can be constructed for the conflict element set. Each number "1" or "0" in the matrix can correspond to a unit on the display screen. In the matrix, "1" represents that the unit is occupied (that is, the conflict element needs to be displayed), and "0" represents that the unit is not occupied (that is, the conflict element does not need to be displayed). The temporary placeholder information of the above-mentioned conflict element set can be represented by the following temporary placeholder matrix M1:

[0254]

[0255] According to formula (11), the temporary placeholder matrix M1 is a 2*2 dimensional matrix, including 2 rows and 2 columns, and each number in the matrix is ​​"1". According to the temporary placeholder matrix M1, if the relative positions of the conflicting elements in the conflicting element set are to be kept unchanged and the conflicting element set is to be moved, at least a blank area of ​​2*2 is required to accommodate and display the conflicting element set.

[0256] It is understandable that the above embodiment is only an illustrative example of how to represent the temporary placeholder information of the conflict element set by constructing a temporary placeholder matrix. In the embodiment of the present application, the conflict element set may also be a set of conflict elements different from the above embodiment, and the temporary placeholder matrix may also be a matrix of different dimensions or different content from M1. In some embodiments, the electronic device 100 may also use other numbers to indicate whether the corresponding unit is occupied when constructing the temporary placeholder matrix (or constructing other placeholder matrices such as the initial placeholder matrix), or use other methods to represent the temporary placeholder information, which is not limited in the present application.

[0257] S807: The electronic device 100 determines whether there is a position 2 in the initial position that can accommodate the display conflict element set based on the temporary placeholder information and the initial position information.

[0258] It should be noted that position 2 can accommodate the display conflict element set, which means that the position relationship of each conflict element in the conflict element set before operation 1 can be maintained (that is, the relative position of each conflict element is maintained) and all conflict elements in the conflict element set can be placed in position 2.

[0259] The electronic device 100 can construct an initial placeholder matrix based on the size of the initial position (the size of the interface element 1). The dimension of the initial placeholder matrix is ​​the same as the size of the interface element 1, and each number in the matrix is ​​"0", which is used to indicate that after the interface element 1 is dragged, the initial position is in an idle state (i.e., unoccupied state).

[0260] For example, the above FIG. 3A to FIG. 3F Taking the embodiment shown as an example, according to the initial position information, the size of the gallery card 304 is 2*2. In this case, the initial placeholder matrix can be the following matrix L1:

[0261]

[0262] According to formula (12), the dimension of the initial placeholder matrix is ​​the same as the size of the gallery card 304, which is a 2*2 dimensional matrix, and all numbers in the matrix are "0". This means that at the initial position, there are four unoccupied cells, and the arrangement of the four cells is a 2*2 row and column distribution.

[0263] It is understandable that the above embodiment is only an exemplary explanation that the initial position information can be represented by constructing an initial placeholder matrix. In the embodiment of the present application, the initial position can also be other positions, and the initial placeholder matrix can also be a matrix with different dimensions or different contents from L1. In some embodiments, the electronic device 100 can also construct an initial placeholder matrix in the above step S803, that is, after obtaining the initial position information, construct an initial placeholder matrix. This application does not limit this.

[0264] After determining the initial placeholder matrix, the electronic device 100 may determine whether the initial position can accommodate the display conflict element set based on the initial placeholder matrix and the temporary placeholder matrix.

[0265] For example, in the above FIG. 3A to FIG. 3F In the illustrated embodiment, the initial placeholder matrix is ​​the initial placeholder matrix L1 shown in the above formula (12), and the temporary placeholder matrix is ​​the temporary placeholder matrix M1 shown in the above formula (11). According to the above formulas (11) and (12), there are 2*2 free cells in the initial placeholder matrix L1, which can be used to accommodate the display of the 2*2 conflict element set. That is, in the above FIG. 3A to FIG. 3F In the illustrated embodiment, the electronic device 100 may determine that there is a position 2 in the initial position that can accommodate the display conflict element set, and the position 2 is the same as the initial position.

[0266] In some embodiments, the electronic device 100 may not construct a temporary placeholder matrix and an initial placeholder matrix. In this case, the electronic device 100 may determine whether the original positional relationship of each conflicting element can be maintained based on the size of the initial position and the temporary placeholder information and place the conflicting elements in the conflicting element set at the initial position on the display area 2.

[0267] For example, in the above FIG. 3A to FIG. 3F In the illustrated embodiment, the size of the initial position is 2*2, the size of the conflict element set is 2*2, and the size of the conflict element set refers to the size of the area required to display all conflicting elements in the conflict element set while maintaining the original positional relationship of each conflict element set. As can be seen from the foregoing, the horizontal size of the initial position is not less than the horizontal size of the conflict element set, and the vertical size of the initial position is not less than the vertical size of the conflict element set, so the electronic device 100 can determine that there is a position 2 in the initial position that can accommodate the display of the conflict element set, and the position 2 is the same as the initial position.

[0268] In some embodiments, the electronic device 100 may also determine whether the one or more conflicting elements displayed at position 1 are all of the one or more conflicting elements based on the temporary placeholder information, that is, determine whether the one or more conflicting elements displayed at position 1 are all complete elements. If all conflicting elements displayed at position 1 are complete conflicting elements, it means that position 1 can accommodate the one or more conflicting elements displayed in the first layout arrangement. Since the size of position 1 is the same as the size of the initial position, the initial position can also accommodate the one or more conflicting elements displayed in the first layout arrangement.

[0269] It is understandable that the above are just two other exemplary methods for determining whether the initial position can accommodate the display of the conflicting element set based on the size of the initial position and the size of the conflicting element set. In the embodiment of the present application, the electronic device 100 may also determine whether the initial position can accommodate the display of the conflicting element set in a different manner from the above embodiment.

[0270] In some embodiments, position 2 may also be a partial area of ​​the initial position. In this case, when the electronic device 100 determines that position 2 exists based on the temporary placeholder information and the initial position information, it may determine the position relationship of position 2 relative to the initial position. And based on the coordinates of the initial position in the coordinate system, the coordinates of position 2 in the coordinate system 2 are determined.

[0271] When the electronic device 100 determines that there is a position 2 in the initial position that can accommodate the display conflict element set, the following step S809 may be executed;

[0272] When the electronic device 100 determines that there is no position 2 in the initial position that can accommodate the display conflicting element set, the following step S808 can be executed to determine that the squeezing fails.

[0273] S808: The electronic device 100 determines that the exchange of the positions fails.

[0274] In some embodiments, after the electronic device 100 determines that the exchange position fails, after detecting that the user releases the interface element 1, the interface element 1 can be redisplayed at the initial position of the display area 2. The interface schematic diagram can refer to the above FIG. 6A to FIG. 6C The embodiment shown.

[0275] In some embodiments, after the electronic device 100 determines that the exchange squeeze fails, other judgment logic may be executed. For details, please refer to the following Fig.11 The relevant contents in the illustrated embodiment will not be described in detail here.

[0276] In other embodiments, the electronic device 100 may also create a new page, and display all conflicting elements in the conflicting element set in the new page while maintaining their original relative positions (maintaining their original layout). For details, please refer to the above FIG. 6D to FIG. 6E The embodiment shown.

[0277] S809 , the electronic device 100 determines coordinate 3 of position 2 in coordinate system 1 .

[0278] The electronic device 100 can determine the relative position relationship between position 2 and the initial position in the above step S807, and determine the coordinates of position 2 in coordinate system 2. Afterwards, the electronic device 100 can obtain the coordinates 3 of position 2 in coordinate system 1 through coordinate conversion based on the coordinates of position 2 in coordinate system 2 and the relationship between coordinate system 1 and coordinate system 2.

[0279] For example, in the above FIG. 3A to FIG. 3F In the embodiment shown, position 2 is the initial position in display area 2 (i.e. Figure 3D The coordinate system 1 is created with the upper left corner of the display area 1 as the origin, and the coordinate system 2 is created with the upper left corner of the display area 2 as the origin. It can be seen that the coordinates of position 2 in coordinate system 2 can include the following four coordinate points: (0,2), (0,3), (1,2) and (1,3). According to the positional relationship between display area 1 and display area 2, and the size of display area 1, it can be seen that the coordinates of the origin of coordinate system 2 in coordinate system 1 are (4,0), that is, the ordinates of all coordinate points in coordinate system 2 in coordinate system 1 remain unchanged, and the abscissas are increased by 4. After coordinate conversion, it can be seen that the coordinates of position 2 in coordinate system 1 can include the following four coordinate points: (4,2), (4,3), (5,2) and (5,3).

[0280] In some embodiments, the electronic device 100 may also determine the row sequence and column sequence of each unit included in the position 2 in the display area 2 in step S807. Afterwards, the electronic device 100 may also determine the coordinate 3 of the position 2 in the coordinate system 1 based on the arrangement of the units in the display area 1 and the display area 2, and the relationship between the row sequence sequence of the unit and the coordinate system.

[0281] S810: The electronic device 100 displays the movement trajectory of the conflicting element set based on coordinate 2 and coordinate 3.

[0282] Coordinates 2 and 3 are both coordinates in coordinate system 1. Coordinates 2 are the positions of the conflicting element set before movement, and coordinates 3 are the positions of the conflicting element set after movement. The electronic device 100 can display the movement track of the conflicting element set based on coordinates 2 and 3.

[0283] S811, electronic device 100 detects operation 2 for interface element 1, deletes interface element 1 in display area 2, and adds interface element 1 to display area 1 based on the coordinates of position 1 in coordinate system 1.

[0284] Operation 2 may be a release operation on interface element 1. Figure 3E The user is shown releasing the card 304 .

[0285] S812, the electronic device 100 obtains coordinate 4 of position 2 in coordinate system 2.

[0286] The electronic device 100 may obtain the coordinate 4 of the position 2 in the coordinate system 2 by coordinate conversion based on the coordinate 3 of the position 2 in the coordinate system 1 and the relationship between the coordinate 1 and the coordinate 2. The specific conversion method may be the inverse operation of the coordinate conversion method shown in the above step S809. In some embodiments, the electronic device 100 may also obtain and store the coordinate of the position 2 in the coordinate system 2 after determining the position 2, so as to facilitate reading and use in step S812.

[0287] S813 , the electronic device 100 deletes the conflicting element set in the display area 1 , and adds the conflicting element set to the display area 2 based on the coordinate 4 .

[0288] Understandably, Figure 8 The illustrated embodiment is only an example. In the embodiment of the present application, the electronic device 100 may further include more than two display screens, which is not limited in the present application.

[0289] In this way, even if there is not enough space in the display area 1 to accommodate the display interface element 1, the electronic device 100 can exchange the positions of one or more conflicting elements arranged in the first layout in the display area 1 with the position of the interface element 1 in the display area 2, thereby simplifying the operation steps and improving efficiency.

[0290] Fig. 9 A flow chart of another method for moving interface elements provided in an embodiment of the present application is shown.

[0291] like Fig. 9 As shown, the specific process of the method for moving interface elements based on overall squeezing may include the following steps:

[0292] S901, the electronic device 100 is in an expanded state, display area 1 displays one or more interface elements, and display area 2 displays one or more interface elements, including interface element 1.

[0293] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, please refer to the above Figure 1B and Figure 1E The relevant contents in the illustrated embodiment will not be repeated here.

[0294] In the expanded state, display area 1 of the electronic device 100 displays one or more interface elements, and display area 2 may also display one or more interface elements (including interface element 1).

[0295] For example, in the above Figure 4A In the illustrated embodiment, one or more interface elements displayed in display area 1 may include a large application folder 402, a settings application icon 403, a health application icon 404, and a gallery application icon 405, etc., and one or more interface elements displayed in display area 2 may include a gallery card 401, a life application icon, and a wealth application icon, etc., wherein interface element 1 may be a gallery card 401.

[0296] S902 , the electronic device 100 receives an operation 1 from the user on the interface element 1 , and displays a movement track of the interface element 1 in response to the operation 1 .

[0297] Operation 1 may be a drag (also referred to as dragging, moving, etc.) operation of the user on the interface element 1. In some embodiments, operation 1 may also be a long-press drag operation, that is, operation 1 includes a long-press operation and a drag operation. Figure 4B In the embodiment shown, the drag operation is performed on the gallery card 401. Operation 1 may also include the above Figure 4A In the embodiment shown, the long press operation of the gallery card 401 and the above Figure 4B The drag operation on the gallery card 401 in the illustrated embodiment.

[0298] In response to operation 1 on interface element 1, electronic device 100 can display the movement track of interface element 1 based on the track of operation 1 on the display screen (including display area 1 and display area 2). That is, electronic device 100 can make interface element 1 move along the track of operation 1.

[0299] In other embodiments, the electronic device 100 may also determine the target position of the interface element 1 (ie, position 1 hereinafter) based on the user's operation 1 on the interface element 1 , and display the movement trajectory of the interface element 1 based on the target position.

[0300] S903, the electronic device 100 obtains the size of the interface element 1.

[0301] For details on the size of interface element 1, please refer to the above Figure 8 The relevant contents in step S803 are not repeated here.

[0302] S904, the electronic device 100 obtains the screen occupancy information of the display area 2, including the coordinates of all units on the display area 2 in the coordinate system 2 and the occupancy status of each unit. The coordinate system 2 is a two-dimensional coordinate system constructed on the display area 2 with the upper left corner of the display area 2 as the origin.

[0303] By the above Figure 1J It can be seen from the illustrated embodiment that the foldable display screen (including display area 1 and display area 2) of the electronic device 100 may include a plurality of units distributed in rows and columns.

[0304] The occupancy status of each unit includes an occupied state and an idle state (ie, an unoccupied state). A unit in an occupied state means that the unit displays an interface element, and a unit in an idle state means that the unit does not display an interface element.

[0305] The screen occupancy information of the display area 2 can be used to indicate the coordinates of all units on the display area 2 and the occupancy status of each unit. It should be noted that in the screen occupancy information of the display area 2 obtained in step S904, one or more units included in the initial position of the interface element 1 (i.e., the position of the interface element 1 in the display area 2 before responding to the operation 1) are in an idle state.

[0306] Coordinate system 2 can refer to the above Figure 8 The relevant description of step S803 is shown.

[0307] In some embodiments, the screen occupancy information of the display area 2 may be a screen occupancy matrix. The dimension of the screen occupancy matrix may be determined based on the row and column distribution of the units on the display area 2. For example, if the display area 2 includes a plurality of units distributed in 4 rows and 4 columns, the dimension of the screen occupancy matrix may be 4*4; for another example, if the display area 2 includes a plurality of units distributed in 6 rows and 4 columns, the dimension of the screen occupancy matrix may be 6*4, and so on. The screen occupancy matrix may include zero, one or more first numbers (e.g., the number "1"), and zero, one or more second numbers (e.g., the number "0"), the first number being different from the second number. The row sequence and column sequence of the first number or the second number in the screen occupancy matrix may correspond to the unit having the same row sequence and column sequence in the display area 2. The unit corresponding to the first number is in an occupied state in the display area 2, and the unit corresponding to the second number is in an idle state (i.e., unoccupied state) in the display area 2. In this way, the positions of zero, one or more first numbers in the screen occupation matrix can be used to determine the zero, one or more occupied cells in the display area 2; the positions of zero, one or more second numbers in the screen occupation matrix can be used to determine the zero, one or more unoccupied cells in the display area 2. That is, the screen occupation matrix of the display area 2 indicates the screen occupation information of the display area 2.

[0308] Exemplarily, before receiving and responding to operation 1, for example, in the above Figure 3A In the embodiment shown, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix B0 shown in formula (2); Figure 4A In the embodiment shown, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix B1 shown in formula (4); Figure 5A In the illustrated embodiment, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix B2 shown in formula (8), and so on. In another exemplary embodiment, after receiving and responding to operation 1, for example, in the above Figure 4B or Figure 4C In the embodiment shown, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix D1 shown in the above formula (6); Figure 5B or Figure 5C In the illustrated embodiment, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix D2 shown in the above formula (10), and so on.

[0309] In some other embodiments, the electronic device 100 may not construct a screen occupancy matrix. In this case, the screen occupancy information acquired by the electronic device 100 may include the coordinates of each unit in the coordinate system 2, and may also include whether each unit is occupied.

[0310] S905, the electronic device 100 detects that the moving speed of operation 1 on display area 1 is less than a preset value, and determines position 1 where interface element 1 is temporarily displayed on display area 1, and the size of position 1 is the same as the size of interface element 1.

[0311] The specific content of step S905 can refer to the above Figure 8 The relevant description of step S804 is not repeated here.

[0312] Position 1 may include one or more cells on display area 1. The number of cells and the arrangement of the cells included in position 1 are the same as the number of cells and the arrangement of the cells indicated by the size of interface element 1. Figure 4D In the illustrated embodiment, the interface element 1 is a gallery card 401, the size of the interface element 1 is 2*2, the size of the position 1 is 2*2, that is, the position 1 includes 4 units on the display area 1, and the arrangement of the 4 units is a 2*2 row and column distribution.

[0313] S906 , the electronic device 100 determines a conflicting element set based on position 1 , including one or more interface elements displayed at position 1 .

[0314] For example, in the above Figure 4D In the illustrated embodiment, the following four interface elements are displayed at position 1: a large application folder 402, a settings application icon 403, a health application icon 404, and a gallery application icon 405. The electronic device 100 may determine that the conflicting element set includes the following four conflicting elements: a large application folder 402, a settings application icon 403, a health application icon 404, and a gallery application icon 405.

[0315] S907, the electronic device 100 determines the temporary placeholder information of the conflicting element set, including the size of each conflicting element in the conflicting element set, the positional relationship between the conflicting elements, and the coordinate 2 of the conflicting element set in the coordinate system 1, where the coordinate system 1 is a coordinate system constructed on the display area 1 with the upper left corner of the display area 1 as the origin.

[0316] For the specific content of temporary placeholder information, please refer to the above Figure 8 The relevant description in step S806 is shown.

[0317] In some embodiments, the electronic device 100 may construct a temporary placeholder matrix to represent temporary placeholder information of conflicting element sets.

[0318] For example, in the above Figure 4DIn the illustrated embodiment, position 1 includes 4 cells on display area 1, and the arrangement of the 4 cells is a 2*2 row and column distribution. The conflict element set includes the following four conflict elements: a large application folder 402, a setting application icon 403, a health application icon 404, and a gallery application icon 405, and the size of the large application folder 402 is 2*2, and the sizes of the other three conflicting elements are all 1*1, and the cell in the lower left corner of the large application folder 402 occupies the cell in the upper right corner of position 1, the setting application icon 403 occupies the cell in the upper left corner of position 1, the health application icon 404 occupies the cell in the lower left corner of position 1, and the gallery application icon 405 occupies the cell in the lower right corner of position 1. In this case, a 3*3 dimensional matrix can be constructed for the conflict element set, and each first number (e.g., number "1") or second number (e.g., number "0") in the matrix can correspond to a cell. In the matrix, the first number represents that the cell is occupied (i.e., the conflict element needs to be displayed), and the second number represents that the cell is not occupied (i.e., the conflict element does not need to be displayed). Then the temporary placeholder information of the conflict element set can be represented by the 3*3 dimensional placeholder matrix C1 shown in the above formula (5).

[0319] According to formula (5), if the conflicting element set is to be moved while keeping the relative positions of the conflicting elements unchanged, at least 7 free cells are required, and the 7 free cells are all cells except the upper left corner cell and the lower right corner cell in the 9 cells distributed in 3*3 rows and columns.

[0320] It is understandable that the above embodiment is only an exemplary explanation that the temporary placeholder information of the conflict element set can be represented by constructing a temporary placeholder matrix. In the embodiment of the present application, the conflict element set can also be a set of conflict elements different from the above embodiment, and the temporary placeholder matrix can also be a matrix of different dimensions or different contents. In some embodiments, the electronic device 100 can also use other numbers to indicate whether the corresponding unit is occupied when constructing the temporary placeholder matrix (or constructing other placeholder matrices such as the initial placeholder matrix), or use other methods to represent the temporary placeholder information, which is not limited in the present application.

[0321] S908: The electronic device 100 determines whether there is a position 2 in the display area 2 that can accommodate the display conflict element set based on the temporary placeholder information and the screen placeholder information of the display area 2.

[0322] It should be noted that position 2 can accommodate the display of the conflict element set, which means that the position relationship of each conflict element in the conflict element set before operation 1 can be maintained (that is, the arrangement and layout of each conflict element at position 1 is maintained) and all conflict elements in the conflict element set are placed in position 2. Moreover, before the one or more conflict elements are placed in position 2 while maintaining the original position relationship, no interface element is displayed at position 2.

[0323] In some embodiments, the electronic device 100 may determine whether position 2 exists in the display area 2 based on the temporary placeholder matrix obtained in step S907 and the screen placeholder matrix of the display area 2 obtained in step S904.

[0324] For example, the above 4A to 4F Taking the illustrated embodiment as an example, the screen occupancy matrix of the display area 2 is the screen occupancy matrix D1 shown in the above formula (6), and the temporary occupancy matrix of the conflict element set is the occupancy matrix C1 shown in the above formula (5). By traversing the screen occupancy matrix D1 starting from the upper left corner of the matrix, it can be found that there are the following seven unoccupied cells in the screen occupancy matrix D1: cell (1,3), cell (1,4), cell (2,2), cell (2,3), cell (2,4), cell (3,2) and cell (3,3), and the row and column distribution of the seven cells is exactly the same as the row and column distribution of the seven numbers "1" in the occupancy matrix C1. Therefore, the electronic device 100 can determine that there is a position 2 in the display area 2 that can accommodate the display conflict element set, and the position 2 includes the seven cells.

[0325] In some embodiments, the electronic device 100 may not construct a temporary placeholder matrix and a screen placeholder matrix for the display area 2. In this case, the electronic device 100 may determine the distribution of free cells in the display area 2 based on the screen placeholder information for the display area 2, and determine whether position 2 exists based on the distribution of free cells and the temporary placeholder information.

[0326] After determining position 2, electronic device 100 can obtain the coordinates of position 2 in coordinate system 2 corresponding to display area 2. Coordinate system 2 is a two-dimensional coordinate system constructed on display area 2 with the upper left corner of display area 2 (or any point on display area 2) as the origin.

[0327] When the electronic device 100 determines that there is a position 2 in the display area 2 that can accommodate the display conflict element set, the following step S910 may be executed;

[0328] When the electronic device 100 determines that there is no position 2 in the display area 2 that can accommodate the display conflicting element set, the following step S909 may be executed to determine that the squeezing fails.

[0329] S909, the electronic device 100 determines that the overall squeezing fails.

[0330] In some embodiments, after the electronic device 100 determines that the overall squeezing has failed, after detecting that the user has released the interface element 1, the interface element 1 can be redisplayed at the initial position of the display area 2, that is, the cross-screen movement of the interface element 1 has failed.

[0331] In some embodiments, after the electronic device 100 determines that the overall squeeze fails, other judgment logic may be executed. For details, please refer to the following Fig.11 The relevant contents in the illustrated embodiment will not be described in detail here.

[0332] In other embodiments, the electronic device 100 may also create a new page, and display all conflicting elements in the conflicting element set in the new page while maintaining their original relative positions (maintaining their original layout). For details, please refer to the above FIG. 6D to FIG. 6E The embodiment shown.

[0333] S910 , the electronic device 100 determines coordinate 3 of position 2 in coordinate system 1 .

[0334] The electronic device 100 may determine the coordinates of the position 2 in the coordinate system 2 in the above step S908. Afterwards, the electronic device 100 may obtain the coordinates 3 of the position 2 in the coordinate system 1 through coordinate conversion based on the coordinates of the position 2 in the coordinate system 2 and the relationship between the coordinate system 1 and the coordinate system 2.

[0335] The specific method for electronic device 100 to determine the coordinates of position 2 in coordinate system 1 based on the coordinates of position 2 in coordinate system 2 can refer to the above Figure 8 The relevant contents in step S809 are not repeated here.

[0336] S911, the electronic device 100 displays the movement trajectory of the conflicting element set based on coordinate 2 and coordinate 3.

[0337] S912, the electronic device 100 detects operation 2 for interface element 1, deletes interface element 1 in display area 2, and adds interface element 1 to display area 1 based on the coordinates of position 1 in coordinate system 1.

[0338] Operation 2 may be a release operation on interface element 1. Figure 4E The user is shown releasing the card 401 .

[0339] S913, the electronic device 100 obtains coordinate 4 of position 2 in coordinate system 2.

[0340] S914 , the electronic device 100 deletes the conflicting element set in the display area 1 , and adds the conflicting element set to the display area 2 based on the coordinate 4 .

[0341] The specific contents of steps S911 to S914 can refer to the above Figure 8 The relevant contents of steps S810 to S813 are not repeated here.

[0342] Understandably, Fig. 9The illustrated embodiment is only an example. In the embodiment of the present application, the electronic device 100 may further include more than two display screens, which is not limited in the present application.

[0343] By adopting the interface element moving method provided in the embodiment of the present application, even if the initial position cannot accommodate one or more conflicting elements arranged in the first layout at display position 1, the electronic device 100 can also traverse the display area 2, find position 2 in the display area 2 that can accommodate the display of one or more conflicting elements arranged in the first layout, display the one or more conflicting elements in the first layout at position 2, and display the interface element 1 at position 1, thereby simplifying the operation steps and improving efficiency.

[0344] Fig.10 A flow chart of a method for moving interface elements based on dispersed squeezing provided in an embodiment of the present application is shown.

[0345] like Fig.10 As shown, the specific process of the interface element moving method based on dispersion and squeezing may include the following steps:

[0346] S1001, the electronic device 100 is in an expanded state, display area 1 displays one or more interface elements, and display area 2 displays one or more interface elements, including interface element 1.

[0347] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, please refer to the above Figure 1B and Figure 1E The relevant contents in the illustrated embodiment will not be repeated here.

[0348] In the expanded state, display area 1 of the electronic device 100 displays one or more interface elements, and display area 2 may also display one or more interface elements (including interface element 1).

[0349] For example, in the above Figure 5A In the illustrated embodiment, one or more interface elements displayed in display area 1 may include a frequently used application folder 502, a large application folder 503, a settings application icon 504, etc., and one or more interface elements displayed in display area 2 may include a gallery card 501, life application icons, and wealth application icons, etc., wherein interface element 1 may be a gallery card 501.

[0350] S1002 , the electronic device 100 receives an operation 1 from a user on an interface element 1 , and in response to the operation 1 , displays a movement track of the interface element 1 .

[0351] Operation 1 may be a drag (also referred to as dragging, moving, etc.) operation of the user on the interface element 1. In some embodiments, operation 1 may also be a long-press drag operation, that is, operation 1 includes a long-press operation and a drag operation. Figure 5B In the embodiment shown, the drag operation is performed on the gallery card 501. Operation 1 may also include the above Figure 5A In the embodiment shown, the long press operation of the gallery card 501 and the above Figure 5B The drag operation on the gallery card 501 in the illustrated embodiment.

[0352] The specific content of step S1002 can also refer to the above Figure 8 Step S802 and Fig. 9 The relevant description in step S902 is shown.

[0353] S1003, the electronic device 100 obtains the size of the interface element 1.

[0354] For details on the size of interface element 1, please refer to the above Figure 8 The relevant contents in step S803 are not repeated here.

[0355] S1004, the electronic device 100 obtains the screen occupancy information of the display area 2, including the coordinates of all units on the display area 2 in the coordinate system 2 and the occupancy status of each unit. The coordinate system 2 is a two-dimensional coordinate system constructed on the display area 2 with the upper left corner of the display area 2 as the origin.

[0356] The specific content of step S1004 can refer to the above Fig. 9 The relevant content in step S904 is shown.

[0357] S1005, the electronic device 100 detects that the moving speed of the operation 1 on the display area 1 is less than a preset value, and determines the position 1 where the interface element 1 is temporarily displayed on the display area 1, and the size of the position 1 is the same as the size of the initial position.

[0358] The specific content of step S1005 can refer to the above Figure 8 The relevant description of step S804 is not repeated here.

[0359] Position 1 may include one or more cells on display area 1. The number of cells and the arrangement of the cells included in position 1 are the same as the number of cells and the arrangement of the cells indicated by the size of interface element 1. Figure 5D In the illustrated embodiment, the interface element 1 is a gallery card 501, the size of the interface element 1 is 2*2, the size of the position 1 is 2*2, that is, the position 1 includes 4 units on the display area 1, and the arrangement of the 4 units is a 2*2 row and column distribution.

[0360] S1006 , the electronic device 100 determines a conflicting element set based on position 1 , including one or more interface elements displayed at position 1 .

[0361] For example, in the above Figure 5D In the illustrated embodiment, the following three interface elements are displayed at position 1: common application folder 502, large application folder 503, and setting application icon 504. Electronic device 100 may determine that the conflicting element set includes the following three conflicting elements: common application folder 502, large application folder 503, and setting application icon 504.

[0362] S1007 , the electronic device 100 determines the size of each conflicting element in the conflicting element set and the coordinates of each conflicting element in coordinate system 1 , where coordinate system 1 is a coordinate system constructed on display area 1 with the upper left corner of display area 1 as the origin.

[0363] The specific description of coordinate system 1 can refer to the above Figure 8 Step S806 is shown and will not be described again here.

[0364] The coordinates of the conflicting element in the coordinate system 1 may be used to indicate the position of the conflicting element in the display area 1. The coordinates of the conflicting element in the coordinate system 1 may be a coordinate point (e.g., the coordinates of the cell located in the upper left corner of the cell occupied by the conflicting element) or a coordinate set including multiple coordinate points, which is not limited in the present application.

[0365] In some embodiments, the electronic device 100 may also construct a temporary placeholder matrix to represent the size of each conflicting element in the conflicting element set.

[0366] The temporary occupancy matrix can be the occupancy matrix of the entire conflict element set. For example, in the above Figure 5DIn the illustrated embodiment, position 1 includes 4 cells on display area 1, and the arrangement of the 4 cells is a 2*2 row and column distribution. The conflict element set includes the following three conflict elements: a common application folder 502, a large application folder 503, and a setting application icon 504, and the size of the common application folder 502 is 1*2, the size of the large application folder 402 is 2*2, and the size of the setting application icon is 1*1. The positional relationship between the above three conflicting elements and position 1 is as follows: the rightmost cell of the common application folder 502 occupies the cell in the upper left corner of position 1, the two cells on the left side of the large application folder 402 occupy the two cells on the right side of position 1 respectively, and the setting application icon 403 occupies the cell in the lower left corner of position 1. In this case, a 2*4-dimensional matrix can be constructed for the conflict element set, and each first number (such as the number "1") or second number (such as the number "0") in the matrix can correspond to a cell. In the matrix, the first number represents that the cell is occupied (i.e., the conflict element needs to be displayed), and the second number represents that the cell is not occupied (i.e., the conflict element does not need to be displayed). Then the temporary placeholder information of the above conflicting element set can be represented by the 2*4 dimensional placeholder matrix C2 shown in the above formula (9).

[0367] In other embodiments, the temporary placeholder matrix may also include a temporary placeholder matrix for each conflicting element, and the temporary placeholder matrix for each interface element may be used to represent the size of the conflicting element, that is, the dimension of the temporary placeholder matrix of the conflicting element is the same as the size of the conflicting element, and the numbers in the matrix are all first numbers (for example, the number "1").

[0368] It is understandable that the above embodiment is only an exemplary explanation that the size of each conflicting element can be represented by constructing a temporary placeholder matrix. In the embodiment of the present application, the conflicting element set may also be a set of conflicting elements different from the above embodiment, and the temporary placeholder matrix may also be a matrix of different dimensions or different contents. In some embodiments, the electronic device 100 may also use other numbers to indicate whether the corresponding unit is occupied when constructing the temporary placeholder matrix, or use other methods to represent the temporary placeholder information, which is not limited in the present application.

[0369] S1008: The electronic device 100 determines, based on the size of each conflicting element and the screen occupancy information of the display area 2, whether there is a position set in the display area 2 that can accommodate and display each conflicting element in the conflicting element set.

[0370] The position set may include one or more positions, and the number of positions in the position set is the same as the number of conflicting elements in the conflicting element set. Each position may include one or more cells in the display area 2, which are used to accommodate and display a conflicting element in the conflicting element set, and the size of the position is the same as the size of the conflicting element. Moreover, before the conflicting element is placed at a position in the position set, no interface element is displayed at the position in the position set.

[0371] The electronic device 100 can arrange all conflicting elements in the conflicting element set from large to small according to the size of the conflicting elements, and judge whether there is a position in the display area 2 that can accommodate the display of the conflicting elements based on the size of the conflicting elements in the arrangement order. If all conflicting elements in the conflicting element set can find a position in the display area 2, then the electronic device 100 can determine that there is a set of positions in the display area 2 that can accommodate each conflicting element in the conflicting element set. When sorting the conflicting elements based on size, they can be sorted based on the product of the horizontal size and the vertical size. When the products corresponding to the two conflicting elements are the same, they can be sorted based on the horizontal size (or the vertical size). In other embodiments, the electronic device 100 can also adopt other sorting methods, which are not limited in the present application.

[0372] In some embodiments, the electronic device 100 may determine whether there is a position set in the display area 2 based on the size of the conflicting element obtained in step S1007 and the screen occupancy matrix of the display area 2 obtained in step S1004.

[0373] For example, the above FIG. 5A to FIG. 5FTaking the illustrated embodiment as an example, the screen occupancy matrix of the display area 2 may be the screen occupancy matrix D2 in the above formula (10). In the conflict element set, the sizes are arranged from large to small as follows: large application folder 503 (size is 2*2), common application folder 502 (size is 1*2), and setting application icon 504 (size is 1*1). The electronic device 100 may traverse the screen occupancy matrix D2 starting from the upper left corner of the matrix, and determine that there is a position 3 in the display area 2, and position 3 includes the following four units with a row and column distribution of 2*2: unit (1,3), unit (1,4), unit (2,3) and unit (2,4), and the four units may be used to place the large application folder 504 with a size of 2*2. The electronic device 100 may replace the number "0" at the corresponding positions of the above four units in the screen occupancy matrix D2 with the number "1" to obtain a new screen occupancy matrix D21. Afterwards, the electronic device 100 can traverse the replaced screen occupancy matrix D21 with the upper left corner as the starting point to determine that there is a position 4 in the display area 2, and position 4 includes the following two units with a row and column distribution of 1*2: unit (3,2) and unit (3,3), and the two units can be used to place the commonly used application folder 502 with a size of 1*2. The electronic device 100 can replace the number "0" at the corresponding position of the above two units in the screen occupancy matrix D21 with the number "1" to obtain a new screen occupancy matrix D22. Afterwards, the electronic device 100 can traverse the replaced screen occupancy matrix D22 with the upper left corner as the starting point to determine that there is a position 5 in the display area 2, and position 5 includes the following units with a row and column distribution of 1*1: unit (2,2), and the unit can be used to place the setting application icon 504 with a size of 1*1.

[0374] In some embodiments, the electronic device 100 may not construct a temporary placeholder matrix and a screen placeholder matrix for the display area 2. In this case, the electronic device 100 may determine the distribution of free cells in the display area 2 based on the screen placeholder information for the display area 2, and determine whether there is a set of positions that can accommodate and display all the conflicting elements based on the distribution of the free cells and the size of each conflicting element.

[0375] After determining the position set, the electronic device 100 may obtain the coordinates of the position corresponding to each conflicting element in the position set in the coordinate system 2.

[0376] When the electronic device 100 determines that there is a position set in the display area 2 that can respectively accommodate all conflicting elements in the conflicting element set, the following step S1010 may be executed;

[0377] When the electronic device 100 determines that there is no position set in the display area 2 that can respectively accommodate all conflicting elements in the conflicting element set, the following step S1009 may be executed to determine that the squeezing fails.

[0378] S1009, the electronic device 100 determines that the dispersion and squeezing fails.

[0379] After the electronic device 100 determines that the dispersion and squeezing has failed, after detecting that the user has released the interface element 1, the interface element 1 can be redisplayed at the initial position of the display area 2, that is, the cross-screen movement of the interface element 1 has failed.

[0380] In other embodiments, the electronic device 100 may also create a new page, keep the original layout of the conflicting elements, and display all the conflicting elements in the new page. FIG. 6D to FIG. 6E The embodiment shown.

[0381] S1010, the electronic device 100 determines the coordinates of the position corresponding to each conflicting element in the position set in coordinate system 1.

[0382] The electronic device 100 may determine the coordinates of the position corresponding to each conflicting element in the position set in the coordinate system 2 in the above step S1008. Afterwards, the electronic device 100 may obtain the coordinates 3 of the position corresponding to each conflicting element in the position set in the coordinate system 1 through coordinate conversion based on the coordinates of the position corresponding to each conflicting element in the position set in the coordinate system 2 and the relationship between the coordinate system 1 and the coordinate system 2.

[0383] The specific method for electronic device 100 to determine the coordinates of position 2 in coordinate system 1 based on the coordinates of position 2 in coordinate system 2 can refer to the above Figure 8 The relevant contents in step S809 are not repeated here.

[0384] S1011, the electronic device 100 displays the moving track of each conflicting element based on the coordinates of each conflicting element in the coordinate system 1 and the coordinates of the position corresponding to each conflicting element in the position set in the coordinate system 1.

[0385] S1012, the electronic device 100 detects operation 2 for interface element 1, deletes interface element 1 in display area 2, and adds interface element 1 to display area 1 based on the coordinates of position 1 in coordinate system 1.

[0386] Operation 2 may be a release operation on interface element 1. Figure 5E The user is shown releasing the card 501 .

[0387] S1013, the electronic device 100 obtains the coordinates of the position corresponding to each conflicting element in the position set in coordinate system 2.

[0388] S1014 , the electronic device 100 deletes the conflict element set in the display area 1 , and adds each conflict element to the display area 2 based on the coordinates of the position corresponding to each conflict element in the position set in the coordinate system 1 .

[0389] The specific contents of steps S1011 to S1014 can also refer to the above Figure 8 The relevant contents of steps S810 to S813 are not repeated here.

[0390] Understandably, Fig.10 The illustrated embodiment is only an example. In the embodiment of the present application, the electronic device 100 may further include more than two display screens, which is not limited in the present application.

[0391] By adopting the interface element moving method provided in the embodiment of the present application, when there is not enough space in the display area 1 to accommodate the display interface element 1, the positions that can accommodate and display the conflicting elements can be found in the display area 2 by traversing the unoccupied units in the display area 2, and the conflicting elements are displayed at the corresponding positions in the display area 2. In this way, the interface element 1 can be moved from the display area 2 to the display area 1 by a single drag operation. The operation steps are simplified and the efficiency is improved.

[0392] Fig.11 A flow chart of a method for moving an interface element provided in an embodiment of the present application is shown.

[0393] like Fig.11 As shown, the specific process of the interface element moving method may include the following steps:

[0394] S1101, the electronic device 100 is in an expanded state, display area 1 displays one or more interface elements, and display area 2 displays one or more interface elements, including interface element 1.

[0395] S1102 , the electronic device 100 receives an operation 1 performed by the user on the interface element 1 , and displays a movement track of the interface element 1 in response to the operation 1 .

[0396] S1103, the electronic device 100 obtains the size and initial position of the interface element 1 in the coordinate system 2 in the coordinate system 1, where the initial position is the original position of the interface element 1 in the display area 2, and the coordinate system 2 is a coordinate system constructed on the display area 2 with the upper left corner of the display area 2 as the origin.

[0397] S1104, the electronic device 100 obtains the screen occupancy information of the display area 2, including the coordinates of all units on the display area 2 in the coordinate system 2 and the occupancy status of each unit. The coordinate system 2 is a two-dimensional coordinate system constructed on the display area 2 with the upper left corner of the display area 2 as the origin.

[0398] S1105, the electronic device 100 detects that the moving speed of the operation 1 on the display area 1 is less than a preset value, and determines the position 1 where the interface element 1 is temporarily displayed on the display area 1, and the size of the position 1 is the same as the size of the initial position.

[0399] S1106 , the electronic device 100 determines a conflicting element set based on position 1 , including one or more interface elements displayed at position 1 .

[0400] S1107, the electronic device 100 determines the temporary placeholder information of the conflicting element set, including the size of each conflicting element in the conflicting element set, the positional relationship between the conflicting elements, and the coordinate 2 of the conflicting element set in the coordinate system 1, where the coordinate system 1 is a coordinate system constructed on the display area 1 with the upper left corner of the display area 1 as the origin.

[0401] For details of steps S1101 to S1107, please refer to the above Fig. 9 The description of steps S901 to S907 is not repeated here. Figure 8 The relevant content in step S803 is shown.

[0402] S1108, the electronic device 100 determines whether there is a position 2 at the initial position of the interface element 1 that can accommodate the display of the conflicting element set based on the size of the interface element 1 and the temporary placeholder information.

[0403] The initial position of the interface element 1 is the position of the interface element 1 on the display area 2 before the electronic device 100 responds to the operation 1. The size of the interface element 1 is the same as the size of the initial position. The electronic device 100 can determine whether there is a position 2 at the initial position that can accommodate the display conflict element set based on the size of the initial position and the temporary placeholder information. For specific determination methods, please refer to Figure 8 The detailed description of step S807 is omitted here.

[0404] When the electronic device 100 determines that there is a position 2 in the initial position that can accommodate the display conflict element set, the following step S1112 may be executed;

[0405] When the electronic device 100 determines that there is no position 2 in the initial position that can accommodate the display conflict element set, it is determined that the exchange of the squeezed positions has failed, and the following step S1109 can be executed.

[0406] S1109: The electronic device 100 determines whether there is a position 2 in the display area 2 that can accommodate the display conflict element set based on the temporary placeholder information and the screen placeholder information of the display area 2.

[0407] It should be noted that position 2 can accommodate and display the conflict element set, which means that the position relationship of each conflict element in the conflict element set before operation 1 can be maintained (that is, the relative position of each conflict element is maintained) and all conflict elements in the conflict element set can be accommodated and displayed in position 2.

[0408] For other specific contents of step S1109, please refer to the above Fig. 9 The relevant description in step S908 is not repeated here.

[0409] When the electronic device 100 determines that there is a position 2 in the display area 2 that can accommodate the display conflict element set, the following step S1112 may be executed;

[0410] When the electronic device 100 determines that there is no position 2 in the display area 2 that can accommodate the display conflicting element set, it is determined that the overall squeezing fails, and the following step S1110 can be executed.

[0411] S1110 , the electronic device 100 determines whether there is a position set in the display area 2 that can accommodate each conflicting element in the conflicting element set based on the size of each conflicting element and the screen occupancy information of the display area 2 .

[0412] The specific content of step S1110 can refer to the above Fig.10 The relevant contents of step S1008 are not repeated here.

[0413] When the electronic device 100 determines that there is a position set in the initial position that can respectively accommodate all conflicting elements in the display conflicting element set, the following step S1112 may be executed;

[0414] When the electronic device 100 determines that there is no position set in the initial position that can respectively accommodate all conflicting elements in the display conflicting element set, the following step S1111 can be executed to determine that the dispersion and squeezing fails.

[0415] S1111, the electronic device 100 determines that the dispersion and squeezing fails.

[0416] After the electronic device 100 determines that the dispersion and squeezing has failed, after detecting that the user has released the interface element 1, the interface element 1 can be redisplayed at the initial position of the display area 2, that is, the cross-screen movement of the interface element 1 has failed.

[0417] In some embodiments, after determining that the dispersion and crowding in display area 2 has failed, the electronic device 100 may also search for positions for the conflicting elements in display area 1 and display area 2 respectively. The specific method can be referred to the following embodiments and will not be described in detail here.

[0418] S1112 , the electronic device 100 determines the coordinates of the position corresponding to each conflicting element in the display area 2 in the coordinate system 1 .

[0419] S1113 , the electronic device 100 displays the moving track of each conflicting element based on the coordinates of each conflicting element in the coordinate system 1 and the coordinates of the position corresponding to each conflicting element in the display area 2 in the coordinate system 1 .

[0420] S1114 , the electronic device 100 detects operation 2 on interface element 1 , deletes interface element 1 in display area 2 , and adds interface element 1 to display area 1 based on the coordinates of position 1 in coordinate system 1 .

[0421] S1115 , the electronic device 100 obtains the coordinates of the position corresponding to each conflicting element in the display area 2 in the coordinate system 2 .

[0422] S1116 , the electronic device 100 deletes the set of conflicting elements in the display area 1 , and adds each conflicting element to the display area 2 based on the coordinates of the position corresponding to each conflicting element in the display area 2 in the coordinate system 2 .

[0423] For details of steps S1112 to S1116, please refer to the above Figure 8 The relevant contents in steps S809 to S813 are shown, or Fig.10 The relevant contents in steps S1010 to S1014 are not repeated here.

[0424] Understandably, Fig.11 The illustrated embodiment is only an example. In the embodiment of the present application, the electronic device 100 may further include more than two display screens, which is not limited in the present application.

[0425] The interface element moving method provided in the embodiment of the present application can be combined with the above Figures 8 to 10 The three squeezing modes in the illustrated embodiment are for the conflicting elements to find positions in the display area 2. In this way, the probability of successful position finding can be increased, the operation steps can be simplified, and the efficiency can be improved.

[0426] In some embodiments, Fig.11 Before step S1108 shown, the electronic device 100 may first locate the conflicting elements in the non-conflicting element set in the display area 1. When it is determined that there is no position set in the display area 1 that can accommodate and display all the conflicting elements, the electronic device 100 may perform step S1108 and subsequent steps to locate the conflicting elements in the display area 2. In this way, the conflicting elements may be located in the display area 1 first, increasing the probability of successful location squeeze.

[0427] In other embodiments, after executing step S1111 to determine that the decentralized squeezing fails, the electronic device 100 may further combine the screen occupancy information of display area 1 and the screen occupancy information of display area 2, sort the conflicting elements by size, and find a position for each conflicting element in display area 1 and display area 2 in turn according to the sorting results. After finding the position, the coordinates of the new position of the conflicting element in coordinate system 1 can be obtained to display the movement trajectory of the conflicting element. In this way, after the decentralized squeezing of a single screen fails, the conflicting elements can be found in turn based on the screen occupancy information of multiple display screens to increase the probability of successful squeezing.

[0428] In other embodiments, the above Figures 8 to 11 In the illustrated embodiment, the conflicting elements displayed at position 1 may also be squeezed downward (or to the left or right, etc.) in the display area 1. In the case where one or more conflicting elements are displayed in the first layout at position 1 of the display area 1, and one or more interface elements (also called squeezed elements) are displayed in the second layout at position 3 of the display area 1, if there is a position 5 in the display area 2 that can accommodate the display of one or more squeezed elements displayed in the second layout, then in response to the user's operation 1 of moving the interface element from the initial position of the display area 2 to position 1 of the display area 1, the one or more conflicting elements are displayed at position 4 below (or to the left, right, etc.) position 1 in the first layout, the interface element 1 is displayed at position 1, and the one or more squeezed elements are displayed at position 5 in the second layout, and position 5 may be the initial position or other positions in the display area 2. If there is a set of positions in the display area 2 that can accommodate the display of the one or more squeezed elements, then in response to the user's operation 1 of moving the interface element from the initial position of the display area 2 to position 1 of the display area 1, the one or more squeezed elements are displayed in the display area 2 respectively. Among them, the size of position 4 is the size of the total area occupied by the one or more interface elements arranged and displayed in the first layout in position 1. Position 3 and position 4 may be the same or different. The direction of position 3 relative to position 1 is the same as the direction of position 4 relative to position 1. For example, both position 3 and position 4 may be below position 1, etc. In the case where the conflicting element is squeezed downward (or squeezed in other directions), the electronic device 100 may also obtain the placeholder information of the squeezed element and determine the position of the squeezed element in the display area 2. The specific method can refer to the above-mentioned method of determining the position of the conflicting element in the display area 2, which will not be described in detail here.

[0429] It should be noted that the above Figures 2A to 11The illustrated embodiment takes the electronic device 100 including a foldable display screen as an example to illustrate the interface element moving method provided in the embodiment of the present application. In the embodiment of the present application, the above-mentioned interface element moving method can also be applied to the case where the electronic device 100 does not include a foldable display screen, that is, the above-mentioned display area 1 and display area 2 can also be located in the same non-foldable display screen. In this case, when an interface element moves from one display area to another display area, the electronic device 100 can also execute the interface element moving method provided in any of the above-mentioned embodiments, and the present application does not limit it here.

[0430] The following introduces the functional modules of an electronic device 100 provided in an embodiment of the present application.

[0431] Fig.12 A schematic diagram of functional modules of an electronic device 100 provided in an embodiment of the present application is shown.

[0432] like Fig.12 As shown, the electronic device 100 may include multiple views, such as view 1 and view 2. View 1 may be a view of display area 1, and view 2 may be a view of display area 2. View 1 may include an interaction module 1201, a placeholder information module 1202, a positioning module 1203, a coordinate conversion module 1204, and a display module 1205. View 2 may include an interaction module 1206, a placeholder information module 1207, a positioning module 1208, a coordinate conversion module 1209, and a display module 1210.

[0433] In view 1, the interaction module 1201 may receive an operation of the user on the interface element displayed in the display area 1, such as a long press operation, a drag operation, or a long press and drag operation on the interface element displayed in the display area 1. The interaction module 1201 may also detect the moving track of the user operation on the display area 1. The interaction module 1201 may receive and respond to the user's operation of moving the interface element in the display area 1 to another display screen (such as the display area 2), and send instruction 1 to the placeholder information module 1202, instructing the placeholder information module 1202 to send the placeholder information of the display area 1 to the positioning module in the view corresponding to the other display screen (such as the positioning module 1208 in view 2). The interaction module 1201 may also receive and respond to the user's operation of moving the interface element in other display screens to the target position (such as position 1) in the display area 1, and send instruction 2 to the placeholder information module 1202, instructing the placeholder information module 1202 to determine one or more conflicting elements displayed at the target position.

[0434] The placeholder information module 1202 may store screen placeholder information of the display area 1, including the coordinates of each unit in the interface currently displayed in the display area 1 and the occupancy status of each unit. The placeholder information module 1202 may receive and respond to instruction 1 sent by the interaction module 1201, and send the screen placeholder information of the display area 1 to the positioning module corresponding to another display screen. The placeholder information module 1202 may also receive and respond to instruction 2 sent by the interaction module 1201, determine a conflicting element set, and determine temporary placeholder information of the conflicting element set, and send the temporary placeholder information to the positioning module 1203, wherein the conflicting element set includes one or more conflicting elements. In some embodiments, in response to instruction 2, the placeholder information module 1202 may also send the placeholder information of the display area 1 to the positioning module.

[0435] The positioning module 1203 can position each conflicting element in the conflicting element set. In some embodiments, the positioning module 1203 can position the conflicting element set in the display area 2 based on the screen position information of the display area 2 and the temporary position information of the conflicting element set. The positioning module 1203 can also position each conflicting element in the display area 2 based on the screen position information of the display area 2 and the size of each conflicting element in the temporary position information. In some embodiments, the positioning module 1203 can also position each conflicting element in the display area 1 based on the screen position information of the display area 1 and the size of each conflicting element, and so on. After determining the new position of each conflicting element, the positioning module 1203 can send the positioning result to the coordinate conversion module 1204.

[0436] After receiving the positioning result, the coordinate conversion module 1204 can perform coordinate conversion on the new position of each conflicting element to obtain the coordinates of the new position in the coordinate system 1 corresponding to the display area 1. The coordinate system 1 is a two-dimensional coordinate system constructed on the display area 1 with any point on the display area 1 as the origin. In some embodiments, when the new position of the conflicting element is in the display area 2, the coordinate conversion module 1204 can also send the coordinates of the new position in the coordinate system 1 corresponding to the display screen to the coordinate conversion module 1209 in the view 2, and the coordinate conversion module 1209 determines the coordinates of the new position in the coordinate system 2 corresponding to the display area 2 through coordinate conversion.

[0437] The display module 1205 can display corresponding content based on the placeholder information of the display area 1. The display module 1205 can also display the movement track of the conflicting elements, the movement track of the dragged interface elements, and the like.

[0438] The functions of each module in View 2 can refer to the functions of the corresponding modules in View 1, and will not be repeated here.

[0439] Understandably, Fig.12The illustrated embodiment is only an example. In the embodiment of the present application, the electronic device 100 may further include more views, and each view may further include more, fewer or different modules from the above embodiment, which is not limited in the present application.

[0440] The following describes the process of an electronic device executing a method for moving an interface element provided in an embodiment of the present application.

[0441] The following Figures 13 to 17 In the embodiment shown, the electronic device may be the electronic device 100 in the above embodiment including a foldable display screen and in an unfolded state, or may be the above embodiment Figure 1K In the illustrated embodiment, the electronic device 100 does not include a foldable display screen, but includes a non-foldable display screen. Moreover, in any of the above cases, the display screen of the electronic device (foldable display screen or non-foldable display screen) can include a first display area and a second display area.

[0442] like Fig.13 As shown, a process of a method for moving an interface element may include the following steps:

[0443] S1301, a first display area of ​​an electronic device displays a first page of a desktop, and a second display area displays a second page of the desktop, where the second page includes a first interface element, and the first interface element is located at a first position in the second display area.

[0444] exist Figures 13 to 17 In the illustrated embodiment, the first display area may be display area 1 in the above embodiment, and the second display area may be display area 2 in the above embodiment. The first page may be page 1 in the above embodiment, and the second page may be page 2 in the above embodiment. The first interface element may be Figure 8 or Fig.11 The interface element 1 in the embodiment shown. The first position can be the above Figure 8 or Fig.11 Initial position in the embodiment shown.

[0445] S1302, the electronic device receives a first operation of a user on a first interface element, the first operation is used to move the first interface element to a second position in the first display area, and the second position displays one or more interface elements arranged in a first layout.

[0446] The first operation may be the above Figure 8 or Fig.11 Operation 1 in the illustrated embodiment. The second position may be as described above Figure 8 or Fig.11 Position 1 in the illustrated embodiment. One or more interface elements displayed in the first layout arrangement may be the above Figure 8 or Fig.11Conflicting elements in the illustrated embodiment. In step S1302, one or more interface elements arranged in a first layout are displayed at the second position, which means that the one or more interface elements displayed at the second position are complete elements.

[0447] S1303: In response to the first operation, the electronic device displays one or more interface elements arranged in a first layout at a first position, and displays the first interface element at a second position.

[0448] like Fig.14 As shown, the process of another method for moving interface elements may include the following steps:

[0449] S1401, a first display area of ​​an electronic device displays a first page of a desktop, and a second display area displays a second page of the desktop, the second page includes a second interface element, and the second interface element is located at a third position of the second display area.

[0450] The second interface element can be the above Fig. 9 or Fig.11 In the embodiment shown, the third position of the interface element 1 can be the above Fig. 9 or Fig.11 Initial position in the embodiment shown.

[0451] S1402, the electronic device receives a second operation of the user on the second interface element, the second operation is used to move the second interface element to a fourth position of the first display area, and the fourth position displays a portion of one or more interface elements arranged in a second layout. The portion of one or more interface elements means that at least one of the one or more interface elements displayed at the fourth position is incomplete in the fourth position.

[0452] The second operation may be as described above Fig. 9 or Fig.11 In operation 1 of the embodiment shown, the fourth position may be as described above. Fig. 9 or Fig.11 In the embodiment shown in FIG. 1 , one or more interface elements arranged in the second layout may be the above-mentioned Fig. 9 or Fig.11 Conflicting elements in the illustrated embodiment.

[0453] S1403, in response to the second operation, the electronic device displays one or more interface elements arranged in a second layout at a fifth position of the second display area, and displays the second interface element at a fourth position.

[0454] The fifth position can be the above Fig. 9 or Fig.11 Position 2 in the embodiment shown.

[0455] like Fig.15As shown, the process of another method for moving interface elements may include the following steps:

[0456] S1501, a first display area of ​​an electronic device displays a first page of a desktop, and a second display area displays a second page of the desktop, the second page includes a third interface element, and the third interface element is located at a sixth position of the second display area.

[0457] The third interface element can be the above Fig.10 or Fig.11 The interface element 1 in the embodiment shown. The sixth position can be the above Fig.10 or Fig.11 Initial position in the embodiment shown.

[0458] S1502, the electronic device receives a third operation from the user on the third interface element, the third operation is used to move the third interface element to a seventh position in the first display area, and the seventh position displays a portion of the fourth interface element and the fifth interface element arranged in a third layout.

[0459] The third operation may be the above Fig.10 or Fig.11 Operation 1 in the illustrated embodiment. The seventh position may be the above Fig.10 or Fig.11 Position 1 in the embodiment shown. The fourth interface element and the fifth interface element may be the above Fig.10 or Fig.11 Conflicting elements in the illustrated embodiment. It should be noted that in step S1502, the fourth interface element and part of the fifth interface element arranged in the third layout are displayed at the seventh position, which means that at least one of the fourth interface element and the fifth interface element displayed at the seventh position is incomplete at the seventh position (for example, only a part of the fifth interface element is displayed at the seventh position). Moreover, in some embodiments, other interface elements may also be displayed at the seventh position.

[0460] S1503, in response to the third operation, the electronic device displays the third interface element at the seventh position, displays the fourth interface element at the eighth position of the second display area, and displays the fifth interface element at the ninth position of the second display area.

[0461] The eighth and ninth positions can be the above Fig.10 or Fig.11 A position in a set of positions in the illustrated embodiment.

[0462] like Fig.16 As shown, the process of another method for moving interface elements may include the following steps:

[0463] S1601, a first display area of ​​an electronic device displays a first page of a desktop, and a second display area displays a second page of the desktop, the second page includes a sixth interface element, and the sixth interface element is located at the tenth position of the second display area.

[0464] The third interface element may be the interface element 1 in the above embodiment. The sixth position may be the initial position in the above embodiment, that is, the position of the interface element 1 before the movement.

[0465] S1602, the electronic device receives a fourth operation from the user on the sixth interface element, the fourth operation is used to move the sixth interface element to an eleventh position in the first display area, the eleventh position displays a portion of the seventh interface element and the eighth interface element arranged in a fourth layout.

[0466] The fourth operation may be operation 1 in the above embodiment. The eleventh position may be position 1 in the above embodiment. The seventh interface element and the eighth interface element may be conflicting elements in the above embodiment. It should be noted that in step S1602, the eleventh position displays portions of the seventh interface element and the eighth interface element arranged in the fourth layout, which means that at least one of the seventh interface element and the eighth interface element displayed at the eleventh position is incomplete. Moreover, in some embodiments, other interface elements may also be displayed at the eleventh position.

[0467] S1603, in response to the fourth operation, the electronic device displays the sixth interface element at the eleventh position, displays the seventh interface element at the twelfth position of the first display area, and displays the eighth interface element at the thirteenth position of the second display area.

[0468] The twelfth position may be an unoccupied position in the first display area, and the thirteenth position may be an unoccupied position in the second display area. In some embodiments, the thirteenth position and the tenth position may have an intersection.

[0469] like Fig.17 As shown, the process of another method for moving interface elements may include the following steps:

[0470] S1701, the first display area of ​​the electronic device displays the first page of the desktop, and the second display area displays the second page of the desktop, the second page includes a ninth interface element, and the ninth interface element is at the fourteenth position of the second display area.

[0471] The ninth interface element may be the interface element 1 in the above embodiment, and the fourteenth position may be the initial position in the above embodiment.

[0472] S1702, the electronic device receives a ninth operation from the user on a ninth interface element, the ninth operation is used to move the ninth interface element to the fifteenth position of the first display area, the fifteenth position of the first display area displays part or all of one or more interface elements arranged in the fifth layout, and the sixteenth position of the first display area displays part or all of the tenth interface element.

[0473] The ninth operation may be operation 1 in the above embodiment. The fifteenth position may be position 1 in the above embodiment, and one or more interface elements displayed at the fifteenth position in the fifth layout arrangement may be conflicting elements in the above embodiment. The sixteenth position may be FIG. 7A to FIG. 7D In the embodiment shown, the tenth element shown at position 3 and the sixteenth position may be the above-mentioned FIG. 7A to FIG. 7D In the illustrated embodiment, in some embodiments, other elements may be displayed at the sixteenth position. Displaying one or more interface elements at a position (displaying the entirety of one or more interface elements) means that the one or more interface elements are complete at the position. Displaying part of one or more interface elements at a position means that at least one of the one or more interface elements is incomplete at the position.

[0474] S1703, in response to the ninth operation, the electronic device displays the ninth interface element at the fifteenth position, displays one or more interface elements arranged in the fifth layout at the seventeenth position of the first display area, and displays the tenth interface element at the eighteenth position of the second display area, and the sixteenth position and the seventeenth position are on the same side of the fifteenth position.

[0475] The seventeenth position may be the above FIG. 7A to FIG. 7D Position 4 in the illustrated embodiment. The eighteenth position may be an unoccupied position in the second display area, and the eighteenth position may be the same as or different from the fourteenth position.

[0476] In some embodiments, the sixteenth position may be the same as the seventeenth position.

[0477] In some embodiments, if the interface element displayed at the sixteenth position also includes other elements, then, in response to the ninth operation, the electronic device may display the one or more interface elements displayed at the sixteenth position in the second display area in the original layout, or display the one or more interface elements at different positions in the second display area, or display the one or more interface elements in the first display area and the second display area, and so on.

[0478] It should be noted that Figures 13 to 17The interface element moving method shown can be executed as a method for moving an interface element separately, or any multiple methods mentioned above can be combined, which is not limited in the present application.

[0479] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0480] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0481] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0482] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for moving an interface element, characterized in that: Applied to an electronic device including a display screen, the display screen including a first display area and a second display area; the method includes: Displaying a first page of the desktop in the first display area, and displaying a second page of the desktop in the second display area, wherein the second page includes a second interface element, and the second interface element is located at a third position in the second display area; receiving a second operation of the user on the second interface element, the second operation being used to move the second interface element to a fourth position of the first display area, the fourth position displaying a portion of the plurality of interface elements arranged in a second layout; In response to the second operation, the plurality of interface elements arranged in the second layout are displayed at a fifth position of the second display area, and the second interface element is displayed at the fourth position.

2. The method according to claim 1, characterized in that The method further comprises: The second page further includes a first interface element, and the first interface element is located at a first position of the second display area; receiving a first operation of a user on the first interface element, the first operation being used to move the first interface element to a second position of the first display area, the second position displaying one or more interface elements arranged in a first layout; In response to the first operation, the one or more interface elements arranged in the first layout are displayed at the first position, and the first interface element is displayed at the second position.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: The second page further includes a third interface element, and the third interface element is located at a sixth position of the second display area; receiving a third operation from a user on the third interface element, wherein the third operation is used to move the third interface element to a seventh position in the first display area, where the seventh position displays a portion of the fourth interface element and the fifth interface element arranged in a third layout; In response to the third operation, the third interface element is displayed at the seventh position, the fourth interface element is displayed at the eighth position of the second display area, and the fifth interface element is displayed at the ninth position of the second display area.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The second page further includes a sixth interface element, and the sixth interface element is located at the tenth position of the second display area; receiving a fourth operation from a user on the sixth interface element, the fourth operation being used to move the sixth interface element to an eleventh position of the first display area, the eleventh position displaying a portion of the seventh interface element and the eighth interface element arranged in a fourth layout; In response to the fourth operation, the sixth interface element is displayed at the eleventh position, the seventh interface element is displayed at the twelfth position of the first display area, and the eighth interface element is displayed at the thirteenth position of the second display area.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to the first operation, the first interface element moves along a trajectory of the first operation.

6. The method according to claim 5, characterized in that In the process of the first interface element moving along the trajectory of the first operation, the method further includes: An initial position prompt is displayed at the first position, where the initial position prompt is used to prompt the first position.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Display the movement tracks of the one or more interface elements.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: When the electronic device is in a folded state, the first page is displayed in the first display area, and a first interface or a black screen is displayed in the second display area, where the first interface is different from the desktop.

9. The method according to claim 8, characterized in that The method further comprises: When the electronic device is in the folded state, receiving a fifth operation directed to the first display area by a user; In response to the fifth operation, the second page is displayed in the first display area.

10. The method according to claim 8 or 9, characterized in that: The method further comprises: When the electronic device is in the folded state, receiving a sixth operation from the user; In response to the sixth operation, the electronic device is switched from the folded state to the unfolded state.

11. The method according to any one of claims 1 to 7, characterized in that: The electronic device further includes another display screen, the display screen includes a third display area; before the electronic device is in the unfolded state, the method further includes: When the electronic device is in a folded state, the first page is displayed in the third display area.

12. The method according to claim 11, characterized in that The method further comprises: When the electronic device is in the folded state, receiving a seventh operation of the user on the third display area; In response to the seventh operation, the second page is displayed in the first display area.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: When the electronic device is in the folded state, receiving an eighth operation from the user; In response to the eighth operation, the electronic device is switched from the folded state to the unfolded state.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: The second page further includes a ninth interface element, the ninth interface element is located at the fourteenth position of the second display area, the fifteenth position of the first display area displays part or all of the one or more interface elements arranged in the fifth layout, and the sixteenth position of the first display area displays part or all of the tenth interface element; receiving a ninth operation from a user on the ninth interface element, where the ninth operation is used to move the ninth interface element to a fifteenth position in the first display area; In response to the ninth operation, the ninth interface element is displayed at the fifteenth position, and the one or more interface elements arranged in the fifth layout are displayed at the seventeenth position of the first display area, and the tenth interface element is displayed at the eighteenth position of the second display area, and the sixteenth position and the seventeenth position are on the same side of the fifteenth position.

15. The method according to claim 14, characterized in that The sixteenth position is the same as the seventeenth position.

16. An electronic device, characterized in that: include: One or more processors, one or more memories, and one or more foldable displays, wherein the foldable display includes a first display area and a second display area; the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method described in any one of claims 1 to 15.

17. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 15.

18. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 15.