Interface element moving method and related device

CN119013651APending Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480001100.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-22
Filing Date
2024-03-18
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When moving interface elements on a display screen, if the target position is already occupied, existing technology requires the user to first move the existing element to another position and then move the target element to the target position. This operation is cumbersome and inefficient.

Method used

A method for moving interface elements is provided. Using an electronic device with a foldable display screen, in the unfolded state, the position of interface elements in the first display area and the second display area is swapped to achieve cross-region movement, simplifying the operation steps.

Benefits of technology

Even if the primary display area does not have enough space to accommodate interface elements, cross-area movement can be achieved by swapping positions, simplifying operation steps and improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119013651A_ABST
    Figure CN119013651A_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

Method and related device for moving interface elements

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 22, 2023, with application number 202310325688.X and application name “A method for moving interface elements and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of electronic technology, and in particular to a method for moving interface elements and related devices. 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 wants 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 to another position before moving the target interface element to the target position. This makes the user's operation steps for moving interface elements cumbersome.

[0005] Summary of the Invention

[0006] 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.

[0007] In the first 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 first interface element, and the first interface element is in a first position in the second display area; receiving a first operation of the user on the first interface element, the first operation is used to move the first interface element to the 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, 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.

[0008] 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 positions 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.

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

[0010] In a possible implementation, during the process of the first interface element moving along 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.

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

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

[0013] 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, where the first interface is different from the desktop.

[0014] In one 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.

[0015] 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 switching the electronic device from the folded form to the unfolded form in response to the sixth operation.

[0016] In one possible implementation, the electronic device further includes another display screen, which 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.

[0017] In one 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.

[0018] 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 switching the electronic device from the folded form to the unfolded form in response to the eighth operation.

[0019] 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 being 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 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.

[0020] 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.

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

[0022] 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 being at the sixth position in the second display area; receiving a third operation of the user on the third interface element, the third operation being used to move the third interface element to the seventh position in the first display area, the seventh position displaying a portion of the fourth interface element and the 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 the eighth position in the second display area, and displaying the fifth interface element at the ninth position in the second display area.

[0023] 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.

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

[0025] 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 the first page of the desktop in the first display area, and displaying the second page of the desktop in the second display area, the second page including a sixth interface element, and the sixth interface element being at the tenth position in the second display area; receiving a fourth operation of the user for the sixth interface element, the fourth operation being used to move the sixth interface element to the 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, 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.

[0026] 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.

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

[0028] 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, 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 the first page of the desktop in the first display area, displaying the 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 for 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, 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, the sixteenth position and the seventeenth position being on the same side of the fifteenth position.

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

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

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

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

[0033] 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 code, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the interface element movement method in any possible implementation of any of the above aspects. The one or more display screens may include foldable displays and / or non-foldable displays.

[0034] In a seventh aspect, an embodiment of the present application provides a computer storage medium comprising 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.

[0035] In an eighth aspect, an embodiment of the present application provides a computer program product, which, when running on an electronic device, enables the electronic device to execute the method for moving an interface element in any possible implementation of any of the above aspects.

[0036] 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

[0037] FIG1A is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0038] 1B to 1E are schematic diagrams of device configurations of a group of electronic devices 100 provided in an embodiment of the present application;

[0039] 1F to 1I are schematic diagrams of another set of electronic devices 100 provided in an embodiment of the present application;

[0040] FIG1J is a schematic diagram of the distribution of a custom control grid (unit) layout on a display screen of an electronic device 100 provided in an embodiment of the present application;

[0041] FIG1K is a schematic diagram of another electronic device 100 provided in an embodiment of the present application;

[0042] 2A to 2E are schematic diagrams of interfaces of a set 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;

[0043] 2F to 2H are schematic diagrams of a group of interface elements moving methods provided in an embodiment of the present application;

[0044] 3A to 3F are schematic diagrams of a group of interface elements moving methods provided in an embodiment of the present application;

[0045] 4A to 4F are schematic diagrams of another set of interface element movement methods provided by an embodiment of the present application;

[0046] 5A to 5F are schematic diagrams of another set of interface element movement methods provided by an embodiment of the present application;

[0047] 6A to 6E are schematic diagrams of interfaces of another set of interface element movement methods provided in an embodiment of the present application;

[0048] 7A to 7D are schematic diagrams of interfaces of another group of interface element movement methods provided in an embodiment of the present application;

[0049] FIG8 is a schematic diagram of a flow chart of a method for moving an interface element provided in an embodiment of the present application;

[0050] FIG9 is a schematic diagram of a flow chart of another method for moving interface elements provided in an embodiment of the present application;

[0051] FIG10 is a schematic diagram of a flow chart of another method for moving interface elements provided in an embodiment of the present application;

[0052] FIG11 is a schematic diagram of a flow chart of a method for moving an interface element provided in an embodiment of the present application;

[0053] FIG12 is a schematic diagram of functional modules of an electronic device 100 provided in an embodiment of the present application;

[0054] FIG13 is a schematic diagram of a flow chart of a method for moving an interface element according to an embodiment of the present application;

[0055] FIG14 is a schematic diagram of a flow chart of a method for moving an interface element provided in an embodiment of the present application;

[0056] FIG15 is a schematic diagram of a flow chart of a method for moving an interface element according to an embodiment of the present application;

[0057] FIG16 is a schematic diagram of a flow chart of a method for moving an interface element according to an embodiment of the present application;

[0058] FIG17 is a flow chart of a method for moving an interface element provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following is a clear and detailed description of the technical solutions in the embodiments of the present application 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 between related 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.

[0060] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0061] The term "user interface (UI)" in the following embodiments of this 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 the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is 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.

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

[0063] FIG. 1A shows a schematic structural diagram of an electronic device 100 .

[0064] 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 particular restrictions on the specific type of the electronic device.

[0065] 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, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an 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.

[0066] It should be understood that the structure illustrated in the embodiments 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0067] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.

[0068] 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.

[0069] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0070] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0071] 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 provides 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 count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.

[0072] 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, a modulation and demodulation processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0073] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0074] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). 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), a MiniLED, a MicroLED, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

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

[0076] 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.

[0077] 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.

[0078] 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 .

[0079] 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 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

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

[0081] 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 provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0082] 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.

[0083] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0084] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.

[0085] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0086] 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.

[0087] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0088] In an embodiment of the present application, the electronic device 100 may include a foldable display screen, which may include one or more display areas. When the foldable display screen of the electronic device 100 is unfolded, the device configuration of the electronic device 100 is an unfolded configuration. When the foldable display screen is folded, the device configuration of the electronic device 100 is a folded configuration. The folded configurations may include a forward folding configuration and a reverse folding configuration. The following describes several different device configurations of the electronic device 100 provided in an embodiment of the present application, taking an electronic device 100 including two display screens as an example.

[0089] 1B to 1E are schematic diagrams showing the device configurations of a group of electronic devices 100 provided in an embodiment of the present application.

[0090] As shown in Figure 1B, 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. In Figure 1B, the electronic device 100 is in an unfolded state, and the user can see the content displayed in the display area 1 and the display area 2 at the same time. A front camera may be provided at the top of the display area 1, and devices such as an earpiece may also be provided. When the display area 1 rotates along the direction indicated by arrow 11a with the folding edge as the axis, and the display area 2 rotates along the direction indicated by arrow 11b with the folding edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the forward folding state shown in Figure 1C or Figure 1D. When the display area 1 rotates along the direction indicated by arrow 22a with the folding edge as the axis, and the display area 2 rotates along the direction indicated by arrow 22b with the folding edge as the axis, the device state of the electronic device 100 can be switched from the unfolded state to the reverse folded state shown in Figure 1E.

[0091] Figure 1C shows a forward folding form of an electronic device 100. As shown in Figure 1C, 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.

[0092] Figure 1D shows another forward-folding configuration of electronic device 100. In addition to the foldable display, electronic device 100 may also include another display, which may be located behind display area 1 (or behind display area 2). As shown in Figure 1D, when electronic device 100 is in the forward-folding configuration, the user can see the display behind display area 1. The display area on this display may be referred to as display area 3. A rear-facing camera may also be provided on the back of display area 2.

[0093] As shown in FIG1E , electronic device 100 is in a reverse foldable configuration. The reverse foldable configuration is achieved by folding the back of display area 1 and the back of display area 2 of electronic device 100 inward along the folding edges. In the reverse foldable configuration, the user can see the content displayed in display area 1 or the content displayed in display area 2, but cannot see the back of display area 1 or the back of display area 2.

[0094] 1F to 1I show schematic diagrams of device configurations of another set of electronic devices 100 provided in an embodiment of the present application.

[0095] As shown in Figure 1F, the electronic device 100 is in an unfolded configuration. The electronic device 100 may include a display area 1 and a display area 2, with the display area 1 and the display area 2 arranged vertically, and a folded edge between the display area 1 and the display area 2. In Figure 1F, the electronic device 100 is in the unfolded configuration, and the user can simultaneously see the content displayed in the display area 1 and the display area 2. A front-facing camera and other devices such as an earpiece may be provided at the top of the display area 1. When the display area 1 rotates about the folded edge in the direction indicated by arrow 33a, and the display area 2 rotates about the folded edge in the direction indicated by arrow 33b, the device state of the electronic device 100 can switch from the unfolded configuration to the forward folded configuration shown in Figures 1G or 1H. When the display area 1 rotates about the folded edge in the direction indicated by arrow 44a, and the display area 2 rotates about the folded edge in the direction indicated by arrow 44b, the device state of the electronic device 100 can switch from the unfolded configuration to the reverse folded configuration shown in Figure 1I.

[0096] Figure 1G shows a forward folding form of an electronic device 100. As shown in Figure 1G, 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.

[0097] Figure 1H shows another forward-folding configuration of electronic device 100. In addition to the foldable display, electronic device 100 may also include another display, which may be located behind display area 1 (or behind display area 2). As shown in Figure 1D, when electronic device 100 is in the forward-folding configuration, the user can see the display behind display area 1. The display area on this display may be referred to as display area 3. A rear-facing camera may also be provided on the back of display area 2.

[0098] As shown in FIG1I , electronic device 100 is in a reverse foldable configuration. The reverse foldable configuration is achieved by folding the back of display area 1 and the back of display area 2 of electronic device 100 inward along the folding edge. In the reverse foldable configuration, the user can see the content displayed in display area 1 or the content displayed in display area 2, but cannot see the back of display area 1 or the back of display area 2.

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

[0100] It should be noted that in the embodiment of the present application, the foldable display screen may include multiple display areas (for example, display area 1 and display area 2), and the foldable display screen is spliced ​​together 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 (i.e., it cannot straddle the center 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.

[0101] 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.

[0102] As shown in Figure 1J, electronic device 100 may include display area 1 and display area 2, and electronic device 100 is in an unfolded configuration. The minimum area for displaying (also called placing) interface elements in the multiple display areas (including display area 1, display area 2, etc.) on a foldable display screen is a control grid, also referred to as a cell. When an interface element is displayed on a display area, it occupies one or more cells in the display area. The size of an interface element can be used to indicate the number of cells it occupies in the display area and the arrangement of all cells occupied by the interface element. The size of interface element 1 may include horizontal and vertical dimensions. The horizontal dimension of interface element 1 refers to the number of columns of cells that interface element 1 needs to occupy in the display area, and the vertical dimension refers to the number of rows of cells that interface element 1 needs to occupy in the display area. For example, if the size of interface element 1 is 1*2, that is, the horizontal dimension is 2 and the vertical dimension is 1, then interface element 1 needs to occupy two cells in the display area, and the arrangement of these two cells is a 1*2 row and column distribution, that is, interface element 1 needs to occupy one row and two columns of cells 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 a 4*2 row and column distribution, that is, interface element 1 needs to occupy 4 rows and 2 columns of units in the display area.

[0103] The number of rows and columns of cells in a display area is related to the size of the display area. For example, as shown in FIG1J , when the lateral dimension of display area 1 is 4 times the lateral dimension of a cell and the longitudinal dimension of display area 1 is 6 times the longitudinal dimension of a cell, display area 1 may include multiple cells arranged in 6*4 rows and columns, where 6 represents the number of rows of cells in display area 1 and 4 represents the number of columns of cells in display area 1. In the embodiment shown in FIG1J , the size of display area 2 is the same as that of display area 1 and display area 2 may also include multiple cells arranged in 6*4 rows and columns.

[0104] The row and column order of a cell on a display area can be used to indicate the position of the cell on the display area. In the embodiment shown in FIG1J , the cell (1, 1) on display area 1 is used to indicate the cell in the first row from the top and the first column from the left on display area 1. That is, when indicating the row and column order of a cell, the number on the left side of the brackets indicates the row order of the cell on the display area, and the number on the right side of the brackets indicates the column order of the cell on the display area.

[0105] In some embodiments, a two-dimensional coordinate system can also be constructed on each display area, and the coordinates on the coordinate system are used to represent the position of the unit on the display area. 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 of the display area 1 (such as the upper left corner, the center point, the upper right corner, the lower right corner, etc.) 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, right 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 multiple 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 can also adopt other two-dimensional coordinate systems. In this case, the electronic device 100 can obtain the coordinates of each unit in the coordinate system by converting the row sequence, column sequence and coordinates of the units. The specific conversion method can refer to the embodiment shown in Figure 8 below, which will not be described in detail here.

[0106] It is understood that the embodiment shown in FIG1J is merely an example. In embodiments of the present application, the size of display area 1 may be different from that of the above-described embodiment, and display area 1 may be divided into more, fewer, or differently arranged units. The size of display area 1 may also be different from that of display area 2. This application does not limit these. Furthermore, in some embodiments, electronic device 100 may include more display areas, and each display area may be divided into multiple units distributed in rows and columns based on the size of the display area and the size of the units.

[0107] In the embodiments 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 functional interface of the application corresponding to the application component; and 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. Application folders can include small application folders (i.e., regular application folders, hereinafter referred to as application folders) and large application folders, with large application folders being larger in size.

[0108] It is understandable that the electronic devices 100 shown in Figures 1B to 1J are all devices with foldable displays. In some embodiments, the electronic device 100 may not include a foldable display, that is, the electronic device 100 may not be a foldable device. For example, as shown in Figure 1K, 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 multiple display areas, such as display area 1 and display area 2. Display area 1 may be the left half of the display screen, and display area 2 may be the right half of the display screen. Display area 1 and display area 2 may also refer to the embodiment shown in Figure 1J above to determine the grid layout of each display area.

[0109] It can be understood that the embodiment shown in Figure 1K is only an example to illustrate that the electronic device 100 may not include a foldable display. The electronic device 100 may be a tablet as shown in Figure 1K, or it may be other electronic devices with one or more display screens. Moreover, the electronic device 100 may also include more display areas, which is not limited in this application.

[0110] 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 switches 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.

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

[0112] For example, as shown in FIG2A , electronic device 100 is in a folded configuration. This folded configuration may be a reverse folded configuration. A desktop 1000 is displayed in display area 1 of the foldable display. Desktop 1000 may display a page 1 containing one or more interface elements. These one or more interface elements may include icons for music applications, movie applications, and the like.

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

[0114] As shown in FIG2B , the electronic device 100 displays page 2, on which one or more interface elements are placed, such as game application icons, gallery cards, etc. Page 2 is the next page after page 1 among the multiple pages displayed on the desktop 1000 .

[0115] When the electronic device 100 is in the folded state and the display area 1 displays the desktop 1000 shown in FIG. 2A or FIG. 2B , the display area 2 may display the interface 1010 shown in FIG. 2C . Alternatively, the display area 2 of the electronic device 100 may display a black screen, i.e., the screen-off interface, as shown in FIG. 2D . The interface 1010 is different from the desktop 1000 .

[0116] The electronic device 100 in the folded state can receive and respond to the user's operation of unfolding the foldable display screen, switch the device state of the electronic device 100 from the folded state to the unfolded state, and display the desktop 1000 as shown in Figure 2E.

[0117] As shown in FIG2E , after electronic device 100 is unfolded, electronic device 100 can display desktop 1000 in display area 1 and display area 2, where display area 1 and display area 2 are of the same size. Desktop 1000 includes multiple pages with one or more interface elements. Page 1 of desktop 1000 is displayed in display area 1, and page 2 is displayed in display area 2. Page 1 is the same as page 1 shown in FIG2A , and page 2 is the same as page 2 shown in FIG2B .

[0118] In other embodiments, if the electronic device 100 is in a forward-folded configuration, the electronic device 100 may display a 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 configuration may refer to the embodiments shown in Figures 2A and 2B above. When the electronic device 100 switches from the folded configuration to the unfolded configuration, the desktop displayed by the electronic device 100 in the unfolded configuration may refer to the embodiment shown in Figure 2E above.

[0119] It should be noted that in the embodiments shown in Figures 2A to 2E above, the display area 1 and the display area 2 have the same size. Therefore, 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 larger display area, and another portion of the page and another page can be displayed in the smaller display area. 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. It can be understood that the embodiment here is only an illustrative description of the foldable display including two display areas. In the embodiment of the present application, the foldable display can also include more display areas, and the present application does not limit this.

[0120] A method for moving interface elements provided by an embodiment of the present application is described below in conjunction with Figures 2F to 2H.

[0121] As shown in Figure 2F, the foldable display screen of the electronic device 100 may include a display area 1 and a display area 2. 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.

[0122] 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 location on page 1 (eg, a long-press drag operation), and display the desktop 200 as shown in FIG. 2G .

[0123] As shown in Figure 2G, in the desktop 200, the gallery card 201 is displayed at the target position of page 1. In combination with Figure 2F, it can be seen that one or more interface elements are displayed at the target position of page 1, including a music application icon 202, a film and television application icon 203, a calendar application icon 204, and a recipe application icon 205. The gallery card 201 is displayed over 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 units in page 1, and the one or more interface elements need to occupy four units, the display area 1 cannot accommodate the display of the one or more interface elements.

[0124] After determining that the display area 1 cannot accommodate the display of the one or more interface elements, the electronic device 100 receives and responds to the user's operation of releasing the gallery card 201, and can display the desktop 200 as shown in Figure 2H. The desktop 200 shown in Figure 2H is exactly the same as the desktop 200 shown in Figure 2F above.

[0125] As shown in FIG2H , after receiving the user's release operation of the gallery card 201, because there is no unit in the display area 1 that can access the one or more interface elements, the gallery card 201 returns to its original position in page 2. That is, the cross-screen movement of the gallery card 201 fails.

[0126] 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 turn, and move the one or more conflicting elements to other display areas in turn. Afterwards, the electronic device can receive and respond to the user's operation of moving the 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 inefficient.

[0127] 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 the display of 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.

[0128] 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.

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

[0130] In some application scenarios, the foldable display of electronic device 100 may include display area 1 and display area 2. When the foldable display is in the unfolded configuration, electronic device 100 may display page 1 of the desktop on display area 1 and page 2 of the desktop on display area 2. Page 2 may include interface element 1 displayed at an initial position. When electronic device 100 receives a user operation to move interface element 1 from its initial position on page 2 to position 1 on page 1, if the initial position can accommodate one or more interface elements (also referred to as conflicting elements) originally displayed in a first layout arrangement at position 1, interface element 1 is swapped with the one or more interface elements originally displayed in the first layout arrangement at position 1. That is, 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 (i.e., 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 displayed in the first layout arrangement (i.e., at least one interface element at position 1 is incomplete), the initial position cannot accommodate the display of one or more interface elements displayed in the first layout arrangement.

[0131] 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.

[0132] 3A , 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.

[0133] 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 can 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 can 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. The status bar 301 may include information such as a communication signal strength indicator, a battery level, and time. Further optionally, a tray area 302 may be provided below the page indicator. The dock area 302 may include one or more trays, such as the tray 302a displayed on page 1 and the tray 302b displayed on page 2. Tray 302a may display one or more icons (such as a dialing application icon, a message application icon, an address book application icon, a browser application icon, etc.), and tray 302b may also display one or more icons (such as a camera application icon, a settings application icon, etc.). One or more trays in the dock area may remain displayed when the page is switched.

[0134] The following describes the display positions of interface elements within a page, with reference to Figure 3A. Both display area 1 and display area 2 may include multiple cells. When display area 1 displays page 1, each interface element within page 1 may occupy one or more cells within display area 1. When display area 2 displays page 2, each interface element within page 2 may occupy one or more cells within display area 2. The number of cells occupied by an interface element and the positional relationship between the multiple cells occupied are determined by the size of the interface element. For specific relationships, refer to the embodiment shown in Figure 1J above. Ignoring the tray area for now, taking the example of cells arranged in six rows and four columns within display area 1, a 6*4 dimensional matrix can be constructed. Each number in the matrix corresponds to a cell within display area 1, and the row and column order of the number within the matrix correspond to the row and column order of the cell within display area 1. In this matrix, the number "1" indicates that the cell is occupied (i.e., an interface element is displayed), and the number "0" indicates that the cell is unoccupied. According to the page 1 shown in FIG3A , 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 occupancy matrix A0 as shown below:

[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 these 24 cells, only cells (2,3) and (2,4) are unoccupied cells, while the other cells all display interface elements. 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 page 2 shown in FIG3A , the occupation of each unit in display area 2 by each interface element in page 2 can be represented by the following 6*4 dimensional screen occupancy matrix B0:

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

[0138] On page 1 displayed in display area 1, a music application icon 305, a movie application icon 306, a calendar application icon 307, and a recipe application icon 308 are displayed. These four application icons occupy the following four cells in display area 1: cell (3,3), cell (3,4), cell (4,3), and cell (4,4). On page 2 displayed in display area 2, a gallery card 304 is displayed. The size of gallery card 304 is 2*2, that is, gallery card 304 needs to occupy four cells, and the four cells are arranged in a square. As can be seen from page 2 shown in Figure 3A, the positions occupied by gallery card 304 in display area 2 include the following four cells: cell (3,1), cell (3,2), cell (4,1), and cell (4,2).

[0139] 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 .

[0140] As shown in FIG3B , 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 on 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 for the gallery control. Optionally, while displaying the edit bar 309, the electronic device 100 may also blur other interface elements on the desktop 300 (interface elements other than the gallery card 304 and the edit bar 309) to highlight the gallery card 304 and facilitate the user's focus on the gallery card 304 and the edit bar 309.

[0141] The electronic device 100 may receive and respond to the user's drag operation on the gallery card 304 , as shown in FIG3C , by closing the display edit bar 309 and moving the gallery card 304 along the trajectory of the user's drag operation.

[0142] As shown in Figure 3C, in the desktop 300, the display edit bar 309 is turned off, and the gallery card 304 can move along the trajectory of the user's drag operation. Optionally, during the movement of the gallery card 304, an initial position prompt can be displayed at the initial position of the gallery card 304 in the display area 2, such as the rectangular frame 304a shown in Figure 3C, and the rectangular frame 304a can include all cells occupied by the initial position. The initial position prompt can be used to prompt the user of the initial position of the gallery card 304 before it moves. It is understandable that in other embodiments, the initial position prompt can 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.

[0143] In response to the user moving the gallery card to position 1, the electronic device 100 may display the desktop 300 shown in FIG3D . The size of position 1 is consistent with the size of the gallery card 304 . In some embodiments, the electronic device 100 may 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 into the display area 1 and the movement speed is less than a preset value, the electronic device 100 may determine, based on position 1 of the gallery card 304 in the display area 1, one or more interface elements originally displayed at position 1, also referred to as conflicting elements.

[0144] As shown in FIG3D , the gallery card 304 is displayed at position 1 in the display area 1. Position 1 includes the following four cells in the display area 1: cell (3,3), cell (3,4), cell (4,3), and cell (4,4). The numbers in the brackets represent the row and column where the cells are located in the display area 1, respectively. For details, please refer to the relevant description in the above formula (1). According to FIG3A , before the user's drag operation, the interface element originally displayed at cell (3,3) in the display area 1 is a music application icon, the interface element originally displayed at cell (3,4) is a film and television application icon, the interface element originally displayed at cell (4,3) is a calendar application icon, and the interface element originally displayed at cell (4,4) is a recipe application icon. Therefore, the electronic device 100 can determine that the conflicting element set includes one or more conflicting elements: a music application icon, a film and television application icon, a calendar application icon, and a 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 (i.e., all of one or more conflicting elements are displayed at position 1), 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 their original positional relationship and be placed at the initial position in the display area 2.

[0145] After determining that the initial position of the gallery card 304 in the display area 2 is capable of maintaining the relative positions of the one or more conflicting elements and placing the one or more conflicting elements (i.e., after being able to accommodate the display of the one or more conflicting elements arranged in the original layout), as shown in Figure 3E, 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 position of the display area 2.

[0146] As shown in Figure 3E, 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, 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 the gallery card 304. 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.

[0147] The electronic device 100 may receive and, in response to the user releasing the gallery card 304 at position 1 , display the gallery card 304 at position 1 of the display area 1 , as shown in FIG3F .

[0148] As shown in FIG3F , a gallery card 304 is displayed at position 1 in display area 1, and the word "Gallery" may be displayed below the gallery card 304 to indicate the name of the gallery card 304. Compared with the desktop 300 shown in FIG3A , in the desktop 300 shown in FIG3F , 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.

[0149] It can be understood that the embodiment shown in Figures 3A to 3F 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 embodiment, each display area may also include more, fewer or differently arranged units than the above embodiment, 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.

[0150] 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 form, 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 from the 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, the 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 and 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.

[0151] 4A , 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 configuration, the electronic device 100 may display a desktop 400 on the foldable display screen.

[0152] The 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 can display one or more interface elements (such as large application folder 402, settings application icon 403, health application icon 404, gallery application icon 405, etc.), and page 2 can display one or more interface elements (such as gallery card 401, wealth application icon, memo application icon, etc.). Optionally, the desktop 400 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 relevant description in the embodiment shown in Figure 3A above, and will not be repeated here. The display position of the interface elements in the page in the display area is described below in conjunction with Figure 4A. Display area 1 and display area 2 can both include multiple cells. When display area 1 displays page 1, each interface element in page 1 can occupy one or more cells in display area 1. When display area 2 displays page 2, each interface element in page 2 can occupy one or more cells in display area 2. The number of cells occupied by an interface element and the positional relationship between the multiple occupied cells are determined by the size of the interface element. For the specific relationship, please refer to the embodiment shown in Figure 1J above. Without considering the tray area for the time being, taking the arrangement of the cells in the 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 cell in the 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 cell in the display area 1. In this matrix, "1" represents that the cell is occupied (i.e., an interface element is displayed), and "0" represents that the cell is not occupied. According to page 1 shown in Figure 4A, the occupation of each unit in the display area 1 by each interface element in page 1 can be represented by the 6*4 dimensional screen occupancy matrix A1 as shown below:

[0153] 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 among the 24 cells, that is, each cell in display area 1 displays an interface element. 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.

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

[0155] According to the above formula (4), when display area 2 displays page 2, display area 2 can include 4*6=24 cells, and among these 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), and cell (3,3), 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.

[0156] Page 1 displayed in display area 1 includes interface elements such as a large app folder 402, a settings app icon 403, a health app icon 404, and a gallery app icon 405. Large app folder 402 is 2*2 in size and occupies the following four cells in display area 1: cell (3,3), cell (3,4), cell (4,3), and cell (4,4); settings app icon 403 occupies cell (4,2) in display area 1; health app icon 404 occupies cell (5,2) in display area 1; and gallery app icon 405 occupies cell (5,3) in display area 1. Page 2 displayed in display area 2 includes a gallery card 401. This card is 2*2 in size, meaning it occupies four cells, arranged in a square. As can be seen from page 2 shown in FIG. 4A , the positions occupied by the gallery card 401 in the display area 2 include the following four cells: cell ( 4 , 1 ), cell ( 4 , 2 ), cell ( 5 , 1 ) and cell ( 5 , 2 ).

[0157] 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 .

[0158] As shown in FIG4B , 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 , reference may be made to the relevant content shown in FIG3B above, which will not be repeated here. Optionally, while displaying the edit bar 406 , the electronic device 100 may 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 and facilitate the user to focus on the gallery card 401 and the edit bar 406 .

[0159] The electronic device 100 may receive and respond to the user's drag operation on the gallery card 401 , as shown in FIG4C , by closing the display edit bar 406 and moving the gallery card 401 along the trajectory of the user's drag operation.

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

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

[0162] As shown in FIG4D , the gallery card 401 is displayed at position 1 in the display area 1. 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 row and column where the cells are located in the display area, respectively. For details, please refer to the relevant description in the above formula (3). According to FIG4A , before the user's drag operation, in the display area 1, the interface element originally displayed at cell (4, 2) is the settings application icon 403, the interface element originally displayed at cell (4, 3) is the large application folder 402 (the lower left part of the large application folder 402), the interface element originally displayed at cell (5, 2) is the health application icon 404, and the interface element originally displayed at cell (5, 3) is the gallery application icon 405. That is, there is an incomplete conflicting element among the conflicting elements displayed at position 1 (that is, what is displayed at position 1 is part of one or more conflicting elements). Therefore, electronic device 100 can determine that the conflicting element set includes one or more conflicting elements: large application folder 402, settings application icon 403, health application icon 404, and gallery application icon 405. The conflicting element set occupies 7 cells and 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:

[0163] According to formula (5), in the 3x3 cell row corresponding to the conflicting element set, only cells (1,1) and (3,3) are unoccupied; all other cells are occupied by the conflicting element set. In other words, the conflicting element set needs to occupy 7 cells, including all cells in the 3x3 cell row except the cell in the upper left corner and the cell in the lower right corner.

[0164] As the gallery card 401 moves to display area 1 following the user's operation, the number of unoccupied cells in display area 2 increases because the gallery card 401 leaves display area 2. At this point, the occupancy of each cell in display area 2 by each interface element on page 2 can be represented by the 6*4 dimensional screen occupancy matrix D1 as shown below:

[0165] According to the above formula (6), when the gallery card 401 is dragged 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 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.

[0166] Based on the screen occupancy matrix D1 of display area 2 and the occupancy matrix C1 of the conflicting element set, electronic device 100 can determine that Position 2 exists in display area 2, allowing electronic device 100 to 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 display area 2 can accommodate the display of one or more conflicting elements arranged in the original layout. As shown in Figure 4D, 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).

[0167] 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 the display of the one or more conflicting elements, as shown in Figure 4E, the electronic device 100 can maintain the relative position of the one or more conflicting elements and display the one or more conflicting elements at position 2 in the display area 2.

[0168] As shown in Figure 4E, in display area 2, the settings application icon 403 is displayed at cell (2,2), the health application icon 404 is displayed at cell (3,2), the gallery application icon 405 is displayed at cell (3,3), and the large application folder 402 occupies the following four cells in display area 2: cell (1,3), cell (1,4), cell (2,3), and cell (2,4). That is, the one or more conflicting elements maintain their relative positions before the user drag operation and are displayed at position 2 of display area 2. 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 cells 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 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.

[0169] The electronic device 100 may receive and, in response to the user releasing the gallery card 401 at position 1 , display the gallery card 401 at position 1 of the display area 1 , as shown in FIG4F .

[0170] As shown in FIG4F , the gallery card 401 is displayed at position 1 in display area 1, and the word "Gallery" can also be displayed below the gallery card 401 to indicate the name of the gallery card 401. Compared with the desktop 400 shown in FIG4A above, in the desktop 400 shown in FIG4F , 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.

[0171] It can be understood that the embodiment shown in Figures 4A to 4F 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 embodiment, each display area may also include more, fewer or differently arranged units than the above embodiment, 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.

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

[0173] 5A , 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.

[0174] The 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 can display one or more interface elements (such as common application folder 502, large application folder 503, settings application icon 504, etc.), and page 2 can display one or more interface elements (such as gallery card 501, wealth application icon, memo application icon, etc.). Optionally, the desktop 500 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 relevant description in the embodiment shown in Figure 3A above, and will not be repeated here. The display position of the interface elements in the page in the display area is described below in conjunction with Figure 5A. 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 cells occupied by an interface element and the positional relationship between the multiple cells occupied are determined by the size of the interface element. For specific relationships, please refer to the relevant content in the embodiment shown in Figure 1J above. Without considering the tray area for the time being, taking the arrangement of the cells in each display area 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 cell in the 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 cell in the display area 1. In this matrix, "1" represents that the cell is occupied (i.e., an interface element is displayed), and "0" represents that the cell is not occupied. According to page 1 shown in Figure 5A, the occupation of each unit in the display area 1 by each interface element in page 1 can be represented by the 6*4 dimensional screen occupancy matrix A2 as shown below:

[0175] 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 among the 24 cells, that is, each cell in display area 1 displays an interface element. 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.

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

[0177] According to the above formula (8), when display area 2 displays page 2, display area 2 can include 4*6=24 cells, and among these 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), and cell (3,3), 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.

[0178] Page 1 displayed in display area 1 includes interface elements such as a common application folder 502, a large application folder 503, and a settings application icon 504. Common application folder 502 is 1*2 in size and occupies two cells in display area 1: cell (3,1) and cell (3,2). Large application folder 503 is 2*2 in size and occupies four cells in display area 1: cell (3,3), cell (3,4), cell (4,3), and cell (4,4). Settings application icon 504 occupies cell (4,2) in display area 1. Page 2 displayed in display area 2 includes a gallery card 501. Gallery card 501 is 2*2 in size, meaning it occupies four cells arranged in a square. As can be seen from page 2 shown in FIG. 5A , the positions occupied by the gallery card 501 in the display area 2 include the following four cells: cell ( 4 , 1 ), cell ( 4 , 2 ), cell ( 5 , 1 ) and cell ( 5 , 2 ).

[0179] 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 .

[0180] As shown in Figure 5B, the edit bar 505 can 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, reference can be made to the relevant content shown in Figure 3B above, which will not be repeated here. Optionally, 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, making it easier for the user to focus on the gallery card 501 and the edit bar 505.

[0181] The electronic device 100 may receive and respond to the user's drag operation on the gallery card 501 , as shown in FIG5C , by closing the display edit bar 505 and moving the gallery card 501 along the trajectory of the user's drag operation.

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

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

[0184] As shown in FIG5D , the gallery card 501 is displayed at position 1 in the display area 1. 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 cells are located in the display area, respectively. For details, please refer to the relevant description in the above formula (7). As can be seen from FIG5A , before the user's drag operation, in the display area 1, the interface element originally displayed at cell (3, 2) is the common application folder 502 (the right half of the common application folder 502), the interface element originally displayed at cell (4, 2) is the settings application icon 504, and the interface elements originally displayed at cells (3, 3) and cells (4, 3) are 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 common application folder 502, the large application folder 503, and the settings application icon 504. The conflicting element set occupies 7 cells, and 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:

[0185] According to formula (9), in the 2*4 cell row corresponding to the conflicting element set, only cell (2,1) is unoccupied, and all other cells are occupied by the conflicting element set. In other words, the conflicting element set needs to occupy 7 cells, including all cells in the 2*4 cell row except the cell in the lower left corner.

[0186] As the gallery card 501 moves to display area 1 following the user's operation, the number of unoccupied cells in display area 2 increases because the gallery card 501 leaves display area 2. At this point, the occupancy of each cell in display area 2 by each interface element on page 2 can be represented by the 6*4 dimensional screen occupancy matrix D2 as shown below:

[0187] According to the above formula (10), when the gallery card 501 is dragged 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 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.

[0188] Based on the screen occupancy matrix D2 of display area 2 and the occupancy matrix C2 of the conflicting element set, the electronic device 100 can determine that there is a set of positions in display area 2, which includes position a, position b, and position c. Position a can be used to place the large application folder 503, position b can be used to place the commonly used application folder 502, and position c can be used to place the settings application icon 504. As shown in Figure 5D, 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); and position a includes cell (2,2) in display area 2.

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

[0190] As shown in Figure 5E, 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 setting application icon 504 occupies 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, which 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 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.

[0191] The electronic device 100 may receive and, in response to the user releasing the gallery card 501 at position 1 , display the gallery card 501 at position 1 of the display area 1 , as shown in FIG5F .

[0192] As shown in FIG5F , the gallery card 501 is displayed at position 1 in display area 1, and the word "Gallery" can also be displayed below the gallery card 501 to indicate the name of the gallery card 501. Compared with the desktop 500 shown in FIG5A , in the desktop 500 shown in FIG5F , the gallery card 501 is displayed in display area 1, and the conflicting element set (including the frequently used application folder 502, the large application folder 503, and the settings application icon 504) is displayed in display area 2.

[0193] It can be understood that the embodiment shown in Figures 5A to 5F 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 embodiment, each display area may also include more, fewer or differently arranged units than the above embodiment, and the screen occupancy information matrix corresponding to the display area may also include units in the tray area. This application does not limit this.

[0194] 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 form, 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 from 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 that the user has released the interface element 1, the interface element 1 may be displayed at the initial position.

[0195] 6A , 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 configuration, the electronic device 100 may display a desktop 600 on the foldable display screen.

[0196] The desktop 600 displays two pages containing interface elements (e.g., 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 (e.g., a commonly used application folder 602, a large application folder 603, a settings application icon 604, etc.), and page 2 may display one or more interface elements (e.g., a gallery card 601, a wealth application icon, a memo application icon, etc.). Optionally, the desktop 600 may also display one or more items of a page indicator, a status bar, or a tray area. For a specific description of the one or more items, reference may be made to the relevant description in the embodiment shown in FIG. 3A above, which will not be repeated here.

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

[0198] As shown in Figure 6B, the interface elements displayed at position 1 may include: a frequently used application folder 602, a large application folder 603, and a settings application icon 604. These interface elements are conflicting elements. At position 1, the right half of the frequently used application folder 602, the left half of the large application folder 603, and the entire settings application icon 604 are displayed. Optionally, an initial position prompt may be displayed at the initial position of the gallery card 601. The initial position prompt may be a rectangular frame 601a as shown in Figure 6B, or a prompt of another shape. As can be seen from Figure 6B, there is no position set in display area 2 that can accommodate the display of the above-mentioned conflicting elements.

[0199] When the electronic device 100 determines that it is impossible to find a position in the display area 2 that can accommodate the above four conflicting elements respectively, the electronic device 100 can receive and respond to the user's release operation, display the desktop 600 as shown in Figure 6C, and display the gallery card 601 at the initial position in the display area 2.

[0200] As shown in FIG. 6C , the electronic device 100 displays a desktop 600 , and the desktop 600 shown in FIG. 6C is identical to the desktop 600 shown in FIG. 6A .

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

[0202] Illustratively, in response to the user's operation of moving the gallery card 601 from the initial position in the display area 2 to the position 1 in the display area 1 , the electronic device 100 displays the desktop 600 shown in FIG. 6B .

[0203] When the electronic device 100 determines that it is impossible to find positions in the display area 2 that can accommodate the above four conflicting elements respectively, the electronic device 100 can receive and respond to the user's release operation, display the desktop 600 as shown in Figure 6D, and display the gallery card 601 at position 1 in the display area 1.

[0204] As shown in FIG6D , 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, the page indicator in the desktop 600 shown in FIG6D indicates that two new pages are added to the desktop 600 compared to the embodiment shown in FIG6B .

[0205] The electronic device 100 can receive and respond to the user's operation of switching pages to the two rightmost pages (for example, multiple swiping operations to the left), and display pages 3 and 4 as shown in Figure 6E on the desktop 600, where page 3 displays the conflicting elements originally displayed at position 1.

[0206] As shown in FIG. 6E , the desktop 600 may display page 3 and page 4 , wherein page 3 displays a conflicting element originally displayed at position 1 , and the conflicting elements may be displayed while maintaining their original positional relationship.

[0207] In some application scenarios, the foldable display of electronic device 100 may include display area 1 and display area 2. When the foldable display is in the unfolded configuration, electronic device 100 may display page 1 of the desktop on display area 1 and page 2 of the desktop on display area 2. Page 2 may include interface element 1 displayed in its initial position. When electronic device 100 receives a user operation to move interface element 1 from its initial position on page 2 to position 1 on page 1, if display area 2 can accommodate (or accommodate or display in the second layout for) one or more interface elements (also known as squeeze elements) displayed in the second layout at position 3 below position 1, 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 display area 2, and display interface element 1 at position 1. The size of position 4 is the size of the entire area occupied by the one or more interface elements displayed in the first layout at 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 squeezed into other display areas. This improves efficiency and allows the original interface elements at position 1 to be displayed in display area 1 in their original layout, making it easier for users to use them. In some embodiments, position 3 can also be above, to the left, or to the right of position 1, which is not limited in this application.

[0208] 7A , 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 configuration, the electronic device 100 may display a desktop 600 on the foldable display screen.

[0209] The desktop 700 displays two pages containing interface elements (e.g., 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 (e.g., 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 (e.g., gallery card 701, wealth application icon, memo application icon, etc.). Optionally, the desktop 700 may also display one or more items of a page indicator, a status bar, or a tray area. For a detailed description of the one or more items, please refer to the relevant description in the embodiment shown in FIG. 3A above, which will not be repeated here.

[0210] The electronic device 100 can receive and respond to the user's operation of dragging the gallery card 701 to position 1 of the display area 1, and display the desktop 700 as shown in Figure 7B. The user's operation of dragging the gallery card 701 to position 1 of the display area 1 can include the user's long press operation and drag operation on the gallery card 701. The specific interface change diagrams can refer to the interface diagrams shown in Figures 3B to 3D, Figures 4B to 4D, and Figures 5B to 5D above, and will not be repeated here.

[0211] As shown in Figure 7B, the gallery card 701 is displayed overlaying above 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. The initial position prompt can be a rectangular frame 701a as shown in Figure 7B, or a prompt of other shapes. As can be seen from Figure 7B, the initial position in display area 2 can accommodate the four interface elements displayed at display position 3.

[0212] When the electronic device 100 detects that the user drags the gallery card 701 at a speed less than a preset value, it can push the four interface elements displayed at position 1 downward to display the desktop 600 as shown in FIG7C .

[0213] As shown in Figure 7C, a gallery card 701 is displayed at position 1 of page 1. Below position 1, a music application icon 702, a movie application icon 703, a calendar application icon 704, and a recipe application icon 705 are displayed at position 3, with these four interface elements arranged in a 2x2 row. At the initial position in display area 2, a gallery application icon 706, a voice application icon 707, a Bluetooth application icon 708, and a recording application icon 709 are displayed, with these four interface elements arranged in a 2x2 row.

[0214] The electronic device 100 can receive and respond to the user's release operation, as shown in FIG7D , and maintain the layout of the various interface elements in the desktop 700 shown in FIG7C .

[0215] It can be understood that the embodiment shown in Figures 7A to 7D is only 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 the first layout at the first layout at the display position 3, the electronic device 100 can display the conflicting element at the initial position in the first layout; if there is a position 2 in the display area 2 that can accommodate 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.

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

[0217] FIG8 shows a schematic flow chart of a method for moving an interface element provided in an embodiment of the present application.

[0218] As shown in FIG8 , the specific process of the interface element moving method may include the following steps:

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

[0220] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, reference may be made to the relevant contents in the embodiments shown in FIG. 1B and FIG. 1E , which will not be repeated here.

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

[0222] For example, in the embodiment shown in FIG3A above, 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, and 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.

[0223] S802 , 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 .

[0224] Operation 1 can be a user drag (also known as dragging, moving, etc.) operation on interface element 1. In some embodiments, Operation 1 can also be a long-press drag operation, that is, Operation 1 includes a long-press operation and a drag operation. For example, Operation 1 can be the drag operation on the gallery card 304 in the embodiment shown in Figure 3B above. Operation 1 can also include the long-press operation on the gallery card 304 in the embodiment shown in Figure 3A above and the drag operation on the gallery card 304 in the embodiment shown in Figure 3B above.

[0225] In response to operation 1 on interface element 1, electronic device 100 can display the movement trajectory of interface element 1 based on the trajectory of operation 1 on the foldable display (including display area 1 and display area 2). In other words, electronic device 100 can make interface element 1 move along the trajectory of operation 1.

[0226] 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.

[0227] 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. The initial position is the original position of the interface element 1 in the display area 2. 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.

[0228] 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 .

[0229] 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.

[0230] The size of the interface element 1 is used to indicate the horizontal and vertical dimensions of the area that the interface element 1 needs to occupy in the display screen (display area 1 or display area 2). According to the grid layout shown in Figure 1J above, 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. For example, 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. 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 screen, and the arrangement of the 8 units is a 4*2 row and column distribution, that is, interface element 1 needs to occupy 4 rows and 2 columns of units in the display screen.

[0231] The coordinate system 2 can 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, and this application is not limited here. In some embodiments, the electronic device 100 can obtain the row order 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 order and column order of each unit can be regarded as the horizontal coordinate and vertical coordinate of the unit in the coordinate system. In other embodiments, the origin of the coordinate system 2 can also be other points, each unit can 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 order 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 the positive direction of the vertical axis downward, and extending the positive direction of the horizontal axis to the right. 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 just an example of a way to construct the 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 this application is not limited here.

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

[0233] For example, taking the embodiment shown in FIG3A as an example, the interface element 1 is the 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 coordinates (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 order 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 order 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.

[0234] 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.

[0235] 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.

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

[0237] According to the embodiment shown in FIG1J above, the grid layout of the display area 1 can also include multiple rows and columns of units, and position 1 can include one or more units on the display area 1. The number of units included in position 1 and the arrangement of the units are the same as the number of units and the arrangement indicated by the size of the interface element 1. For example, in the embodiment shown in FIG3D above, the interface element 1 is a gallery card 304, the size of the interface element 1 is 2*2, and the size of position 1 is 2*2, that is, 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.

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

[0239] 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.

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

[0241] 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.

[0242] Temporary placeholder information may include the size of each conflicting element in the conflicting element set, the positional relationship between the conflicting elements, and coordinates 2 of the conflicting element set in coordinate system 1. For a detailed description of the size of the conflicting elements, reference may be made to the description of the size of interface element 1 in step S803 above. The positional relationship between the conflicting elements refers to the arrangement and 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 display area 1 with the upper left corner of display area 1 as its origin. In another possible implementation, coordinate system 1 may also be a coordinate system constructed on display area 1 with any other point on display area 1 (e.g., the center point, lower right corner, upper right corner, etc. of display area 1) as its origin, which is not limited in this application. Coordinates 2 are used to determine the position of the conflicting element set in display area 1. Coordinates 2 may be a coordinate point in the conflicting element set (e.g., the coordinate point of the upper left corner in coordinate system 1). In some embodiments, when the horizontal coordinate or vertical coordinate of the area occupied by the conflicting element set in display area 1 is greater than 1, coordinates 2 may also be a coordinate set including multiple coordinate points.

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

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

[0245] For example, in the embodiment shown in FIG3D above, 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 conflict element set can be represented by the following temporary placeholder matrix M1:

[0246] According to formula (11), the temporary placeholder matrix M1 is a 2*2 dimensional matrix consisting of 2 rows and 2 columns, with every number in the matrix being "1." Based on this temporary placeholder matrix M1, if the conflicting elements in the conflicting element set are to be moved while maintaining their relative positions, at least a 2*2 blank area is required to accommodate the display of the conflicting element set.

[0247] It is understandable that the above embodiment is only an example of how to construct a temporary placeholder matrix to represent the temporary placeholder information of the conflicting element set. 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 with 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, and this application does not limit this.

[0248] 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.

[0249] 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.

[0250] Electronic device 100 can construct an initial placeholder matrix based on the size of the initial position (the size of interface element 1). The dimensions of the initial placeholder matrix are the same as the size of interface element 1, and each number in the matrix is ​​"0", indicating that after interface element 1 is dragged, the initial position is in an idle state (i.e., unoccupied state).

[0251] For example, taking the embodiment shown in FIG. 3A to FIG. 3F 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 may be the following matrix L1:

[0252] According to formula (12), the dimensions of the initial placeholder matrix are the same as those of the gallery card 304, 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 four cells are arranged in a 2*2 row and column arrangement.

[0253] It is understood that the above embodiment is merely an example of how the initial position information can be represented by constructing an initial placeholder matrix. In the embodiments 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 content than L1. In some embodiments, the electronic device 100 can also construct the initial placeholder matrix in step S803 above, that is, after obtaining the initial position information, construct the initial placeholder matrix. This application does not limit this.

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

[0255] For example, in the embodiments shown in Figures 3A to 3F above, the initial placeholder matrix is ​​the initial placeholder matrix L1 shown in Formula (12), and the temporary placeholder matrix is ​​the temporary placeholder matrix M1 shown in Formula (11). According to 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 a 2*2 conflicting element set. That is, in the embodiments shown in Figures 3A to 3F above, the electronic device 100 can determine that there is a position 2 in the initial position that can accommodate the display of the conflicting element set, and that position 2 is the same as the initial position.

[0256] 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.

[0257] For example, in the embodiments shown in Figures 3A to 3F above, the size of the initial position is 2*2, and the size of the conflicting element set is 2*2. The size of the conflicting element set refers to the size of the area required to display all conflicting elements in the conflicting element set while maintaining the original positional relationships of the conflicting element sets. As can be seen from the foregoing, the horizontal size of the initial position is not less than the horizontal size of the conflicting element set, and the vertical size of the initial position is not less than the vertical size of the conflicting element set. Therefore, the electronic device 100 can determine that there is a position 2 in the initial position that can accommodate the display of the conflicting element set, and that position 2 is the same as the initial position.

[0258] 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, 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.

[0259] It is understood that the two other 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 are merely illustrative. In the embodiment of the present application, the electronic device 100 may also use a method different from the above embodiment to determine whether the initial position can accommodate the display of the conflicting element set.

[0260] In some embodiments, Position 2 may also be a partial area within the initial position. In this case, upon determining the presence of Position 2 based on the temporary placeholder information and the initial position information, the electronic device 100 may determine the positional relationship of Position 2 relative to the initial position. Furthermore, the coordinates of Position 2 in Coordinate System 2 may be determined based on the coordinates of the initial position in the coordinate system.

[0261] 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;

[0262] When the electronic device 100 determines that there is no position 2 in the initial position that can accommodate the display conflict element set, the electronic device 100 may execute the following step S808 to determine that the squeezing fails.

[0263] S808: The electronic device 100 determines that the exchange of the squeeze position fails.

[0264] In some embodiments, after the electronic device 100 determines that the exchange position 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. The interface schematic diagram can refer to the embodiments shown in Figures 6A to 6C above.

[0265] In some embodiments, after the electronic device 100 determines that the exchange squeeze fails, it can execute other judgment logic. For details, please refer to the relevant content in the embodiment shown in Figure 11 below, which will not be described in detail here.

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

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

[0268] In step S807, the electronic device 100 may determine the relative positional relationship between position 2 and the initial position, and determine the coordinates of position 2 in coordinate system 2. Subsequently, the electronic device 100 may obtain 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.

[0269] For example, in the embodiments shown in Figures 3A to 3F above, Position 2 is the initial position in Display Area 2 (i.e., the area where the rectangular frame 304a shown in Figure 3D is located). Coordinate system 1 is created with the upper left corner of Display Area 1 as the origin, and coordinate system 2 is created with the upper left corner of 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 vertical coordinates of all coordinate points in Coordinate System 2 in Coordinate System 1 remain unchanged, and the horizontal coordinates 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).

[0270] In some embodiments, the electronic device 100 may also determine the row sequence and column sequence of each unit included in the display area 2 at position 2 in step S807. Thereafter, the electronic device 100 may also determine the coordinate 3 of 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 units and the coordinate system.

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

[0272] 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. Electronic device 100 can display the movement trajectory of the conflicting element set based on coordinates 2 and 3.

[0273] S811, 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.

[0274] Operation 2 may be a release operation on interface element 1, such as the release operation on the gallery card 304 by the user as shown in FIG3E .

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

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

[0277] 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 .

[0278] It is understandable that the embodiment shown in FIG8 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.

[0279] 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.

[0280] FIG9 shows a flow chart of another method for moving interface elements provided in an embodiment of the present application.

[0281] As shown in FIG9 , the specific process of the method for moving interface elements based on overall squeezing may include the following steps:

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

[0283] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, reference may be made to the relevant contents in the embodiments shown in FIG. 1B and FIG. 1E , which will not be repeated here.

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

[0285] For example, in the embodiment shown in FIG4A above, 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.

[0286] 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 .

[0287] Operation 1 can be a user drag (also known as dragging, moving, etc.) operation on interface element 1. In some embodiments, Operation 1 can also be a long-press drag operation, that is, Operation 1 includes a long-press operation and a drag operation. For example, Operation 1 can be the drag operation on the gallery card 401 in the embodiment shown in Figure 4B above. Operation 1 can also include the long-press operation on the gallery card 401 in the embodiment shown in Figure 4A above and the drag operation on the gallery card 401 in the embodiment shown in Figure 4B above.

[0288] In response to operation 1 on interface element 1, electronic device 100 can display the movement trajectory of interface element 1 based on the trajectory of operation 1 on the display screen (including display area 1 and display area 2). In other words, electronic device 100 can make interface element 1 move along the trajectory of operation 1.

[0289] 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.

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

[0291] The specific content of the size of the interface element 1 can refer to the relevant content in step S803 shown in Figure 8 above, and will not be repeated here.

[0292] 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.

[0293] As can be seen from the embodiment shown in FIG. 1J above, the foldable display screen (including the display area 1 and the display area 2 ) of the electronic device 100 may include a plurality of units distributed in rows and columns.

[0294] 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.

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

[0296] For the coordinate system 2, reference may be made to the description of step S803 shown in FIG8 .

[0297] In some embodiments, the screen occupancy information of the display area 2 may be a screen occupancy matrix. The dimensions of the screen occupancy matrix may be determined based on the row and column distribution of the cells on the display area 2. For example, if the display area 2 includes a plurality of cells distributed in 4 rows and 4 columns, the dimensions of the screen occupancy matrix may be 4*4; for another example, if the display area 2 includes a plurality of cells distributed in 6 rows and 4 columns, the dimensions 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"), where the first number is different from the second number. The row order and column order of the first number or the second number in the screen occupancy matrix may correspond to the cells with the same row order and column order in the display area 2. The cell corresponding to the first number is in an occupied state in the display area 2, and the cell 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 digits in the screen occupation matrix can be used to determine the number of occupied cells, or one or more cells, in the display area 2; and the positions of zero, one, or more second digits in the screen occupation matrix can be used to determine the number of unoccupied cells, or one or more cells, in the display area 2. In other words, the screen occupation matrix of the display area 2 indicates the screen occupation information of the display area 2.

[0298] Exemplarily, before receiving and responding to operation 1, for example, in the embodiment shown in FIG. 3A above, the screen occupancy matrix of display area 2 may be the screen occupancy matrix B0 shown in formula (2); in the embodiment shown in FIG. 4A above, the screen occupancy matrix of display area 2 may be the screen occupancy matrix B1 shown in formula (4); in the embodiment shown in FIG. 5A above, the screen occupancy matrix of display area 2 may be the screen occupancy matrix B2 shown in formula (8), etc. Furthermore, exemplarily, after receiving and responding to operation 1, for example, in the embodiment shown in FIG. 4B or FIG. 4C above, the screen occupancy matrix of display area 2 may be the screen occupancy matrix D1 shown in formula (6); in the embodiment shown in FIG. 5B or FIG. 5C above, the screen occupancy matrix of display area 2 may be the screen occupancy matrix D2 shown in formula (10), etc.

[0299] In 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 whether each unit is occupied.

[0300] 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.

[0301] The specific content of step S905 can refer to the relevant description of step S804 shown in Figure 8 above, and will not be repeated here.

[0302] Position 1 may include one or more cells on display area 1. The number of cells included in position 1 and the arrangement of the cells are the same as the number of cells and the arrangement indicated by the size of interface element 1. For example, in the embodiment shown in FIG4D above, interface element 1 is a gallery card 401, the size of interface element 1 is 2*2, and the size of position 1 is 2*2, that is, position 1 includes 4 cells on display area 1, and the arrangement of the 4 cells is a 2*2 row and column distribution.

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

[0304] For example, in the embodiment shown in FIG4D , the following four interface elements are displayed at position 1: large application folder 402, settings application icon 403, health application icon 404, and gallery application icon 405. Electronic device 100 may determine that the conflicting element set includes the following four conflicting elements: large application folder 402, settings application icon 403, health application icon 404, and gallery application icon 405.

[0305] 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.

[0306] For the specific content of the temporary placeholder information, please refer to the relevant description in step S806 shown in FIG. 8 .

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

[0308] For example, in the embodiment shown in FIG4D , 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 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. The size of the large application folder 402 is 2*2, and the sizes of the other three conflicting elements are all 1*1. 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 settings 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 conflicting element set. Each first digit (e.g., the digit "1") or second digit (e.g., the digit "0") in the matrix can correspond to a cell. In the matrix, the first digit indicates that the cell is occupied (i.e., the conflicting element needs to be displayed), and the second digit indicates that the cell is unoccupied (i.e., the conflicting element does not need to be displayed). The temporary placeholder information of the conflicting element set can then be represented by the 3*3 dimensional placeholder matrix C1 shown in formula (5).

[0309] 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.

[0310] It is understandable that the above embodiment is merely an example of how to construct a temporary placeholder matrix to represent the temporary placeholder information of a conflicting element set. In an embodiment of the present application, the conflicting element set may also be a collection of conflicting elements different from that in 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 constructing other placeholder matrices such as the initial placeholder matrix), or use other methods to represent the temporary placeholder information, and this application does not limit this.

[0311] 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 .

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

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

[0314] For example, taking the embodiment shown in Figures 4A to 4F above as an example, the screen occupancy matrix of display area 2 is the screen occupancy matrix D1 shown in the above formula (6), and the temporary occupancy matrix of the conflicting element set is the occupancy matrix C1 shown in the above formula (5). Traversing the screen occupancy matrix D1 with the upper left corner as the starting point, 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). The row and column distribution of these 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 conflicting element set, and position 2 includes these seven cells.

[0315] 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 idle 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 idle cells and the temporary placeholder information.

[0316] After determining position 2, the 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.

[0317] 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;

[0318] 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 electronic device 100 may execute the following step S909 to determine that the squeezing fails.

[0319] S909: The electronic device 100 determines that the overall squeezing fails.

[0320] 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.

[0321] In some embodiments, after the electronic device 100 determines that the overall squeezing has failed, it can execute other judgment logic. For details, please refer to the relevant content in the embodiment shown in Figure 11 below, which will not be described in detail here.

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

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

[0324] The electronic device 100 may determine the coordinates of position 2 in coordinate system 2 in step S908. Thereafter, the electronic device 100 may obtain 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.

[0325] The specific manner in which the electronic device 100 determines the coordinates of the position 2 in the coordinate system 1 based on the coordinates of the position 2 in the coordinate system 2 can refer to the relevant content in step S809 shown in Figure 8 above, and will not be repeated here.

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

[0327] S912 , 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 .

[0328] Operation 2 may be a release operation on interface element 1, such as the release operation on gallery card 401 by the user as shown in FIG4E .

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

[0330] 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 .

[0331] The specific contents of steps S911 to S914 can refer to the relevant contents of steps S810 to S813 shown in Figure 8 above, and will not be repeated here.

[0332] It is understandable that the embodiment shown in FIG9 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.

[0333] By using 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 traverse the display area 2 and 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.

[0334] FIG10 shows a flow chart of a method for moving interface elements based on dispersed squeezing provided in an embodiment of the present application.

[0335] As shown in FIG10 , the specific process of the interface element movement method based on dispersed squeezing may include the following steps:

[0336] 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.

[0337] The device form of the electronic device 100 is an unfolded form. For a detailed description of the unfolded form, reference may be made to the relevant contents in the embodiments shown in FIG. 1B and FIG. 1E , which will not be repeated here.

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

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

[0340] S1002 , 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 .

[0341] Operation 1 can be a user drag (also known as dragging, moving, etc.) operation on interface element 1. In some embodiments, Operation 1 can also be a long-press drag operation, that is, Operation 1 includes a long-press operation and a drag operation. For example, Operation 1 can be the drag operation on Gallery card 501 in the embodiment shown in FIG. 5B above. Operation 1 can also include the long-press operation on Gallery card 501 in the embodiment shown in FIG. 5A above and the drag operation on Gallery card 501 in the embodiment shown in FIG. 5B above.

[0342] For the specific content of step S1002 , reference may also be made to the relevant descriptions in step S802 shown in FIG. 8 and step S902 shown in FIG. 9 .

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

[0344] The specific content of the size of the interface element 1 can refer to the relevant content in step S803 shown in Figure 8 above, and will not be repeated here.

[0345] 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.

[0346] For the specific content of step S1004, reference may be made to the relevant content of step S904 shown in FIG. 9 .

[0347] 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.

[0348] The specific content of step S1005 can refer to the relevant description of step S804 shown in Figure 8 above, and will not be repeated here.

[0349] Position 1 may include one or more cells on display area 1. The number of cells included in position 1 and the arrangement of the cells are the same as the number of cells and the arrangement indicated by the size of interface element 1. For example, in the embodiment shown in FIG5D above, interface element 1 is a gallery card 501, the size of interface element 1 is 2*2, and the size of position 1 is 2*2, that is, position 1 includes 4 cells on display area 1, and the arrangement of the 4 cells is a 2*2 row and column distribution.

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

[0351] For example, in the embodiment shown in FIG5D , the following three interface elements are displayed at position 1: a frequently used application folder 502, a large application folder 503, and a settings application icon 504. Electronic device 100 may determine that the conflicting element set includes the following three conflicting elements: frequently used application folder 502, large application folder 503, and settings application icon 504.

[0352] 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.

[0353] The detailed description of the coordinate system 1 can be referred to step S806 shown in FIG8 , which will not be repeated here.

[0354] 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 single 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 this application.

[0355] 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.

[0356] The temporary placeholder matrix can be the placeholder matrix of the entire conflict element set. For example, in the embodiment shown in FIG5D above, 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. The conflict element set includes the following three conflicting elements: the frequently used application folder 502, the large application folder 503, and the setting application icon 504. The size of the frequently used 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 unit of the frequently used application folder 502 occupies the unit in the upper left corner of position 1, the two units on the left of the large application folder 402 respectively occupy the two units on the right side of position 1, and the setting application icon 403 occupies the unit in the lower left corner of position 1. In this case, a 2*4 dimensional matrix can be constructed for the conflicting element set. Each first digit (e.g., the digit "1") or second digit (e.g., the digit "0") in the matrix can correspond to a cell. In the matrix, the first digit indicates that the cell is occupied (i.e., the conflicting element needs to be displayed), and the second digit indicates that the cell is unoccupied (i.e., the conflicting element does not need to be displayed). The temporary placeholder information of the conflicting element set can then be represented by the 2*4 dimensional placeholder matrix C2 shown in formula (9).

[0357] 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").

[0358] It is understood that the above embodiment is merely an example of how the size of each conflicting element can be represented by constructing a temporary placeholder matrix. In the embodiments of the present application, the set of conflicting elements may also be a set of conflicting elements different from that in the above embodiment, and the temporary placeholder matrix may also be a matrix of different dimensions or different content. 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, and this application does not limit this.

[0359] S1008 , the electronic device 100 determines whether there is a position set in the display area 2 that can accommodate and display 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 .

[0360] 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 for accommodating and displaying a conflicting element in the conflicting element set, and the size of the position is the same as the size of the conflicting element. Furthermore, before a conflicting element is placed at a position in the position set, no interface element is displayed at the position in the position set.

[0361] 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 the display of 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 first. When the products corresponding to the two conflicting elements are the same, they can be sorted based on the horizontal size (or vertical size). In other embodiments, the electronic device 100 can also adopt other sorting methods, which are not limited in this application.

[0362] 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.

[0363] For example, taking the embodiment shown in Figures 5A to 5F above as an example, the screen occupancy matrix of display area 2 can 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 can traverse the matrix with the upper left corner of the screen occupancy matrix D2 as the starting point to determine that there is position 3 in display area 2. Position 3 includes the following four cells with a row and column distribution of 2*2: cell (1,3), cell (1,4), cell (2,3) and cell (2,4). These four cells can be used to place the large application folder 504 with a size of 2*2. The electronic device 100 can replace the number "0" at the corresponding position of the above four cells 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 matrix with the upper left corner of the replaced screen occupancy matrix D21 as the starting point, and determine that there is a position 4 in the display area 2. Position 4 includes the following two units with a row and column distribution of 1*2: unit (3,2) and unit (3,3). 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 matrix with the upper left corner of the replaced screen occupancy matrix D22 as the starting point, and determine that there is a position 5 in the display area 2. Position 5 includes the following units with a row and column distribution of 1*1: unit (2,2). The unit can be used to place the setting application icon 504 with a size of 1*1.

[0364] 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.

[0365] 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 .

[0366] 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;

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

[0368] S1009: The electronic device 100 determines that the dispersing and squeezing fails.

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

[0370] In other embodiments, the electronic device 100 may also create a new page, maintain the original layout of the conflicting elements, and display all the conflicting elements on the new page. For details, please refer to the embodiments shown in Figures 6D to 6E above.

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

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

[0373] The specific manner in which the electronic device 100 determines the coordinates of the position 2 in the coordinate system 1 based on the coordinates of the position 2 in the coordinate system 2 can refer to the relevant content in step S809 shown in Figure 8 above, and will not be repeated here.

[0374] S1011 , the electronic device 100 displays the movement trajectory 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 .

[0375] S1012 , 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 .

[0376] Operation 2 may be a release operation on interface element 1, such as the release operation on gallery card 501 by the user as shown in FIG5E .

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

[0378] 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 .

[0379] The specific contents of steps S1011 to S1014 can also refer to the relevant contents of steps S810 to S813 shown in Figure 8 above, and will not be repeated here.

[0380] It is understandable that the embodiment shown in FIG10 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.

[0381] Using the interface element moving method provided in the embodiments of the present application, if there is not enough space in display area 1 to display interface element 1, it is possible to traverse unoccupied cells in display area 2 to find locations in display area 2 that can accommodate and display each conflicting element, and then display the conflicting elements at the corresponding locations in display area 2. In this way, interface element 1 can be moved from display area 2 to display area 1 with a single drag operation, simplifying the operation steps and improving efficiency.

[0382] FIG11 shows a flow chart of a method for moving an interface element provided in an embodiment of the present application.

[0383] As shown in FIG11 , the specific process of the interface element moving method may include the following steps:

[0384] 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.

[0385] S1102 , 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 .

[0386] 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.

[0387] 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.

[0388] 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.

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

[0390] 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.

[0391] The specific contents of steps S1101 to S1107 can refer to the relevant description of steps S901 to S907 shown in Figure 9 above, which will not be repeated here. The specific contents of step S1103 can also refer to the relevant contents of step S803 shown in Figure 8 above.

[0392] 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.

[0393] The initial position of interface element 1 is the position of interface element 1 on display area 2 before electronic device 100 responds to operation 1. The size of interface element 1 is the same as the size of the initial position. Based on the size of the initial position and the temporary placeholder information, electronic device 100 can determine whether there is a position 2 at the initial position that can accommodate the display of the conflicting element set. The specific determination method can be referred to the specific description of step S807 shown in Figure 8, and will not be repeated here.

[0394] 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;

[0395] 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 and squeezing fails, and the following step S1109 can be executed.

[0396] 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 .

[0397] 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 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.

[0398] For other specific contents of step S1109, reference may be made to the relevant description of step S908 shown in FIG9 , which will not be repeated here.

[0399] 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;

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

[0401] S1110 , the electronic device 100 determines whether there is a position set in the display area 2 that can accommodate and display 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 .

[0402] The specific content of step S1110 can refer to the relevant content of step S1008 shown in Figure 10 above, and will not be repeated here.

[0403] 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;

[0404] When the electronic device 100 determines that there is no position set in the initial position that can accommodate all conflicting elements in the conflicting element set, the electronic device 100 may execute the following step S1111 to determine that the dispersing and squeezing fails.

[0405] S1111, the electronic device 100 determines that the dispersing and squeezing fails.

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

[0407] In some embodiments, after determining that the dispersion and crowding in display area 2 has failed, the electronic device 100 can 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 embodiment and will not be described in detail here.

[0408] 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 .

[0409] S1113 , the electronic device 100 displays the movement trajectory of each conflicting element based on the coordinates of each conflicting element in the coordinate system 1 and the coordinates of the corresponding position of each conflicting element in the display area 2 in the coordinate system 1 .

[0410] 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 .

[0411] 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 .

[0412] S1116 , 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 corresponding position of each conflict element in the display area 2 in the coordinate system 2 .

[0413] The specific contents of steps S1112 to S1116 can refer to the relevant contents of steps S809 to S813 shown in Figure 8, or the relevant contents of steps S1010 to S1014 shown in Figure 10, and will not be repeated here.

[0414] It is understandable that the embodiment shown in FIG11 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.

[0415] The interface element movement method provided in the embodiment of the present application can be combined with the three squeezing methods in the embodiments shown in Figures 8 to 10 to find a position for the conflicting elements in the display area 2. This can increase the probability of successful positioning, simplify the operation steps, and improve efficiency.

[0416] In some embodiments, before step S1108 shown in FIG11 , the electronic device 100 may first locate the conflicting elements in the set of non-conflicting elements in display area 1. If it is determined that there is no set of locations in display area 1 that can accommodate all conflicting elements, the electronic device 100 may execute step S1108 and subsequent steps to locate the conflicting elements in display area 2. In this way, the conflicting elements can be located first in display area 1, increasing the probability of successful relocation.

[0417] In other embodiments, after executing step S1111 to determine that the dispersed squeezing has failed, 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 accordance with 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 dispersed squeezing of a single screen fails, the conflicting elements can be found in turn based on the screen occupancy information of multiple display screens, thereby increasing the probability of successful squeezing.

[0418] In other embodiments, the conflicting elements displayed at position 1 in the embodiments shown in Figures 8 to 11 above may also be squeezed downward (or to the left or right, etc.) in display area 1. If one or more conflicting elements are displayed in a first layout at position 1 in display area 1, and one or more interface elements (also called squeeze elements) are displayed in a second layout at position 3 in display area 1, if display area 2 has position 5 that can accommodate the one or more squeeze elements displayed in the second layout, then in response to a user operation 1 of moving an interface element from an initial position in display area 2 to position 1 in display area 1, the one or more conflicting elements are displayed in the first layout at position 4 below (or to the left or right, etc.) position 1, interface element 1 is displayed at position 1, and the one or more squeeze elements are displayed in the second layout at position 5. Position 5 may be the initial position or another position in display area 2. If display area 2 has a set of positions that can accommodate the one or more squeeze elements, then in response to a user operation 1 of moving an interface element from an initial position in display area 2 to position 1 in display area 1, the one or more squeeze elements are displayed separately in display area 2. Among them, the size of position 4 is the size of the total area occupied by one or more interface elements displayed in the first layout arrangement in position 1. Position 3 and position 4 can 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, position 3 and position 4 can both be positions below position 1, etc. In the case that the conflicting element is squeezed downward (or squeezed in other directions), the electronic device 100 can 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.

[0419] It should be noted that the embodiments shown in Figures 2A to 11 above are based on the example of the electronic device 100 including a foldable display screen, and the interface element movement method provided in the embodiment of the present application is described. In the embodiment of the present application, the above-mentioned interface element movement 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 movement method provided in any of the above-mentioned embodiments, and the present application does not limit this.

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

[0421] FIG12 shows a schematic diagram of functional modules of an electronic device 100 provided in an embodiment of the present application.

[0422] As shown in FIG12 , 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.

[0423] In view 1, the interaction module 1201 can receive user operations on interface elements displayed in display area 1, such as a long press, drag, or long press-and-drag operation on the interface elements displayed in display area 1. The interaction module 1201 can also detect the movement trajectory of the user's operation on display area 1. In response to a user operation to move an interface element in display area 1 to another display screen (e.g., display area 2), the interaction module 1201 can send instruction 1 to the placeholder information module 1202, instructing the placeholder information module 1202 to send the placeholder information of display area 1 to the positioning module in the view corresponding to the other display screen (e.g., positioning module 1208 in view 2). The interaction module 1201 can also receive 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 location, in response to a user operation to move an interface element in another display screen to a target location (e.g., location 1) in display area 1.

[0424] The placeholder information module 1202 can store the 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 can receive and respond to instruction 1 sent by the interaction module 1201 to send the screen placeholder information of the display area 1 to the positioning module corresponding to another display screen. The placeholder information module 1202 can also receive and respond to instruction 2 sent by the interaction module 1201 to determine the conflicting element set and determine the temporary placeholder information of the conflicting element set, and send the temporary placeholder information to the positioning module 1203. The conflicting element set includes one or more conflicting elements. In some embodiments, in response to instruction 2, the placeholder information module 1202 can also send the placeholder information of the display area 1 to the positioning module.

[0425] 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 display area 2 based on the screen occupancy information of display area 2 and the temporary occupancy information of the conflicting element set. The positioning module 1203 can also position each conflicting element in display area 2 based on the screen occupancy information of display area 2 and the size of each conflicting element in the temporary occupancy information. In some embodiments, the positioning module 1203 can also position each conflicting element in display area 1 based on the screen occupancy information of 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.

[0426] 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. The coordinate conversion module 1209 then determines the coordinates of the new position in the coordinate system 2 corresponding to the display area 2 through coordinate conversion.

[0427] 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 trajectory of the conflicting elements, the movement trajectory of the dragged interface element, etc.

[0428] 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.

[0429] It can be understood that the embodiment shown in Figure 12 is only an example. In the embodiment of the present application, the electronic device 100 can also include more views, and each view can also include more, fewer or different modules from the above embodiment. The present application does not limit this.

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

[0431] In the embodiments shown in Figures 13 to 17 below, the electronic device can be the electronic device 100 in the above embodiment that includes a foldable display and is in an unfolded state, or it can be the electronic device 100 in the embodiment shown in Figure 1K that does not include a foldable display and includes a non-foldable display. Moreover, in either case, the display of the electronic device (foldable or non-foldable) can include a first display area and a second display area.

[0432] As shown in FIG13 , a method for moving an interface element may include the following steps:

[0433] 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, the second page includes a first interface element, and the first interface element is located at a first position in the second display area.

[0434] In the embodiments shown in Figures 13 to 17 , the first display area may be display area 1 in the aforementioned embodiment, and the second display area may be display area 2 in the aforementioned embodiment. The first page may be page 1 in the aforementioned embodiment, and the second page may be page 2 in the aforementioned embodiment. The first interface element may be interface element 1 in the embodiment shown in Figures 8 or 11 . The first position may be the initial position in the embodiment shown in Figures 8 or 11 .

[0435] S1302, the electronic device receives a first operation from a user on a first interface element, where the first operation is used to move the first interface element to a second position in the first display area, where one or more interface elements arranged in a first layout are displayed.

[0436] The first operation may be operation 1 in the embodiment shown in FIG. 8 or FIG. 11 . The second position may be position 1 in the embodiment shown in FIG. 8 or FIG. 11 . The one or more interface elements displayed in the first layout may be conflicting elements in the embodiment shown in FIG. 8 or FIG. 11 . In step S1302, the second position displays one or more interface elements arranged in the first layout, which means that the one or more interface elements displayed at the second position are complete elements.

[0437] 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.

[0438] As shown in FIG14 , another method for moving an interface element may include the following steps:

[0439] S1401, a first display area of ​​the electronic device displays a first page of the 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 in the second display area.

[0440] The second interface element may be the interface element 1 in the embodiment shown in FIG. 9 or FIG. 11 , and the third position may be the initial position in the embodiment shown in FIG. 9 or FIG. 11 .

[0441] At step S1402, the electronic device receives a second user operation on a second interface element, where the second operation is used to move the second interface element to a fourth position in the first display area, where 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.

[0442] The second operation may be operation 1 in the embodiment shown in FIG. 9 or FIG. 11 , the fourth position may be position 1 in the embodiment shown in FIG. 9 or FIG. 11 , and one or more interface elements arranged in the second layout may be conflicting elements in the embodiment shown in FIG. 9 or FIG. 11 .

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

[0444] The fifth position may be position 2 in the embodiment shown in FIG. 9 or FIG. 11 .

[0445] As shown in FIG15 , another method for moving an interface element may include the following steps:

[0446] 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 in the second display area.

[0447] The third interface element may be the interface element 1 in the embodiment shown in Figure 10 or Figure 11. The sixth position may be the initial position in the embodiment shown in Figure 10 or Figure 11.

[0448] 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 the seventh position of the first display area, and the seventh position displays a portion of the fourth interface element and the fifth interface element arranged in the third layout.

[0449] The third operation may be operation 1 in the embodiment shown in FIG. 10 or 11 above. The seventh position may be position 1 in the embodiment shown in FIG. 10 or 11 above. The fourth interface element and the fifth interface element may be conflicting elements in the embodiment shown in FIG. 10 or 11 above. It should be noted that in step S1502, the seventh position displays portions of the fourth interface element and the fifth interface element arranged in the third layout, 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 portion 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.

[0450] 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.

[0451] The eighth position and the ninth position may be positions in the position set in the embodiment shown in FIG. 10 or FIG. 11 .

[0452] As shown in FIG16 , another method for moving an interface element may include the following steps:

[0453] S1601, a first display area of ​​the electronic device displays a first page of the 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.

[0454] 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 it moves.

[0455] 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 the eleventh position of the first display area, and the eleventh position displays part of the seventh interface element and the eighth interface element arranged in the fourth layout.

[0456] 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.

[0457] 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.

[0458] 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 intersect.

[0459] As shown in FIG17 , another method for moving an interface element may include the following steps:

[0460] 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 located at the fourteenth position of the second display area.

[0461] 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.

[0462] S1702, the electronic device receives the ninth operation of the user on the 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.

[0463] The ninth operation may be operation 1 in the above embodiment. The fifteenth position may be position 1 in the above embodiment, and the one or more interface elements displayed at the fifteenth position in the fifth layout arrangement may be the conflicting elements in the above embodiment. The sixteenth position may be position 3 in the embodiment shown in Figures 7A to 7D above, and the tenth element displayed at the sixteenth position may be the squeezed element in the embodiment shown in Figures 7A to 7D above. In some embodiments, other elements may also be displayed at the sixteenth position. Displaying one or more interface elements at a position (displaying all of one or more interface elements) means that the one or more interface elements are complete at that 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 that position.

[0464] 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. The sixteenth and seventeenth positions are on the same side of the fifteenth position.

[0465] The seventeenth position may be position 4 in the embodiment shown in Figures 7A to 7D. 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.

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

[0467] 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.

[0468] It should be noted that the interface element movement method shown in Figures 13 to 17 can be executed as a method of moving an interface element respectively, or any multiple methods mentioned above can be combined, and this application does not limit this.

[0469] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0470] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented 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, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may 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 therein. The available medium may 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 drive (SSD)).

[0471] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0472] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for moving an interface element, characterized in that: Applied to an electronic device including a foldable display screen, the foldable display screen including a first display area and a second display area; the method includes: When the electronic device is in the unfolded state, a first page of the desktop is displayed in the first display area, and a second page of the desktop is displayed in the second display area, wherein the second page includes a first interface element, and the first interface element is located at a first position in 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.

2. The method according to claim 1, characterized in that The method further comprises: The second page further includes a second interface element, and the second interface element is located at a third position of 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 one or more interface elements arranged in a second layout; In response to the second operation, the one or more 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.

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 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 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.