Method for interface display and electronic device

By determining the relationship between the free area of ​​the target page and the size of the desktop cards in both portrait and landscape modes on electronic devices, the problem of shape and position changes of interface elements when switching display modes is solved, achieving unified layout and efficient management of interface elements in both modes.

WO2025260795A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/077938
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-19
Filing Date
2025-02-19
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

When switching between landscape and portrait display modes on electronic devices, changes in the shape, size, or position of interface elements lead to low display and management efficiency.

Method used

By determining the relationship between the free area of ​​the target page and the size of the desktop cards in both landscape and portrait modes, the layout and position of interface elements are kept relatively consistent in both modes, thus achieving a unified placement of desktop cards.

Benefits of technology

It improves the efficiency of interface display and management of electronic devices in both landscape and portrait modes, providing users with a consistent user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025077938_26122025_PF_FP_ABST
    Figure CN2025077938_26122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a method for interface display and an electronic device. Upon detecting that a user adds a desktop card to a target page of a desktop application, the electronic device can determine that the target page in both a landscape state and a portrait state is capable of accommodating the desktop card to be added. On this basis, the electronic device can add the desktop card to be added onto the target page. In this way, regardless of whether the target page is in the landscape state or the portrait state, interface elements in the target page can maintain an identical shape and an identical size, and do not move to another page. The electronic device achieves higher efficiency in displaying and managing interface elements (particularly desktop cards, desktop widgets, etc.) on a page of a desktop application. Even upon switching between the landscape state and the portrait state during use of the electronic device, users can obtain relatively consistent usage experience.
Need to check novelty before this filing date? Find Prior Art

Description

Method for interface display and electronic device

[0001] The present application claims priority from the Chinese patent application No. 202410801448.7 filed on June 19, 2024, and entitled "Method for interface display and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of terminal device software, in particular, to a method for interface display and an electronic device. BACKGROUND

[0003] A desktop card, a desktop widget or a desktop widget can directly and efficiently display information of an application on a desktop of an electronic device, and more application information can be displayed through the desktop card by clicking, sliding and other interactive operations. Especially for electronic devices with large display screens such as tablet computers, the application of desktop cards is becoming more and more widespread.

[0004] One possible case is that the shape, size or position of interface elements such as icons and desktop cards on the same page may change before and after the switching between the horizontal screen display state and the vertical screen display state, and the display and management efficiency of the electronic device for the interface elements is low.

[0005] How to improve the display efficiency and management efficiency of the electronic device for the user interface is a problem worth considering. SUMMARY

[0006] The present application provides a method for interface display and an electronic device, in which the interface elements on the page of the desktop application of the electronic device are located in the same page in the horizontal screen display state and the vertical screen display state, and the shape of the desktop card and the layout of the interface elements can remain basically the same, and the display efficiency and management efficiency of the electronic device for the user interface are higher.

[0007] In a first aspect, a method for interface display is provided, applied to an electronic device, comprising: displaying a target page in a first state of a desktop application; obtaining an operation of adding a target desktop card to the target page in the first state; adding the target desktop card to the target page in the first state in the case that the target desktop card can be placed on the target page in the first state and the target page in a second state; wherein one of the first state and the second state is a horizontal screen state, and the other is a vertical screen state.

[0008] In the technical solution, in the process of adding the target desktop card, the electronic device determines whether to add the target desktop card to the target page in combination with the case that the target desktop card is placed on the target page in the horizontal screen state and the case that the target desktop card is placed on the target page in the vertical screen state. The implementation of the scheme is beneficial to enabling the interface elements on the target page to be located on the same page in the horizontal screen state and the vertical screen state, and the shape and relative position of the interface elements remain relatively consistent, which is beneficial to enabling the user to obtain relatively consistent use experience in the two display states.

[0009] In combination with the first aspect, in some implementations of the first aspect, before displaying the target desktop card on the target page in the first state, it is determined that the idle area of the target page in the first state and the idle area of the target page in the second state are both greater than the area required for placing the target desktop card, and the idle area includes an area on the target page on which no interface element is placed, and the interface element includes an icon and / or a desktop card.

[0010] In a possible implementation, the idle area can be a continuous area, or can also be a plurality of non-continuous areas, which can form a continuous area through rearrangement of other interface elements on the page.

[0011] In the technical solution, whether the target desktop card can be placed on the target page is determined by determining the size relationship between the idle area of the target page in the horizontal screen state and the area required for placing the target desktop card, and the size relationship between the idle area of the target page in the vertical screen state and the area required for placing the target desktop card, which is beneficial to the implementation of the scheme.

[0012] In combination with the first aspect, in some implementations of the first aspect, it is determined that the idle area of the target page in the first state and the idle area of the target page in the second state are both greater than the area to be occupied by the target desktop card, including:

[0013] It is determined that the height of the idle area of the target page in the first state is greater than or equal to the height of the target desktop card, and the height of the idle area of the target page in the second state is greater than or equal to the height of the target desktop card.

[0014] It is determined that the width of the idle area of the target page in the first state is greater than or equal to the width of the target desktop card, and the width of the idle area of the target page in the second state is greater than or equal to the width of the target desktop card.

[0015] In a possible implementation, in the case that the height and the width of the desktop card of different types meet condition B, and the height and the width of the target page meet condition A1, it can be determined that the target desktop card can be placed on the target page in the first state and the target page in the second state.

[0016] In a possible implementation, in a case where the height and the width of the different types of desktop cards meet condition B, the height and the width of the target page meet condition A2, and the area of the first type of desktop card among the desktop cards that have been placed on the target page and the target desktop card meets condition C1, it can be determined that the target page in the second state and the target page in the first state can both place the target desktop card.

[0017] In a possible implementation, in a case where the height and the width of the different types of desktop cards meet condition B, the height and the width of the target page meet condition A3, and the area of the first type of desktop card among the desktop cards that have been placed on the target page and the target desktop card meets condition C2, it can be determined that the target page in the second state and the target page in the first state can both place the target desktop card.

[0018] In a possible implementation, in a case where the height and the width of the different types of desktop cards meet condition B, the height and the width of the target page meet condition A4, the area of the first type of desktop card among the desktop cards that have been placed on the target page and the target desktop card meets condition C1, and the reserved area on the target page meets condition D1, it can be determined that the target page in the second state and the target page in the first state can both place the target desktop card.

[0019] In a possible implementation, in a case where the height and the width of the different types of desktop cards meet condition B, the height and the width of the target page meet condition A5, the area of the first type of desktop card among the desktop cards that have been placed on the target page and the target desktop card meets condition C2, and the reserved area on the target page meets condition D2, it can be determined that the target page in the second state and the target page in the first state can both place the target desktop card.

[0020] In the technical solution, the height and the width of the idle area of the target page in the horizontal screen state and the height and the width of the target desktop card, and the height and the width of the idle area of the target page in the vertical screen state and the height and the width of the target desktop card are determined, to determine whether the target desktop card can be placed on the target page, which is beneficial to implementation of the solution.

[0021] With reference to the first aspect, in some implementations of the first aspect, before it is determined that the idle area of the target page in the first state and the idle area of the target page in the second state are both greater than the area to be occupied by placing the target desktop card, the layout information, the height of the target desktop card, and the width of the target desktop card are obtained, and the layout information is used to include a layout of interface elements on the target page in the first state.

[0022] Exemplarily, the layout of the interface elements on the target page can comprise positions of the interface elements on the target page. Exemplarily, the layout of the interface elements on the target page can be used to indicate relative positions between the plurality of interface elements. Exemplarily, the layout of the interface elements on the target page can be used to indicate relative positions between different regions on the target page.

[0023] With reference to the first aspect, in some implementations of the first aspect, the layout information comprises one or more of: a height of the target page in the first state, a width of the target page in the first state, a height of the interface element on the target page in the first state, a width of the interface element on the target page in the first state, a number of the interface elements on the target page in the first state, or a position of the interface element on the target page in the first state.

[0024] With reference to the first aspect, in some implementations of the first aspect, the method further comprises: updating the layout information, the updated layout information comprising a height of the target desktop card, a width of the target desktop card, and a position of the target desktop card on the target page in the first state.

[0025] In the technical solution described above, the electronic device indicates the layout of the interface elements on the target page by using the layout information, and the electronic device can update the layout information when the layout of the interface elements changes. The implementation of the technical solution is advantageous in improving the display efficiency of the interface of the electronic device and improving the management efficiency of the electronic device for the interface elements.

[0026] With reference to the first aspect, in some implementations of the first aspect, the method further comprises: in response to the operation of switching to the second state, obtaining the updated layout information; and displaying the target page in the second state containing the target desktop card, wherein the height of the target desktop card in the target page in the second state is equal to the height of the target desktop card in the target page in the first state, and the width of the target desktop card in the target page in the second state is equal to the width of the target desktop card in the target page in the first state.

[0027] In the technical solution described above, the layout information can be used to determine the layout of the interface elements on the target page in the landscape state, and can also be used to determine the layout of the interface elements on the target page in the portrait state. The implementation of the technical solution is advantageous in maintaining a relatively consistent layout of the interface elements on the target page in the landscape state and the portrait state, and is advantageous in improving the display efficiency and management efficiency of the interface of the electronic device.

[0028] With reference to the first aspect, in some implementations of the first aspect, the method further includes: obtaining the updated layout information; and displaying the target page in the second state containing the target desktop card, the layout of the interface elements on the target page in the first state being the same as the layout of the interface elements on the target page in the second state.

[0029] The layout of the interface elements on the target page in the first state being the same as the layout of the interface elements on the target page in the second state can be understood as: the relative positions of different regions on the target page in the first state and the second state being the same, or the relative positions of the plurality of interface elements in the same region on the target page in the first state and the second state being the same, or the relative positions of all the interface elements on the target page in the first state and the second state being the same.

[0030] With reference to the first aspect, in some implementations of the first aspect, the target page in the first state includes a first region and a second region, and the target page in the second state includes the first region and the second region, the first region and the second region being used to place interface elements, wherein the relative positions of the first region and the second region on the target page in the first state and the target page in the second state are the same.

[0031] With reference to the first aspect, in some implementations of the first aspect, the target page in the first state and the target page in the second state both include a first region, the first region including a first interface element and a second interface element, and the relative positions of the first interface element and the second interface element in the first region on the target page in the first state and the target page in the second state are the same.

[0032] In the above solution, the relative positions of the interface elements on the target page in the horizontal screen state and the vertical screen state are also kept relatively consistent, specifically, the relative positions of different regions on the target page are consistent, and the relative positions of different interface elements in the same region are also consistent, and the implementation of the technical solution is beneficial to improve the display efficiency and management efficiency of the electronic device for the interface.

[0033] In some implementations of the first aspect, the method further includes: obtaining an operation of adding the second desktop card to the target page in the first state; determining that a free area of the target page in the first state is smaller than an area required for placing the second desktop card, and / or a free area of the target page in the second state is smaller than an area required for placing the second desktop card; displaying prompt information, the prompt information being used to prompt that the target page in the first state or the target page in the second state is unable to place the target desktop card; or moving a first interface element in the target page to a page other than the target page of the desktop application; the method further includes: displaying the target desktop card on the target page after the first interface element is removed; or adding the target desktop card to a page other than the target page of the desktop application.

[0034] In the technical solution, in a case where the target page in the landscape state or the portrait state is unable to place the target desktop card, the electronic device can provide other solutions for placing the target desktop card, and implementation of the technical solution is beneficial to improving display efficiency and management efficiency of the interface of the electronic device.

[0035] The detailed explanations and beneficial effect descriptions in the following technical solutions can refer to the related content in the first aspect, and will not be repeated here.

[0036] In the second aspect, an interface display apparatus is provided, including an obtaining module and a processing module, the processing module being used to: display a target page of a desktop application in a first state; the obtaining module being used to: obtain an operation of adding a target desktop card to the target page in the first state; the processing module being further used to: in a case where the target page in a second state and the target page in the first state are both able to place the target desktop card, add the target desktop card to the target page in the first state; one of the first state and the second state is a landscape state, and the other is a portrait state.

[0037] In some implementations of the second aspect, the processing module is further used to: before displaying the target desktop card on the target page in the first state, determine that a free area of the target page in the first state and a free area of the target page in the second state are both greater than an area required for placing the target desktop card, the free area including an area of the target page on which no interface element is placed, the interface element including an icon and / or a desktop card.

[0038] With reference to the second aspect, in some implementations of the second aspect, the processing module is specifically configured to: determine that the height of the idle area of the target page in the first state is greater than or equal to the height of the target desktop card, and the height of the idle area of the target page in the second state is greater than or equal to the height of the target desktop card; and determine that the width of the idle area of the target page in the first state is greater than or equal to the width of the target desktop card, and the width of the idle area of the target page in the second state is greater than or equal to the width of the target desktop card.

[0039] With reference to the second aspect, in some implementations of the second aspect, the obtaining module is further configured to: before determining that the idle area of the target page in the first state and the idle area of the target page in the second state are both greater than the area to be occupied by the target desktop card, obtain layout information, a height of the target desktop card, and a width of the target desktop card, the layout information being used to include a layout of interface elements on the target page in the first state.

[0040] With reference to the second aspect, in some implementations of the second aspect, the layout information includes one or more of the following: a height of the target page in the first state, a width of the target page in the first state, a height of an interface element on the target page in the first state, a width of the interface element on the target page in the first state, a number of interface elements on the target page in the first state, or a position of the interface element on the target page in the first state.

[0041] With reference to the second aspect, in some implementations of the second aspect, the processing module is further configured to: update the layout information, the updated layout information including the height of the target desktop card, the width of the target desktop card, and a position of the target desktop card on the target page in the first state.

[0042] With reference to the second aspect, in some implementations of the second aspect, the obtaining module is further configured to: in response to the operation of switching to the second state, obtain updated layout information; and the processing module is further configured to: display the target page in the second state containing the target desktop card, the height of the target desktop card in the target page in the second state being equal to the height of the target desktop card in the target page in the first state, and the width of the target desktop card in the target page in the second state being equal to the width of the target desktop card in the target page in the first state.

[0043] With reference to the second aspect, in some implementations of the second aspect, the processing module is further configured to: obtain updated layout information; and the target page in the second state containing the target desktop card, a layout of interface elements on the target page in the first state being the same as a layout of interface elements on the target page in the second state.

[0044] With reference to the second aspect, in some implementations of the second aspect, the target page in the first state includes a first region and a second region, and the target page in the second state includes the first region and the second region, and the first region and the second region are both used for placing the interface element, wherein the relative positions of the first region and the second region are the same on the target page in the first state and on the target page in the second state.

[0045] With reference to the second aspect, in some implementations of the second aspect, the target page in the first state and the target page in the second state both include a first region, the first region includes a first interface element and a second interface element, and the relative positions of the first interface element and the second interface element are the same in the first region on the target page in the first state and in the first region on the target page in the second state.

[0046] With reference to the second aspect, in some implementations of the second aspect, the obtaining module is further configured to: obtain an operation of adding a second desktop card to the target page in the first state; and the processing module is further configured to: determine that a free region of the target page in the first state is smaller than a region required for placing the second desktop card, and / or a free region of the target page in the second state is smaller than a region required for placing the second desktop card; display prompt information, the prompt information being used to prompt that the target page in the first state or the target page in the second state is unable to place the target desktop card; or move a first interface element in the target page to another page of the desktop application other than the target page; display the target desktop card on the target page after the first interface element is removed; or add the target desktop card to another page of the desktop application other than the target page.

[0047] In a third aspect, an electronic device is provided, the electronic device including a processor and a memory, the memory being configured to store program instructions, and the processor being configured to: display a target page of a desktop application in a first state; obtain an operation of adding a target desktop card to the target page in the first state; and add the target desktop card to the target page in the first state in a case where the target page in the second state and the target page in the first state are both able to place the target desktop card; wherein one of the first state and the second state is a landscape state, and the other is a portrait state.

[0048] With reference to the third aspect, in some implementations of the third aspect, the processor is further configured to: before displaying the target desktop card on the target page in the first state, determine that a free region of the target page in the first state and a free region of the target page in the second state are both greater than a region required for placing the target desktop card, the free region including a region of the target page on which no interface element is placed, and the interface element including an icon and / or a desktop card.

[0049] With reference to the third aspect, in some implementations of the third aspect, the processor is specifically configured to: determine that the height of the idle area of the target page in the first state is greater than or equal to the height of the target desktop card, and the height of the idle area of the target page in the second state is greater than or equal to the height of the target desktop card; and determine that the width of the idle area of the target page in the first state is greater than or equal to the width of the target desktop card, and the width of the idle area of the target page in the second state is greater than or equal to the width of the target desktop card.

[0050] With reference to the third aspect, in some implementations of the third aspect, the processor is further configured to: before determining that the idle area of the target page in the first state and the idle area of the target page in the second state are both greater than the area to be occupied by the target desktop card, obtain layout information, the height of the target desktop card, and the width of the target desktop card, the layout information being used to include a layout of interface elements on the target page in the first state.

[0051] With reference to the third aspect, in some implementations of the third aspect, the layout information includes one or more of the following: the height of the target page in the first state, the width of the target page in the first state, the height of the interface elements on the target page in the first state, the width of the interface elements on the target page in the first state, the number of the interface elements on the target page in the first state, or the positions of the interface elements on the target page in the first state.

[0052] With reference to the third aspect, in some implementations of the third aspect, the processor is further configured to: update the layout information, the updated layout information including the height of the target desktop card, the width of the target desktop card, and the position of the target desktop card on the target page in the first state.

[0053] With reference to the third aspect, in some implementations of the third aspect, the processor is further configured to: in response to the operation of switching to the second state, obtain the updated layout information; and display the target page in the second state containing the target desktop card, the height of the target desktop card in the target page in the second state being equal to the height of the target desktop card in the target page in the first state, and the width of the target desktop card in the target page in the second state being equal to the width of the target desktop card in the target page in the first state.

[0054] With reference to the third aspect, in some implementations of the third aspect, the processor is further configured to: obtain the updated layout information; and display the target page in the second state containing the target desktop card, the layout of the interface elements on the target page in the first state being the same as the layout of the interface elements on the target page in the second state.

[0055] In some implementations of the third aspect, the target page in the first state and the target page in the second state each include a first region, the first region includes a first interface element and a second interface element, and the relative positions of the first interface element and the second interface element in the first region of the target page in the first state and in the first region of the target page in the second state are the same.

[0056] In some implementations of the third aspect, the target page in the first state and the target page in the second state each include a first region, the first region includes a first interface element and a second interface element, and the relative positions of the first interface element and the second interface element in the first region of the target page in the first state and in the first region of the target page in the second state are the same.

[0057] In some implementations of the third aspect, the processor is further configured to: obtain an operation of adding a second desktop card to the target page in the first state; determine that a free region of the target page in the first state is smaller than a region required for placing the second desktop card, and / or a free region of the target page in the second state is smaller than a region required for placing the second desktop card; display prompt information, the prompt information being used to prompt that the target page in the first state or the target page in the second state is unable to place the target desktop card; or move a first interface element in the target page to a page other than the target page of the desktop application; display the target desktop card on the target page after the first interface element is removed; or add the target desktop card to a page other than the target page of the desktop application.

[0058] A fourth aspect provides a computer program product including computer program code that, when executed on a computer, causes the method of the first aspect and any possible implementation thereof to be performed.

[0059] A fifth aspect provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the method of the first aspect and any possible implementation thereof to be performed.

[0060] A sixth aspect provides a chip including a processor configured to read instructions stored in a memory, and when the processor executes the instructions, the chip implements the method of the first aspect and any possible implementation thereof. BRIEF DESCRIPTION OF DRAWINGS

[0061] FIG. 1 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present application.

[0062] FIG. 2 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application.

[0063] FIGS. 3-7 are schematic diagrams of a graphical user interface according to an embodiment of the present application.

[0064] FIGS. 8-19 are schematic diagrams of a method of placing a desktop card according to an embodiment of the present application.

[0065] FIGS. 20 and 21 are schematic diagrams of a method of arranging interface elements according to an embodiment of the present application.

[0066] FIGS. 22-28 are schematic diagrams of a method of identifying interface elements according to an embodiment of the present application.

[0067] FIGS. 29-33 are schematic diagrams of a process of arranging interface elements according to an embodiment of the present application.

[0068] FIG. 34 is a schematic diagram of a method of displaying an interface according to an embodiment of the present application.

[0069] FIG. 35 is a schematic diagram of an apparatus for displaying an interface according to an embodiment of the present application.

[0070] FIG. 36 is a schematic diagram of another apparatus for displaying an interface according to an embodiment of the present application.

[0071] FIG. 37 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0072] The technical solutions in the present application will be described below with reference to the accompanying drawings.

[0073] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims of the application, the singular forms "a," "an" and "the" are intended to include both the singular and the plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The term "and / or" used in the context of the present application refers to three relationships: A and / or B, A and B, and A or B. For example, A and / or B can mean A alone, A and B together, or B alone, where A and B can be singular or plural.

[0074] Reference within this specification to "one embodiment" or "an embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. The appearance of the phrases "in one embodiment" or "in some embodiments" or "in other embodiments" or "in still other embodiments" or the like in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily referring to the same implementation of the same embodiment. The terms "including," "comprising," "having" and variations thereof are meant to encompass the items listed thereafter, but do not exclude other items from also being present. Unless otherwise indicated, the terms "including", "comprising", "having” and variations thereof are meant to encompass non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0075] The method provided by the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and the like. The embodiments of the present application do not make any limitation on the specific type of electronic device.

[0076] For example, FIG. 1 shows a structural schematic diagram of an electronic device 100. The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0077] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

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

[0079] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0080] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0081] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0082] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0083] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or a combination of multiple interface connection methods in the above embodiments.

[0084] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also providing power to the electronic device through the power management module 141.

[0085] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0086] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.

[0087] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0088] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.

[0089] The wireless communication module 160 can provide a solution for wireless communication, including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc., which are applied on the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.

[0090] The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0091] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), 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, the electronic device 100 can include 1 or N display screens 194, N being a positive integer greater than 1.

[0092] The electronic device 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor, etc.

[0093] The ISP is used to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0094] The camera 193 is used to capture still images or videos. Objects generate optical images through lenses and project them onto photosensitive elements. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, or other format image signal. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0095] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0096] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0097] The NPU is a neural-network (NN) computing processor that learns from the structure of biological neural networks, such as the transmission mode between human brain neurons, to quickly process input information and continuously self-learn. Through the NPU, the electronic device 100 can implement intelligent cognitive applications such as image recognition, face recognition, voice recognition, and text understanding, etc.

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

[0099] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data (such as audio data, a phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.

[0100] The electronic device 100 can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, the application processor, and the like. For example, music playing, recording, and the like.

[0101] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the function modules of the audio module 170 can be disposed in the processor 110.

[0102] The keys 190 include a power-on key, a volume key, and the like. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0103] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the present application take an Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0104] FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application. A layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer. The application layer can include a series of application packages.

[0105] As shown in FIG. 2, the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0106] The application framework layer provides the application layer with application programming interfaces (APIs) and programming frameworks. The application framework layer includes some pre-defined functions.

[0107] As shown in FIG. 2, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0108] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots, etc.

[0109] The content provider is used to store and obtain data, and make the data accessible to the application. The data can include video, image, audio, dialed and received calls, browsing history and bookmarks, phonebook, etc.

[0110] The view system includes visual controls, such as controls that display text, controls that display pictures, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.

[0111] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).

[0112] The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.

[0113] The notification manager enables an application to display notification information in the status bar, which can be used to convey a message of the notification type, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of a background running application, and can also be a notification in the form of a dialog window appearing on the screen. For example, the status bar prompts text information, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.

[0114] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0115] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0116] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0117] The system library can include multiple functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL), etc.

[0118] The surface manager is used to manage the display subsystem, and provides a fusion of 2D and 3D layers for multiple applications.

[0119] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0120] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.

[0121] The 2D graphics engine is a drawing engine for 2D drawing.

[0122] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0123] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Harmony, etc.

[0124] In order to improve the display efficiency of the electronic device for the user interface containing the desktop card, and improve the management efficiency of the electronic device for the desktop card, the embodiment of the present application provides a method for interface display. In the process of adding a desktop card to the desktop, the electronic device can determine whether the desktop card to be added can be successfully added according to whether the desktop card to be added can be placed in the horizontal screen state and the vertical screen state of the current page. The following will be described in detail.

[0125] In some examples, the desktop card, the desktop plug-in or the desktop widget can all realize the similar function of displaying application information, and the three can not be distinguished in the embodiment of the present application. In some scenarios, the desktop plug-in can also be referred to as an application plug-in, a window widget, a desktop widget, etc., and the desktop card can be referred to as a service card, etc. The following examples mainly introduce the embodiment of the present application by taking the desktop card as an example.

[0126] FIG. 3 shows a user interface M10 provided by the embodiment of the present application, which can be regarded as a user interface of a page of a desktop application of the electronic device. The size of the user interface M10 in the horizontal direction is relatively long, and the size in the vertical direction is relatively short. Generally, the state in which the electronic device displays the user interface M10 can be referred to as a horizontal screen display state (hereinafter referred to as a horizontal screen state). Correspondingly, the display state in which the size in the horizontal direction is relatively short and the size in the vertical direction is relatively long can be referred to as a vertical screen display state (hereinafter referred to as a vertical screen state).

[0127] The electronic device can switch between the horizontal screen display state and the vertical screen display state, or in other words, the electronic device can switch from the horizontal screen state to the vertical screen state, or switch from the vertical screen state to the horizontal screen state. In the following examples, both of the two switching operations are referred to as display state switching. Unless otherwise specified, the display state switching in the following examples can refer to switching from the horizontal screen state to the vertical screen state, or switching from the vertical screen state to the horizontal screen state.

[0128] One possible implementation is that the electronic device can perform the display state switching operation by reading the detection data of sensors such as the gyroscope sensor 180B and the acceleration sensor 180E. For example, if the detection data of the acceleration sensor 180E indicates that the component of the gravitational acceleration in the long edge direction of the electronic device is substantially equal to the gravitational acceleration, the electronic device can determine that the vertical screen state needs to be displayed. On this basis, if the detection data of the gyroscope sensor 180B indicates that the electronic device has rotated around the direction perpendicular to the screen, the electronic device can perform the switching from the horizontal screen state to the vertical screen state.

[0129] In a possible implementation, the electronic device can be provided with a switch for triggering display state switching, and in response to a user pressing the switch, the electronic device can perform display state switching.

[0130] Referring to FIG. 3, one or more icons, such as a "recorder" icon and an "application store" icon, can be displayed on the user interface M10. A desktop card, such as a "weather" desktop card C10 and a "clock" desktop card C02, can be displayed on the user interface M10.

[0131] The different icons and desktop cards on the user interface M10 can be arranged in a certain order, and the different desktop cards on the user interface M10 can have different sizes or shapes. In a possible case, the icons displayed on the user interface M10 can be contained in an icon folder, and similar to the desktop cards, the icon folder can also have different sizes or shapes.

[0132] In some examples, the electronic device can store layout information indicating the layout of the interface elements that have been placed on the target page. For example, the layout information can be used to indicate the icons and / or desktop cards displayed on the user interface M10, and the layout information can also be used to indicate the positions of the different icons and / or desktop cards on the user interface M10, and the layout information can also be used to indicate the sizes and shapes of the desktop cards on the user interface M10, and the like.

[0133] For example, the layout of the interface elements on the target page can include the positions of the interface elements on the target page. For example, the layout of the interface elements on the target page can be used to indicate the relative positions between the interface elements. For example, the layout of the interface elements on the target page can be used to indicate the relative positions between different regions on the target page.

[0134] In some examples, the layout information can also include the size information of the user interface M10, that is, the layout information can include the height and width of the user interface M10. Here, the size of the desktop card in the vertical direction of the user interface M10 is taken as the height of the desktop card, and the size of the desktop card in the horizontal direction of the user interface M10 is taken as the width of the desktop card.

[0135] In a possible case, the electronic device can determine the method for displaying the user interface M10 by reading the layout information, and in the case where the icons and / or desktop cards on the user interface M10, the shape or size of the desktop card, and the relative positions of the icons and the desktop cards change, the electronic device can record the changed user interface M10 by rewriting the content of the layout information.

[0136] In a possible implementation, in response to a pinch operation acting on the user interface M10, the electronic device can display a user interface M20 as shown in FIG. 4, which can also be referred to as a desktop editing interface in some scenarios. The user can perform operations such as modification, editing, adjustment, and the like on the content displayed by the desktop application on the user interface M20.

[0137] In some examples, one or more pages contained in the desktop application can be displayed on the user interface M20. For example, a page M21 corresponding to the user interface M10 described above. In response to a left-right sliding operation on the user interface M20, the electronic device can display other pages contained in the desktop application, for example, a page located on the left side of the page M21 or a page located on the right side of the page M21.

[0138] For example, the page M21 can display a "home" button B01. In response to a user operation of clicking the "home" button B01, the electronic device can set the page M21 as the default display interface of the desktop application.

[0139] In some examples, one or more desktop editing function buttons can be displayed on the user interface M20. For example, a "wallpaper" button, a "service card" button B10, a "layout" button, a "switch effect" button, and a "desktop setting" button, and the like.

[0140] For example, in response to a user operation of clicking the "wallpaper" button, the electronic device can display a "wallpaper selection" interface, which can display a plurality of wallpapers for the user to select. In response to a user selection, the electronic device can set the wallpaper selected by the user as the "desktop wallpaper" and / or the "lock screen wallpaper". For example, in response to a user operation of clicking the "desktop setting" button, the electronic device can display a "desktop setting" interface, which can display one or more function option switches that can act on the desktop application, for example, a "lock layout" switch, an "automatic rotation" switch, and the like. In response to a user operation of turning on the "automatic rotation" switch, the electronic device can perform display state switching in response to a user operation of rotating the electronic device.

[0141] For example, in response to a user operation of clicking the "service card" button B10, the electronic device can display a user interface M30 as shown in FIG. 5, which can also be referred to as a "service card" adding interface in some scenarios. The user interface M30 can display one or more desktop cards for the user to select, for example, a "gallery" desktop card, a "clock" desktop card, a "camera" desktop card, or a "weather" desktop card C10, and the like.

[0142] Exemplarily, a plurality of other desktop cards of different types can also be displayed on the user interface M30. For example, a "combination card" desktop card. Exemplarily, a function entry for adding more cards can also be displayed on the user interface M30, for example, the "changeable card" desktop card in FIG. 5 can be regarded as a function entry for obtaining more desktop cards from the network.

[0143] In some examples, in response to the operation of the user clicking the "weather" desktop card C10 on the user interface M30, the electronic device can display a user interface M40 as shown in FIG. 6, which can display a plurality of different types of "weather" desktop cards, for example, "weather" desktop cards of different shapes (circular, rounded rectangular, etc.). For another example, "weather" desktop cards of different sizes. For example, a micro "weather" desktop card, a small "weather" desktop card, a medium "weather" desktop card, and a large "weather" desktop card, etc.

[0144] A possible case is that the user interface M40 can also display the sizes of the different types of "weather" desktop cards. For example, the size of the aforementioned micro "weather" desktop card is 1x2, the size of the small "weather" desktop card is 2x2, the size of the medium "weather" desktop card is 2x4, and the size of the large "weather" desktop card is 4x4. Here, 1x2, 2x2, or 2x4, etc. can be used to represent the size in the vertical direction and the size in the horizontal direction of different types of desktop cards, for example, 1x2 can be regarded as a micro "weather" desktop card consisting of a row of two column square cells, or in the case of adding a micro "weather" desktop card to the desktop (such as the aforementioned user interface M10), the micro "weather" desktop card needs to occupy an area of a row of two cells. In other embodiments, the sizes of different types of "weather" desktop cards can be set according to actual needs, which are not limited here, for example, the micro "weather" desktop card can be 1x2, 1x3, 1x4, etc.; the medium "weather" desktop card can be 2x3, etc., and the large "weather" desktop card can be 3x3, 3x4, etc.

[0145] In some examples, one or more "add card" buttons can also be displayed on the user interface M40, for example, an "add to desktop" button B41, and an "add to minus one screen" button.

[0146] As a possible implementation, in response to the operation of the user selecting one or more "weather" desktop cards on the user interface M40 and then clicking the aforementioned "add to desktop" button B41, the electronic device can add the one or more "weather" desktop cards selected by the user to the page of the desktop application, for example, the aforementioned page M21.

[0147] As a possible implementation, in response to the operation that the user selects one or more "weather" desktop cards on the user interface M40 and drags, the electronic device can display the aforementioned user interface M20 shown in FIG. 4, and the user can select a page on which the selected one or more "weather" desktop cards are to be placed on the user interface M20, such as the aforementioned page M21 or a page adjacent to the page M21.

[0148] In some examples, with reference to FIG. 3, in response to the operation that the user long-presses the "weather" desktop card C10 on the user interface M10, the electronic device can display the user interface M50 shown in FIG. 7, which can display a management control C20 related to the "weather" desktop card, and the management control C20 can include one or more function options related to the "weather" desktop card C10, such as a "remove" function option, an "edit" function option, and a "more service cards" function option O21.

[0149] For example, in response to the operation that the user selects the "remove" function option, the electronic device can remove the "weather" desktop card C10 from the user interface M10. For example, in response to the operation that the user selects the "edit" function option, the electronic device can display a user interface for editing the "weather" desktop card C10, and for example but not limitation, the user can modify the region corresponding to the weather information in the "weather" desktop card C10 in the interface.

[0150] For example, in response to the operation that the user selects the "more service cards" function option O21, the electronic device can display the aforementioned user interface M40 shown in FIG. 6, and the related description of the user interface M40 can refer to the foregoing content, which will not be repeated here.

[0151] As a possible implementation, in response to the operation of the user, the electronic device can also move the desktop card that has been added to the page of the desktop application to other pages other than the current page. For example, in response to the operation that the user long-presses the "weather" desktop card C10 on the user interface M10 and drags, the electronic device can also display the user interface M20 shown in FIG. 4, and the user can drag the selected "weather" desktop card C10 to the page on which the user wants to place it. For example, with reference to FIG. 4, in response to the operation that the user drags the "weather" desktop card C10 to the page on the right side of the page M21 on the page M21, the electronic device can display the "weather" desktop card C10 on the page on the right side of the page M21.

[0152] Whether a desktop card is added to a page of a desktop application or a desktop card on a page of a desktop application is moved from one page to another, the electronic device can determine the result of adding or moving the desktop card in combination with whether the landscape state and the portrait state of the page to which the desktop card is to be added can both place the desktop card to be added.

[0153] For ease of illustration, in the following examples, the desktop card to be added or the desktop card selected by the user is referred to as a target desktop card, and the page of the desktop application to which the desktop card is to be added is referred to as a target page. The following examples illustrate a method by which the electronic device determines whether the landscape state and the portrait state of the target page can both place the target desktop card.

[0154] In the following examples, it is assumed that a page of a desktop application of the electronic device is composed of AxB cells, or in other words, the page of the desktop application can accommodate A rows and B columns of cells. The sizes of the desktop cards include miniature, small, medium, and large. In the following examples, the size of a miniature desktop card T includes 1x2 and 2x1, referred to as miniature desktop card T1 and miniature desktop card T2, respectively; the size of a small desktop card S is 2x2; the size of a medium desktop card M includes 2x4 and 4x2, referred to as medium desktop card M1 and medium desktop card M2, respectively; and the size of a large desktop card Bg is 4x4. Detailed descriptions of these desktop cards of different sizes can be found in the foregoing description of FIG. 5, and will not be repeated here. In the following examples, a method for determining a free position on the desktop according to the size of the card and the state of the desktop is illustrated by way of example, and similar reasoning methods can be used when the card is of other sizes. The present solution is not limited to a specific calculation method. Referring to FIG. 8, it is assumed that the height direction of the page of the desktop application can accommodate at most n large desktop cards Bg, and the remaining height can accommodate a number of cells, and the width direction of the page of the desktop application can accommodate at most m large desktop cards Bg, and the remaining width can accommodate b number of cells. The following relationship can be obtained: A=4xn+a; B=4xm+b.

[0155] Here, a and b can be 0, 1, 2, 3, A, B, n, and m are all integers greater than or equal to 1.

[0156] In the case of a=b=0, A=4xn and B=4xm. When the above-described desktop cards of different types are arranged on the page of the desktop application, during the display state switching process, the desktop cards can maintain the same shape and size, or in other words, the desktop cards will not be squeezed and deformed. In addition, the desktop cards originally located on the same page can still be located on the same page after the display state is switched.

[0157] Exemplarily, referring to FIG. 9, in the case of n = 1, m = 2, two large desktop cards Bg are arranged on a page of the desktop application, and in the landscape state and the portrait state, the two large desktop cards Bg can maintain the shape and size of 4 x 4, and are located on the same page.

[0158] Exemplarily, referring to FIG. 10, in the case of n = 1, m = 2, two small desktop cards S and three medium desktop cards M1 are arranged on a page of the desktop application, and in the landscape state and the portrait state, the two small desktop cards S can maintain the shape and size of 2 x 2, and the three medium desktop cards M1 can maintain the shape and size of 2 x 4, and these desktop cards are located on the same page.

[0159] Exemplarily, referring to FIG. 11, in the case of n = 1, m = 2, two micro desktop cards T1, four micro desktop cards T2, one small desktop card S, one medium desktop card M1 and one medium desktop card M2 are arranged on a page of the desktop application, and in the landscape state and the portrait state, these desktop cards of multiple types can maintain the same shape and size, respectively, and these desktop cards are located on the same page.

[0160] In the case of a = 0, b = 2, or a = 2, b = 0, A = 4 x n, B = 4 x m + 2, or A = 4 x n + 2, B = 4 x m.

[0161] In order to enable the icons and the desktop cards originally located on the same page of the desktop application to still be located on the same page after the display state is switched, and the shape and size of the cards do not change, the electronic device can limit the area of the region on the same page occupied by the aforementioned medium desktop cards and large desktop cards.

[0162] Exemplarily, referring to FIG. 12, in the case of n = 1, m = 2, a = 2, b = 0, two large desktop cards Bg and four small desktop cards S can be accommodated on the same page, and in the landscape state and the portrait state, these desktop cards can maintain the same shape and size, respectively, and are located on the same page.

[0163] Exemplarily, referring to FIG. 13, in the case of n = 1, m = 2, a = 0, b = 2, two large desktop cards Bg and two small desktop cards S can be accommodated on the same page, and in the landscape state and the portrait state, these desktop cards can maintain the same shape and size, respectively, and are located on the same page.

[0164] In one possible case, the one large desktop card Bg in the above example can be replaced by two medium desktop cards M. The above description about the way of placing desktop cards on a page in FIG. 12 and FIG. 13 can also be understood as: one large desktop card Bg and two medium desktop cards M or four medium desktop cards M can be accommodated on the same page. On this basis, the display state of the electronic device is switched, and these desktop cards can maintain the same shape and size respectively and are located on the same page.

[0165] In FIG. 12, two small desktop cards S adjacent to each other in the horizontal screen state cannot be replaced by one medium desktop card M1. Two small desktop cards S adjacent to each other in the vertical screen state cannot be replaced by one medium desktop card M2. Similarly, in FIG. 13, two small desktop cards S adjacent to each other in the vertical screen state cannot be replaced by one medium desktop card M2, and two small desktop cards S adjacent to each other in the horizontal screen state cannot be replaced by one medium desktop card M1. Otherwise, after the display state of the electronic device is switched, the icons and desktop cards originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop cards will change.

[0166] Based on the above description, in the case that the height and width of the page of the desktop application respectively satisfy A = 4 x n, B = 4 x m + 2, or A = 4 x n + 2, B = 4 x m, the total area Ar of the large desktop card Bg and / or the medium desktop card M that can be accommodated in the same page should be no more than 4 x n x 4 x m, that is, Ar ≤ 16 x m x n.

[0167] In the case that a = b = 2, A = 4 x n + 2, B = 4 x m + 2. In order to make the icons and desktop cards originally located on the same page of the desktop application still be located on the same page after the display state is switched, and the shape and size of the cards do not change, the electronic device can limit the area of the region occupied by the aforementioned medium desktop card and large desktop card on the same page.

[0168] Exemplarily, referring to FIG. 14, in the case that n = 1, m = 2, two large desktop cards Bg, one medium desktop card M1 and one medium desktop card M2 can be accommodated on the same page, and these desktop cards can maintain the same shape and size respectively and are located on the same page before and after the display state is switched.

[0169] In one possible case, the large desktop card Bg in the above example can be replaced by two medium desktop cards M1 or two medium cards M2. The above description about the placement of desktop cards on the page in FIG. 14 can also be understood as: five medium desktop cards M1 and one medium desktop card M2 can be accommodated on the same page, or five medium desktop cards M2 and one medium desktop card M1 can be accommodated on the same page, or three medium desktop cards M1 and three medium desktop cards M2 can be accommodated on the same page. On this basis, before and after the display state of the electronic device is switched, these desktop cards can all maintain the same shape and size and be located on the same page.

[0170] In FIG. 14, the idle area cannot accommodate a medium desktop card M1 or a medium desktop card M2. Otherwise, after the display state of the electronic device is switched, the icons and desktop cards originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop cards will change.

[0171] Based on the above description, in the case where the height and width of the page of the desktop application respectively satisfy A = 4 x n + 2 and B = 4 x m + 2, the total area Ar of the large desktop card Bg and / or the medium desktop card M that can be accommodated in the same page should be no more than 4 x n x 4 x m + 2 x 4 x 2 x min{m, n}, or Ar ≤ 16 x m x n + 16 x min{m, n}.

[0172] Here, the area corresponding to 16 x min{m, n} in the total area Ar should at least include one medium card M1 and one medium card M2, or in other words, the area corresponding to 16 x min{m, n} should not only include one type of medium card M.

[0173] It should be noted that the idle area in FIG. 14 can accommodate one or more micro desktop cards T and one or more small desktop cards S, and on this basis, the way of placing desktop cards in the idle area can be various, which is not limited in the present application.

[0174] In the case of (a, b) = (0, 1) or (1, 0) or (0, 3) or (3, 0) or (2, 1) or (1, 2), (A, B) = (4 x n, 4 x m + 1) or (4 x n + 1, 4 x m) or (4 x n, 4 x m + 3) or (4 x n + 3, 4 x m) or (4 x n + 2, 4 x m + 1) or (4 x n + 1, 4 x m + 2).

[0175] In order to enable the icons and the desktop cards originally located on the same page of the desktop application to still be located on the same page after the display state is switched, and the shape and size of the cards not to change, the electronic device can reserve a certain size of free area on the page on which the desktop cards are placed, for switching between the horizontal screen state and the vertical screen state of the page.

[0176] Exemplarily, with reference to FIG. 15, in the case of n = 1 and m = 2, 2 large desktop cards Bg and 4 small desktop cards S can be accommodated on the same page, and the desktop cards can all maintain the same shape and size and be located on the same page in the horizontal screen state and the vertical screen state.

[0177] A possible case is that 1 large desktop card Bg in the above example can be replaced by 2 medium desktop cards M, and the manner of placing the desktop cards on the page in FIG. 15 can also be understood as that 1 large desktop card Bg and 2 medium desktop cards M or 4 medium desktop cards M can be accommodated on the same page. On this basis, the desktop cards can all maintain the same shape and size and be located on the same page before and after the display state of the electronic device is switched.

[0178] In FIG. 15, the reserved area on the page of the desktop application in the horizontal screen state cannot accommodate the micro desktop card T1. Similarly, the reserved area on the page of the desktop application in the vertical screen state cannot accommodate the micro desktop card T2. Otherwise, the icons and the desktop cards originally located on the same page of the desktop application will no longer be located on the same page after the display state of the electronic device is switched, or the shape and size of the desktop cards will change.

[0179] Exemplarily, in the case of a being 1 or 3, A is an odd number, and the reserved area can consist of one row (B cells).

[0180] Exemplarily, in the case of b being 1 or 3, B is an odd number, and the reserved area can consist of one column (A cells).

[0181] It should be noted that the reserved area can accommodate one or more icons.

[0182] In addition, in FIG. 15, the two small desktop cards S adjacent to each other on the left in the horizontal screen state cannot be replaced by 1 medium desktop card M1. The two small desktop cards S adjacent to each other on the top in the vertical screen state cannot be replaced by 1 medium desktop card M2. Otherwise, the icons and the desktop cards originally located on the same page of the desktop application will no longer be located on the same page after the display state of the electronic device is switched, or the shape and size of the desktop cards will change.

[0183] Based on the above description, in the case that the height and width of the page of the desktop application respectively satisfy the aforementioned conditions, the total area Ar of the large desktop card and / or the medium desktop card that can be accommodated in the same page should not be greater than 4×n×4×m, that is, Ar≤16×m×n, and a row or a column of reserved areas needs to be set in the page of the desktop application.

[0184] It should be noted that in the horizontal screen state, the page of the desktop application needs to set a row of reserved areas, and in the vertical screen state, the page of the desktop application needs to set a column of reserved areas.

[0185] In the case that a=2, b=3, or a=3, b=2, A=4×n+2, B=4×m+3, or A=4×n+3, B=4×m+2.

[0186] In order to make the icons and desktop cards originally located on the same page of the desktop application still be located on the same page after the display state is switched, and the shape and size of the cards do not change, the electronic device can limit the area of the region occupied by the aforementioned medium card and large card on the same page, and the electronic device can set a reserved area of a certain size on the page where the desktop card is placed, which is used for switching between the horizontal screen state and the vertical screen state of the page.

[0187] Exemplarily, referring to FIG. 16, in the case that n=1, m=2, 2 large desktop cards Bg, 1 medium desktop card M1 and 1 medium desktop card M2 can be accommodated on the same page, and in the horizontal screen state and the vertical screen state, these desktop cards can respectively maintain the same shape and size, and are all located on the same page.

[0188] A possible case is that 1 large desktop card Bg in the above example can be replaced by 2 medium desktop cards M, and the way of placing the desktop cards on the page in FIG. 16 can also be understood as that 1 large desktop card Bg and 4 medium desktop cards M or 6 medium desktop cards M can be accommodated on the same page. On this basis, before and after the display state of the electronic device is switched, these desktop cards can respectively maintain the same shape and size, and are all located on the same page.

[0189] In FIG. 16, the reserved area of the target page in the horizontal screen state cannot accommodate the micro desktop card T1, and the reserved area of the target page in the vertical screen state cannot accommodate the micro desktop card T2. Otherwise, after the display state of the electronic device is switched, the icons and desktop cards originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop cards will change.

[0190] Exemplarily, in the case that a is 3, A is an odd number, and the reserved area can be composed of a row (B cells).

[0191] Exemplarily, in the case of b being 3, B being an odd number, the reserved area can be composed of one column (A cells).

[0192] Based on the above description, in the case that the height and width of the page of the desktop application respectively satisfy A=4×n+2,B=4×m+3, or A=4×n+3,B=4×m+2, the total area Ar of the large desktop card and / or the medium desktop card that can be accommodated in the same page should be no more than 4×n×4×m+2×4×2×min{m,n}, that is, Ar≤16×m×n+16×min{m,n}, and a row or a column of reserved areas needs to be set in the page of the desktop application.

[0193] It should be noted that the page of the desktop application needs to have a row of reserved areas in the horizontal screen state, and the page of the desktop application needs to have a column of reserved areas in the vertical screen state. The aforementioned row of reserved areas can mean that the idle cells on the page of the desktop application are located in the same row, or the idle cells can be located in the same row after adjusting the icons and / or desktop cards that have been placed on the page. Similarly, the column of reserved areas can mean that the idle cells on the page of the desktop application are located in the same column, or the idle cells can be located in the same column after adjusting the icons and / or desktop cards that have been placed on the page.

[0194] In addition, the 16×min{m,n} area in the total area Ar should at least include one medium card M1 and one medium card M2.

[0195] It should be noted that the reserved area in FIG. 16 can place one or more icons.

[0196] It should also be noted that the idle area in FIG. 16 can place one or more miniature desktop cards T and one or more small desktop cards S, and on this basis, the way of placing desktop cards in the idle area can be diverse, which is not limited by the present application.

[0197] In the case of (a, b) = (1, 1) or (1, 3) or (3, 1), A = 4×n+1, B = 4×m+1, or A = 4×n+1, B = 4×m+3, or A = 4×n+3, B = 4×m+1.

[0198] In order to make the icons and desktop cards on the same page of the desktop application in the horizontal screen state and the vertical screen state maintain the same layout, the electronic device can limit the area of the region occupied by the aforementioned medium card and large card on the same page, and the electronic device can set a certain size of the reserved area on the page where the desktop card is placed, for switching between the horizontal screen state and the vertical screen state of the page.

[0199] Exemplarily, referring to FIG. 17, in the case of n = 1, m = 2, a = b = 1, the same page can accommodate 2 large desktop cards Bg, 2 micro desktop cards T1 and 2 micro desktop cards T2, which can maintain the same shape and size respectively and are located on the same page in the landscape state and the portrait state.

[0200] Exemplarily, referring to FIG. 18, in the case of n = 1, m = 2, a = 3, b = 1, the same page can accommodate 2 large desktop cards Bg, 4 small desktop cards S, 3 micro desktop cards T1 and 3 micro desktop cards T2, which can maintain the same shape and size respectively and are located on the same page in the landscape state and the portrait state.

[0201] One possible case is that 1 large desktop card Bg in the above examples can be replaced by 2 medium desktop cards M, and the way of placing the desktop cards on the page in FIG. 17 and FIG. 18 can also be understood as: the same page can accommodate 1 large desktop card Bg and 2 medium desktop cards M or 4 medium desktop cards M. On this basis, the desktop cards can maintain the same shape and size respectively and are located on the same page before and after the display state of the electronic device is switched.

[0202] In FIG. 17 and FIG. 18, the micro desktop card T1 cannot be placed in the reserved area in the landscape state, and the micro desktop card T2 cannot be placed in the reserved area in the portrait state. In other words, the area of the reserved area on the target page needs to meet the requirement for switching between the landscape state and the portrait state. Otherwise, after the display state of the electronic device is switched, the icons and the desktop cards originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop cards will change.

[0203] Exemplarily, in FIG. 17, A = 5, B = 9, the reserved area is 5 cells in the horizontal or vertical direction, and the number of free cells is |A-B|+1.

[0204] Exemplarily, in FIG. 18, A = 7, B = 9, the reserved area is 3 cells in the horizontal or vertical direction, and the number of free cells is |A-B|+1.

[0205] It should be noted that the aforementioned reserved area in the landscape state can refer to the free cells originally located in the same row on the page of the desktop application, or the free cells that can be located in the same row after adjusting the icons and / or desktop cards already placed on the page. Similarly, the aforementioned reserved area in the portrait state can refer to the free cells originally located in the same column on the page of the desktop application, or the free cells that can be located in the same column after adjusting the icons and / or desktop cards already placed on the page.

[0206] In addition, in FIG. 18, two small desktop cards S adjacent to each other in the horizontal direction cannot be replaced by one medium desktop card M1 in the horizontal screen state. Two small desktop cards S adjacent to each other in the vertical direction cannot be replaced by one medium desktop card M2 in the vertical screen state. Otherwise, after the display state of the electronic device is switched, the icons and the desktop cards originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop cards will change.

[0207] Based on the above description, in the case where the height and the width of the page of the desktop application respectively satisfy the above conditions, the total area Ar of the large desktop card Bg and / or the medium desktop card M that can be accommodated in the same page should be no more than 4 x n x 4 x m, that is, Ar≤16 x m x n, and a reserved area of |A-B|+1 unit cells in the vertical direction or the horizontal direction needs to be set in the page of the desktop application.

[0208] In addition, in the 16 x min{m, n} area of the total area Ar, at least one medium card M1 and one medium card M2 should be included. It should be noted that the reserved area in FIG. 17 and FIG. 18 can place one or more icons.

[0209] In the case where a=b=3, A=4 x n+3, and B=4 x m+3.

[0210] In order to enable the icons and the desktop cards on the same page of the desktop application in the horizontal screen state and the vertical screen state to maintain the same layout, the electronic device can limit the area of the region occupied by the aforementioned medium card and the large card on the same page, and the electronic device can set a reserved area of a certain size on the page where the desktop cards are placed, for switching between the horizontal screen state and the vertical screen state of the page.

[0211] Exemplarily, referring to FIG. 19, in the case where n=1, m=2, a=b=3, the same page can accommodate 2 large desktop cards Bg, 1 medium card M1, 1 medium card M2, 3 small cards T1, and 3 small cards T2, and in the horizontal screen state and the vertical screen state, these desktop cards can respectively maintain the same shape and size and are all located on the same page.

[0212] One possible case is that 1 large desktop card Bg in the above example can be replaced by 2 medium desktop cards M, and the way of placing the desktop cards on the page in FIG. 19 can also be understood as: 1 large desktop card Bg and 4 medium desktop cards M or 6 medium desktop cards M can be accommodated on the same page. On this basis, before and after the display state of the electronic device is switched, these desktop cards can respectively maintain the same shape and size and are all located on the same page.

[0213] In FIG. 19, the reserved area cannot accommodate the micro card T1 in the horizontal state, and cannot accommodate the micro card T2 in the vertical state. In other words, the area of the reserved area on the page of the desktop application needs to meet the requirements for switching between the horizontal state and the vertical state. Otherwise, after the display state of the electronic device is switched, the icons and the desktop card originally located on the same page of the desktop application will no longer be located on the same page, or the shape and size of the desktop card will change.

[0214] For example, in FIG. 19, A = 7, B = 11, the reserved area is 5 cells in the horizontal or vertical direction, and the number of reserved cells is |A-B|+1.

[0215] Based on the above description, in the case that the height and width of the page of the desktop application meet the above conditions, the total area Ar of the large desktop card Bg and / or the medium desktop card M that can be accommodated in the same page should be no more than 4×n×4×m+2×4×2×min{m,n}, that is, Ar≤16×m×n+16×min{m,n}, and |A-B|+1 cells of the reserved area in the horizontal or vertical direction need to be set on the page of the desktop application.

[0216] It should be noted that the aforementioned reserved area in the horizontal state can refer to the idle cells originally located in the same row on the page of the desktop application, or the idle cells that can be located in the same row after adjusting the icons and / or desktop cards already placed on the page. Similarly, the aforementioned reserved area in the vertical state can refer to the idle cells originally located in the same column on the page of the desktop application, or the idle cells that can be located in the same column after adjusting the icons and / or desktop cards already placed on the page.

[0217] In addition, the 16×min{m,n} area in the total area Ar should at least include one medium card M1 and one medium card M2.

[0218] It should be noted that the reserved area in FIG. 19 can accommodate one or more icons.

[0219] It should also be noted that the idle area in FIG. 19 can accommodate one or more micro desktop cards T and one or more small desktop cards S, and on this basis, the way of placing desktop cards in the idle area can be various, which is not limited in the present application.

[0220] In the examples of FIGS. 9-19, the types of desktop cards include a large desktop card Bg with a size of 4x4, a medium desktop card M1 with a size of 2x4, a medium desktop card M2 with a size of 4x2, a small desktop card S with a size of 2x2, a tiny desktop card T1 with a size of 1x2, and a medium desktop card T2 with a size of 2x1. In some examples, fewer or more types of desktop cards can be placed on a page of the desktop application, or other sizes (e.g., 3x2, 2x3, 1x5, etc.) of desktop cards can be placed on a page of the desktop application, which is not limited in the present application. It should be noted that in the case of different shapes and sizes of desktop cards, the above examples of the related description of the area of the desktop card and the reserved area can be adaptively adjusted.

[0221] For example, a page of the desktop application can be placed with a large desktop card Bg with a size of 4x4, a medium desktop card M1 with a size of 2x4, a small desktop card S with a size of 2x2, a tiny desktop card T1 with a size of 1x2, and a medium desktop card T2 with a size of 2x1. In this case, referring to the related description in FIGS. 14, 16, and 19, the total area Ar of the large desktop card Bg and / or the medium desktop card M1 should be no greater than 16x m x n + 8x min{m, n}.

[0222] One possible case is that in the examples of FIGS. 9-19, one large desktop card can be replaced by two medium desktop cards, one medium desktop card M can be replaced by two small desktop cards S, and one small desktop card S can be replaced by two tiny desktop cards T. On this basis, the above examples can also be transformed into more different desktop card setting modes, which will not be described here for brevity.

[0223] In the above examples, the analysis of different cases of different heights and widths of the target page can also be understood as the process of determining, by the electronic device, the number and type of cards that can be placed in the height direction of the target page in the horizontal screen state, the number and type of cards that can be placed in the height direction of the target page in the vertical screen state, the number and type of cards that can be placed in the width direction of the target page in the horizontal screen state, and the number and type of cards that can be placed in the width direction of the target page in the vertical screen state.

[0224] Based on the above examples, in some examples, in the scenario of adding a desktop card (target desktop card) to a page (target page) of a desktop application, the electronic device can determine whether the target desktop card can be placed on the target page in the horizontal screen state and the vertical screen state based on one or more of the size information of the target page, the information of the icons and desktop cards already placed on the target page, and the information of the target desktop card.

[0225] In some scenarios, the size information of the target page, the information of the icons and the desktop cards that have been placed on the target page can all be part of the aforementioned layout information, in other words, the layout information in the foregoing can include one or more of the following: the size information of the target page, the information of the icons on the target page, the types of the desktop cards on the target page, the placement positions of the icons and the desktop cards on the target page, or the identities of the icons and the desktop cards on the target page.

[0226] Exemplarily, the layout information can include one or more of the following: the height of the target page, the width of the target page, the height of the interface elements that have been placed on the target page, the width of the interface elements that have been placed on the target page, the number of the interface elements that have been placed on the target page, or the positions of the interface elements that have been placed on the target page.

[0227] In some scenarios, the icons and the desktop cards on the target page can all be referred to as interface elements of the target page. It can be understood that the desktop plug-ins and the desktop widgets that have similar functions to the desktop cards can also be referred to as a kind of interface elements.

[0228] Exemplarily, the information of the target desktop card can include the type of the target desktop card and / or the size of the target desktop card.

[0229] Exemplarily, in the examples in FIGS. 9-11, in response to the operation of the user adding the target desktop card to the target page, the electronic device can obtain the size information of the target page and the information of the target desktop card. In a case where it is determined that the height size and the width size of the target page respectively satisfy A=4xn, B=4xm, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card to the target page and display the user interface of the target page containing the target desktop card.

[0230] Exemplarily, in the examples shown in FIGS. 12 and 13, in response to the operation of the user adding the target desktop card to the target page, the electronic device can obtain the size information of the target page, the number of the large desktop cards and the medium desktop cards that have been placed in the target page, and the information of the target desktop card. In a case where it is determined that the height size and the width size of the target page respectively satisfy A=4xn, B=4xm+2, or A=4xn+2, B=4xm, and the total area Ar occupied by the large desktop cards and the medium desktop cards containing the target desktop card satisfies Ar≤16xm×n, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card to the target page and display the user interface of the target page containing the target desktop card.

[0231] Exemplarily, in the example shown in FIG. 14, in response to the operation of the user adding the target desktop card to the target page, the electronic device can acquire the size information of the target page, the number of large desktop cards and medium desktop cards that have been placed in the target page, and the information of the target desktop card, and in a case where it is determined that the height size and the width size of the target page respectively satisfy: A = 4 x n + 2, B = 4 x m + 2, and the total area Ar occupied by the large desktop cards and the medium desktop cards including the target desktop card satisfies: Ar ≤ 16 x m x n + 16 x min{m, n}, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card to the target page and display the user interface of the target page including the target desktop card.

[0232] Exemplarily, in the example shown in FIG. 15, in response to the operation of the user adding the target desktop card to the target page, the electronic device can acquire the size information of the target page, the case of the desktop cards and icons that have been placed on the target page (including the number of large desktop cards and medium desktop cards that have been placed in the target page), and the information of the target desktop card, and in a case where it is determined that the height size and the width size of the target page respectively satisfy the conditions shown in FIG. 15, and the total area Ar occupied by the large desktop cards and the medium desktop cards including the target desktop card satisfies: Ar ≤ 16 x m x n, and there is a reserved area of one row or one column in the target page, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card to the target page and display the user interface of the target page including the target desktop card.

[0233] Exemplarily, in the example shown in FIG. 16, in response to the operation of the user adding the target desktop card to the target page, the electronic device can acquire the size information of the target page, the case of the desktop cards and icons that have been placed on the target page (including the number of large desktop cards and medium desktop cards that have been placed in the target page), and the information of the target desktop card, and in a case where it is determined that the height size and the width size of the target page respectively satisfy: A = 4 x n + 2, B = 4 x m + 3, or A = 4 x n + 3, B = 4 x m + 2, and the total area Ar occupied by the large desktop cards and the medium desktop cards including the target desktop card satisfies: Ar ≤ 16 x m x n + 16 x min{m, n}, and there is a reserved area of one row or one column in the target page, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card to the target page and display the user interface of the target page including the target desktop card.

[0234] Exemplarily, in the example shown in FIG. 17 or FIG. 18, in response to the operation of the user adding the target desktop card to the target page, the electronic device can acquire the size information of the target page, the situation of the desktop cards and icons that have been placed on the target page, and the information of the target desktop card, and in a case where it is determined that the height size and the width size of the target page respectively satisfy: A = 4 x n + 1, B = 4 x m + 1, or, in A = 4 x n + 1, B = 4 x m + 3, or, in A = 4 x n + 3, B = 4 x m + 1, and the total area Ar occupied by the large desktop card and the medium desktop card including the target desktop card satisfies: Ar ≤ 16 x m x n, and the target page includes the reserved area of |A-B|+1 unit cell size in the horizontal or vertical direction, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card in the target page, and display the user interface of the target page including the target desktop card.

[0235] Exemplarily, in the example shown in FIG. 19, in response to the operation of the user adding the target desktop card to the target page, the electronic device can acquire the size information of the target page, the situation of the desktop cards and icons that have been placed on the target page, and the information of the target desktop card, and in a case where it is determined that the height size and the width size of the target page respectively satisfy: A = 4 x n + 3, B = 4 x m + 3, and the total area Ar occupied by the large desktop card and the medium desktop card including the target desktop card satisfies: Ar ≤ 16 x m x n + 16 x min{m, n}, and the target page includes the reserved area of |A-B|+1 unit cell size in the horizontal or vertical direction, and there is a large enough free area in the target page to place the target desktop card, the electronic device can add the target desktop card in the target page, and display the user interface of the target page including the target desktop card.

[0236] It should be noted that in the examples of FIG. 9 to FIG. 11, when determining the total area Ar, if the target desktop card also belongs to the large desktop card or the medium desktop card, the area to be occupied by the target desktop card also needs to be calculated.

[0237] It should also be noted that in the above examples, the free area can be a continuous area, or it can also be multiple non-continuous areas, which can form a continuous area by rearranging other interface elements on the target page.

[0238] In a case where any of the above conditions is not satisfied, the electronic device can display a prompt information, which can be used to prompt that the target desktop card cannot be placed on the target page.

[0239] Exemplarily, the prompt information can be used to prompt that the free area of the target page is insufficient to place the target desktop card.

[0240] Exemplarily, the prompt information can be used to prompt the user to place the target desktop card on another page that can meet any of the above requirements.

[0241] Exemplarily, the prompt information can also be used to prompt the user to reselect a desktop card that meets the above requirements. For example, in the case that the target desktop card currently selected by the user is a large desktop card, the prompt information can be used to prompt the user to select a small desktop card of the same application.

[0242] In some examples, in response to the addition of the target desktop card in the target page, the electronic device can update the layout information of the desktop application, which can include the identification, shape, size, placement page, and placement position of the newly added target desktop card, and the like.

[0243] In the horizontal screen state and the vertical screen state, the shapes, sizes, and positional relationships of the icons and desktop cards on the page of the desktop application are basically consistent, in other words, the above layout information can be used to determine the shapes, sizes, and positional relationships of the icons and desktop cards on the page of the desktop application in the horizontal screen state, and can also be used to determine the shapes, sizes, and positional relationships of the icons and desktop cards on the page of the desktop application in the vertical screen state.

[0244] A possible case is that the above layout information can be stored in the storage space (for example, the internal memory 121 of the electronic device 100) of the electronic device, and in the case that the page of the desktop application needs to be displayed, the electronic device can read the layout information from the storage space to the memory of the electronic device, and display the page of the desktop application according to the layout information.

[0245] Exemplarily, the electronic device can be provided with a default layout when it is shipped, and the layout information used to determine the default layout can be stored in the disk of the electronic device, and the electronic device can load the layout information into the memory during the first start, so as to display the default layout.

[0246] Since the shapes, sizes, and positions of the interface elements on the page of the desktop application in the horizontal screen state and the vertical screen state can be determined according to the layout information, in other words, the electronic device can determine the layout of the interface elements on the page of the desktop application in the horizontal screen state and the layout of the interface elements on the page of the desktop application in the vertical screen state according to the layout information.

[0247] Exemplarily, the default layout of the foregoing electronic device can be the layout of the interface elements on the page of the desktop application in the horizontal screen state. During the first start-up process, the electronic device can determine the layout of the interface elements on the page of the desktop application in the vertical screen state according to the layout of the interface elements on the page of the desktop application in the horizontal screen state, and cache the layout information for indicating the layout of the interface elements on the page of the desktop application in the vertical screen state into the memory of the electronic device. When the electronic device is restarted after being shut down, the layout of the interface elements on the page of the desktop application in the vertical screen state does not need to be determined according to the layout information saved on the storage space, which is beneficial to improving the efficiency of interface display of the electronic device to some extent.

[0248] A possible case is that the electronic device can update the layout information saved on the storage space in the case that the layout of the interface elements on the page of the desktop application in the horizontal screen state of the electronic device changes. The updated layout information can be used to determine the layout of the interface elements on the page of the desktop application in the vertical screen state, so that the synchronous update of the layout of the interface elements on the page of the desktop application in the horizontal screen state and the vertical screen state can be realized.

[0249] For the mapping of the layouts in the horizontal screen state and the vertical screen state of the scenario in which the user drags the interface element on one page to another page, a possible implementation manner is that, in response to the operation that the user selects the interface element a on the page A in the horizontal screen state and drags, the electronic device can update the layout of the interface elements other than the interface element a on the page A in the vertical screen state according to the layout of the interface elements other than the interface element a on the page A. In other words, the electronic device can perform the mapping of the layout in the horizontal screen state and the layout in the vertical screen state on the remaining interface elements on the page A after the interface element a is removed. In a possible implementation manner, in response to the operation that the user moves the interface element a on the page A in the horizontal screen state to the page B, the electronic device can update the layout of all the interface elements on the page B in the vertical screen state according to the layout of all the interface elements on the page B including the interface element a. In other words, the electronic device can perform the mapping of the layout in the horizontal screen state and the layout in the vertical screen state on all the interface elements on the page B after the interface element a is added.

[0250] In order to better display the desktop cards, so that the relative positions of the desktop cards located on the same page remain consistent in the horizontal screen state and the vertical screen state, and improve the management efficiency of the electronic device on the desktop cards in the horizontal screen state and the vertical screen state, the page of the desktop application can be divided into multiple regions, and interface elements (for example, icons and desktop cards) can be displayed in each region. The positions of different regions and the positions of different interface elements in the same region are managed respectively.

[0251] In some examples, the relative positions of different areas on the page of the desktop application can be the same in the landscape state and the portrait state.

[0252] In some examples, the relative positions of the desktop cards within each area in the page of the desktop application can be the same in the landscape state and the portrait state.

[0253] For example, referring to FIGS. 20 and 21, the page of the desktop application contains interface elements numbered 1 to 16, the arrangement of the interface elements in the landscape state is shown in FIG. 20, and the arrangement of the interface elements in the portrait state corresponding to FIG. 20 is shown in FIG. 21.

[0254] In FIG. 20, the page of the desktop application in the landscape state includes a front area FE and a back area BE, and both the front area FE and the back area BE contain a plurality of interface elements. The front area FE is located at the top left of the page, and the back area BE is located at the bottom right of the page. The front area FE contains interface elements numbered 1 to 10, and the back area BE contains interface elements numbered 14 to 16. In some scenarios, the front area FE can be considered to be located before the back area BE, and the back area BE can be considered to be located after the front area FE.

[0255] In FIG. 21, the front area FE is located at the top of the page, and the back area BE is located at the bottom of the page in the page of the desktop application in the portrait state. In some scenarios, the front area FE can be considered to be located before the back area BE, and the back area BE can be considered to be located after the front area FE. In other words, the positional relationship between the front area FE and the back area BE is the same in the landscape state and the portrait state.

[0256] For example, referring to FIG. 20, in the front area FE in the landscape state, the first desktop card is located above the second icon and the third icon, and the fourth desktop card is located to the right of the first desktop card, the second icon, and the third icon. Referring to FIG. 21, in the front area FE in the portrait state, the first desktop card is located above the second icon and the third icon, and the fourth desktop card is located to the right of the first desktop card, the second icon, and the third icon.

[0257] For example, referring to FIG. 20, in the back area BE in the landscape state, the fourteenth desktop card is located to the left of the fifteenth desktop card and the sixteenth desktop card, and the fifteenth desktop card is located above the sixteenth desktop card. Referring to FIG. 21, in the back area BE in the portrait state, the fourteenth desktop card is located to the left of the fifteenth desktop card and the sixteenth desktop card, and the fifteenth desktop card is located above the sixteenth desktop card.

[0258] In other words, the positional relationship of the interface elements in the local area of the page is the same in the landscape state and the portrait state.

[0259] In order to make the arrangement order of the plurality of interface elements on the page of the same desktop application in the horizontal screen state and the vertical screen state relatively consistent, in some examples, the electronic device can uniquely identify (for example, number) the plurality of interface elements, and the identification can be recorded as an attribute of the desktop card in the aforementioned layout information. During the switching between the horizontal screen state and the vertical screen state, the electronic device can arrange the desktop cards on the page of the desktop application after the switching according to the identification (for example, the number) order of the interface elements in a preset arrangement manner.

[0260] For example, referring to FIGS. 22 and 23, the electronic device can take the point at the lower left corner of the icon and the desktop card on the page as the feature point of the interface element, the positive direction of the x-axis is the direction from left to right in the figure, and the positive direction of the y-axis is the direction from top to bottom in the figure. Taking the sequence number of the row where the feature point is located as the horizontal coordinate and the sequence number of the column where the feature point is located as the vertical coordinate, the feature point is marked. The coordinates of the feature points of all interface elements marked according to this method can obtain the result shown in FIG. 22.

[0261] The interface elements where the feature points are located are numbered using the coordinates of the feature points. The interface element where the feature point (1, 1) is located is numbered as the first interface element. During the numbering process, the interface elements are numbered in sequence along the positive direction of the x-axis and the positive direction of the y-axis. When encountering feature points not located in the same row, the numbering is continued on the next row. The numbering result is shown in FIG. 24.

[0262] For example, referring to FIGS. 25 and 26, the electronic device can take the point at the upper left corner of the icon and the desktop card on the page as the feature point of the interface element, the positive direction of the x-axis is the direction from left to right in the figure, and the positive direction of the y-axis is the direction from top to bottom in the figure. Taking the sequence number of the row where the feature point is located as the horizontal coordinate and the sequence number of the column where the feature point is located as the vertical coordinate, the feature point is marked. The coordinates of the feature points of all interface elements marked according to this method can obtain the result shown in FIG. 25.

[0263] The interface elements where the feature points are located are numbered using the coordinates of the feature points. The interface element where the feature point (1, 1) is located is numbered as the first interface element. During the numbering process, the interface elements are numbered in sequence along the positive direction of the x-axis. After the feature point located at the rightmost side, the vertical coordinate is incremented by 1 (line change), and then the interface elements are numbered in sequence along the positive direction of the x-axis for the new vertical coordinate. This process is repeated until the last coordinate point. The numbering result is shown in FIG. 27.

[0264] For example, referring to FIG. 28, the electronic device can number the plurality of interface elements on the page according to the method of prioritizing numbering along the positive direction of the x-axis and then along the positive direction of the y-axis. The feature point of each interface element can be the point at the upper left corner or the lower left corner of the interface element. The numbering result of the plurality of interface elements on FIG. 28 according to this method is shown in FIG. 28.

[0265] It should be noted that the above are merely examples of several methods for numbering interface elements on a page, and this application does not impose any limitations on them. It is understood that numbering interface elements is only one feasible way to identify them; electronic devices can also uniquely identify interface elements in other ways, such as by giving them unique names, thus identifying them by their names. This application does not impose any limitations on this approach.

[0266] During the display state switching process, the electronic device can determine the layout of icons and desktop cards on the desktop application page in portrait mode based on the layout information in landscape mode, thereby displaying a layout of icons and desktop cards on the desktop application page in portrait mode that is basically the same as the layout in landscape mode; conversely, the electronic device can also determine the layout of icons and desktop cards on the desktop application page in landscape mode based on the layout information in portrait mode, thereby displaying a layout of icons and desktop cards on the desktop application page in landscape mode that is basically the same as the layout in portrait mode.

[0267] In some examples, the layout information may include identifiers of interface elements on the desktop application's page, such as the element number and name as described above. During the switching between landscape and portrait modes, the electronic device can display the new interface elements based on their identifiers and preset arrangement and placement.

[0268] In determining the layout of interface elements in portrait mode, electronic devices can place all interface elements sequentially according to their serial numbers.

[0269] For example, element 1 can be placed in the top-left cell in portrait mode. For desktop card-type elements, it can be placed in the cell with the smaller sum of its horizontal and vertical coordinates, with preference given to cells with smaller vertical coordinate values. When placing subsequent elements, consider whether preceding elements can be moved. If preceding elements can be moved, place the subsequent elements in the cell vacated by the moved preceding elements. If preceding elements cannot be moved, place the subsequent elements in the order described above.

[0270] For example, referring to Figures 24, 29, and 30, Figure 24 shows the layout of interface elements on a desktop application page in landscape mode. Schematic diagrams 29-1 to 29-5 illustrate the process of determining the layout of interface elements in portrait mode based on the layout in landscape mode. In Schematic diagram 29-1, interface elements 1 through 4 are placed sequentially from left to right in the four cells of the first row. When placing interface element 5 (small desktop card S), since interface elements 3 and 4 can be moved forward, interface element 5 can be placed in the position formed by the four cells in the third and fourth columns of the first row and the third and fourth columns of the second row. Similarly, in Schematic diagram 29-3, when placing interface element 8, since interface element 7 can be moved forward, interface element 8 can be placed in the position originally occupied by interface element 7 in the third row and third column.

[0271] For example, element 1 can be placed in the top-left cell in portrait mode. For desktop card-type elements, they can be placed in the cell with the smaller sum of their horizontal and vertical coordinates, with preference given to cells with smaller vertical coordinate values. When placing subsequent elements, it's possible to check if any preceding cells are empty (not occupied by any elements). If so, subsequent elements can be placed in those empty positions. If no preceding cells are empty, subsequent elements can be placed in the aforementioned order.

[0272] For example, referring to Figures 27, 31, and 32, Figure 27 shows the layout of interface elements on the desktop in landscape mode. Schematic diagrams 31-1 to 31-5 illustrate the process of determining the layout of interface elements in portrait mode based on the layout in landscape mode. In schematic diagram 31-2, the cell in the second row and first column is empty, and interface element number 4 can be placed in that position. Similarly, in schematic diagram 31-3, the cell in the fourth row and first column is empty, and interface element number 8 can be placed in that position. In schematic diagram 31-4, the cell in the fifth row and fourth column is empty, and interface element number 13 can be placed in that position.

[0273] When determining the layout of interface elements in portrait mode, electronic devices can prioritize placing interface elements such as desktop cards, desktop widgets, or desktop control panels.

[0274] For example, the electronic device can place large desktop cards Bg, medium desktop cards M, small desktop cards S, and micro desktop cards T in sequence according to their size. The placement order can be from left to right and from top to bottom.

[0275] For example, referring to Figures 28 and 33, Figure 28 shows the layout of interface elements on the desktop in landscape mode, and Figure 33 shows the layout of interface elements on the desktop in portrait mode. When placing multiple interface elements on the desktop in landscape mode, prioritize placing interface element number 10 (large desktop card Bg), followed by interface elements number 14 and 15 (medium desktop cards M), then interface elements number 5, 11, and 13 (small desktop cards S), and then interface elements number 1, 2, 8, 9, 12, and 16 (mini desktop cards T). Finally, place interface elements number 3, 4, 6, and 7. Interface element number 10 is placed in the upper left corner, interface elements number 14 and 15 are placed below it, and interface elements number 5, 11, and 13 are placed in the empty cell to the right of interface element number 10. For interface elements of the same type, they can be placed sequentially according to their element numbers.

[0276] Based on the above examples, as shown in Figure 34, this application embodiment provides a method for interface display. During the process of adding a target desktop card to a target page, the electronic device will only add the target desktop card to the target page if it is determined that the target desktop card can be placed in both landscape and portrait modes. In scenarios where landscape and portrait modes are switched, the interface elements on the target page can maintain a relatively consistent layout before and after the switch.

[0277] S110 displays the target page of the desktop application.

[0278] A target page can refer to any page of a desktop application. A target page can be used to place or display one or more interface elements, such as application icons and desktop cards. For example, the user interface M10 shown in Figure 3 above can be regarded as a target page.

[0279] In some scenarios, desktop cards, desktop widgets, and desktop control elements can be understood as interface elements with the same or similar functions, and this application may not distinguish between the three.

[0280] S120, in response to the operation of adding a target desktop card to the target page, determines that the target desktop card can be placed on the target page in both landscape and portrait modes.

[0281] In some examples, the operation of adding a target desktop card to a target page may include adding the target desktop card to the target page through the user interface M40 shown in Figure 6 above, or it may include moving the target desktop card located on another page to the target page.

[0282] Generally, landscape mode refers to a display state where the target page is longer horizontally and shorter vertically, and vice versa. It should be noted that landscape and portrait modes are related concepts. In some scenarios, these concepts may have other names, such as default state and rotated state, first state and second state, etc. This application does not impose any restrictions on these.

[0283] Here, "the target page can place the target desktop card" means that the target desktop card can be placed on the target page without changing its size or shape. In some scenarios, this can also be understood as: the target page has free area, and the area of ​​this free area is not less than the area occupied by the target desktop card.

[0284] It should be noted that the free area here can be a continuous area, or it can be multiple non-contiguous areas. By rearranging other interface elements on the target page, these non-contiguous areas can be combined into a continuous area.

[0285] In some examples, electronic devices can obtain information about the size of the target page, information about the interface elements already placed on the target page, and information about the target desktop card, and determine whether the target page can place the target desktop card in both landscape and portrait modes based on one or more of the information.

[0286] For example, the size information of the target page may include the ratio of the target page's height to its width.

[0287] For example, information about interface elements may include the type of interface element, such as icons or desktop cards.

[0288] Generally, the icon size is 1×1, or in other words, the icon occupies one cell when placed on the target page. It should be noted that this application does not limit the size of the icon. When the icon size is other than 2×2, the icon can also be regarded as a desktop card.

[0289] The information of the interface elements may also include the type of desktop card, such as the aforementioned large desktop card Bg, medium desktop card M1, medium desktop card M2, small desktop card S, micro desktop card T1, and micro desktop card T2.

[0290] It should be noted that for a given type of desktop card, its size is also fixed. In other words, the information of interface elements can also include the size information of desktop cards, and the size information and type of desktop cards can be interchanged in this scenario.

[0291] Information about interface elements can also include the placement of various interface elements on the target page, such as the coordinates of feature points of interface elements in Figures 22 and 24.

[0292] The information of the interface elements may also include the identifiers of various interface elements on the target page, such as the serial numbers of the interface elements in Figures 25 and 26.

[0293] In some examples, the aforementioned size information of the target page and the information of the interface elements already placed on the target page can be regarded as part of the layout information mentioned above. In other words, the layout information mentioned above may include one or more of the following: the size information of the target page, the types of interface elements on the target page, the type of desktop cards on the target page, the placement position of interface elements on the target page, or the identifier of interface elements on the target page.

[0294] For example, the information of the target desktop card may include the type and / or size of the target desktop card.

[0295] In some examples, electronic devices can combine the information of the target desktop card with the aforementioned layout information to determine whether the target page can accommodate the target desktop card in both landscape and portrait modes. Relevant examples can be found in Figures 8 to 19 above, and will not be repeated here.

[0296] S130, displays the target page for adding the target desktop card.

[0297] In some examples, if it is determined that the target desktop card can be placed on the target page in both landscape and portrait modes, the electronic device adds the target desktop card to the target page and displays the target page after the target desktop card has been added.

[0298] In some examples, if it is determined that the target desktop card cannot be placed on the target page in landscape or portrait mode, the electronic device can display a prompt message indicating that the target desktop card cannot be placed on the target page.

[0299] For example, this prompt message can be used to indicate that there is insufficient free space on the target page to place the target desktop card.

[0300] For example, this prompt message can be used to prompt the user to place the target desktop card on another page.

[0301] For example, this prompt can also be used to prompt the user to reselect a desktop card that meets the above requirements. For instance, if the user's current target desktop card is a large desktop card, the prompt can be used to prompt the user to select a smaller desktop card of the same application.

[0302] In some examples, in response to the addition of a target desktop card to the target page, the electronic device can update the aforementioned layout information. The updated layout information may include information such as the shape, size, page placement, and position of the target desktop card on the target page.

[0303] S140, in response to the operation of switching display states, displays the target page including the target desktop card after the switch.

[0304] The operation of switching between landscape and portrait modes may include the user rotating the electronic device or the user pressing the screen rotation button; this application does not limit this.

[0305] Display state switching can include switching from landscape mode to portrait mode, or vice versa.

[0306] In some examples, the electronic device can determine the layout of the interface elements on the target page after the state switch based on the updated layout information in S130, and display the target page including the target desktop card after the state switch.

[0307] For example, the electronic device can determine the placement position of the interface elements on the target page after the state switch according to the placement method of the interface elements provided in Figures 27 and 28.

[0308] Based on the same inventive concept, as shown in FIG35, this application embodiment also provides an interface display device 3500. This interface display device 3500 can possess the functions of the electronic device in the above method embodiments and can be used to execute the steps performed by the functions of the electronic device in the above method embodiments. This function can be implemented by hardware, or by software or hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0309] In some examples, the device 3500 displaying the interface may include a layout mapping module 3530, which may be used to determine the layout for a portrait state based on the layout for a landscape state, or to determine the layout for a landscape state based on the layout for a portrait state.

[0310] In some examples, the device 3500 displaying the interface may include a cache management module 3520, which can be used to read and update cache information. In scenarios where the display state of the device 3500 changes, the cache management module 3520 can also be used to perform a cache switching operation. In other words, the cache management module 3520 can be used to switch from reading cache information in landscape mode to reading cache information in portrait mode, or the cache management module 3520 can be used to switch from reading cache information in portrait mode to reading cache information in landscape mode.

[0311] In some examples, the device 3500 displayed on the interface may include an acquisition module 3510, which can be used to acquire user actions on the device 3500 displayed on the interface. For example, activating the device 3500 displayed on the interface or tapping the device 3500 displayed on the interface.

[0312] In some examples, the device 3500 that displays the interface may include a display module 3540, which can be used to display the desktop application page according to cached information, such as displaying the desktop application page in landscape mode, the desktop application page in portrait mode, etc.

[0313] In one possible implementation, the interface display device 3500 may further include a storage module for storing the aforementioned layout information. This storage module may include a storage medium such as a disk.

[0314] In the scenario of the device 3500 being launched for the first time, the desktop application page of the device 3500 can be displayed in landscape mode by default, or in other words, the default layout of the desktop application page of the device 3500 is a landscape layout. In some examples, the layout information used to indicate this default layout can be stored in the storage module. When the device 3500 is launched for the first time, the detection module 3510 can detect the launch operation of the device 3500, the cache management module 3520 can load the layout information from the storage module into the cache of the device 3500, and the display module 3540 can display the default layout of the device 3500 according to the layout information loaded into the cache.

[0315] One possibility is that the device 3500 may include a function switch that controls the use of the same layout information in landscape and portrait modes. When the function switch is turned on, the layout mapping module 3530 can determine the layout in portrait mode based on the default layout (the layout in landscape mode).

[0316] In scenarios where the display state of the device 3500 changes, for example, from landscape to portrait mode, the detection module 3510 can detect operations performed on the device 3500. These operations can indicate a change in display state, such as rotating the device 3500. Upon detecting such an operation, the cache management module 3520 can switch the cache; in other words, the cache management module 3520 can read the portrait layout information from the device 3500's cache. The display module 3540 can then display the portrait layout of the device 3500 based on the changed layout information.

[0317] The aforementioned layout information can be used to indicate the layout information of the interface elements that have been placed on the page of the desktop application. In one possible case, the layout information may include one or more of the following: the height of the desktop application page, the width of the desktop application page, the height of the interface elements that have been placed on the page, the width of the interface elements that have been placed on the page, the number of interface elements that have been placed on the page, or the position of the interface elements that have been placed on the page.

[0318] In scenarios where desktop elements such as desktop cards or icons are added to the desktop application page of the device 3500, the detection module 3510 can detect operations performed on the device 3500, which can be used to instruct the addition of interface elements to the desktop application page. For example, this operation could be dragging a desktop card from one page to another in landscape mode. Upon detecting the aforementioned operation, the cache management module 3520 can update the aforementioned layout information based on the height, width, and other information of the newly added desktop card, for example, by adding the information of the newly added desktop card to the cache of the device 3500. The updated layout information may include the height, width, and position of the newly added desktop card on the page. The display module 3540 can display the desktop application page containing the newly added desktop card based on the cache containing the information of the newly added desktop card.

[0319] In some examples, the layout mapping module 3530 can determine the updated layout information for the portrait state based on the updated layout information for the landscape state.

[0320] In some scenarios, when the interface is refreshed in landscape mode of device 3500, for example, when the state information of interface elements (such as the content displayed on the desktop card) is automatically updated, the cache management module 3520 can update the cache of the page used to display the desktop application, or update the layout information used to indicate the layout of the interface elements on the page of the desktop application in landscape mode. The layout mapping module 3530 can determine the updated layout information of portrait mode based on the updated layout information of landscape mode.

[0321] As shown in Figure 36, the application embodiment also provides an interface display device 3600. This device 3600 can have the functions of the electronic device in the above method embodiments and can be used to execute the steps performed by the functions of the electronic device in the above method embodiments. This function can be implemented by hardware, or by software or hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0322] In one possible implementation, the interface display device 3600 may include an acquisition module 3610 and a processing module 3620, which are coupled to each other.

[0323] In some examples, the acquisition module 3610 can be used to support the electronic device in the foregoing embodiments in acquiring user taps or drags of desktop cards, etc.

[0324] The processing module 3620 is used to support the electronic device in performing the processing actions in the above method embodiments, such as displaying the target page after adding the target desktop card.

[0325] Optionally, the interface display device 3600 may also include a storage unit 3630 for storing program code and data of the interface display device 3600.

[0326] Figure 37 illustrates an electronic device 3700 provided in an embodiment of this application. As shown, the electronic device 3700 includes at least one processor 3710 and a transceiver 3720. The processor 3710 is coupled to a memory and is used to execute instructions stored in the memory to control the transceiver 3720 to transmit and / or receive signals.

[0327] Optionally, the electronic device 3700 also includes a memory 3730 for storing instructions.

[0328] In some embodiments, the processor 3710 and the memory 3730 can be combined into a single processing device, with the processor 3710 executing program code stored in the memory 3730 to achieve the aforementioned functions. Specifically, the memory 3730 can be integrated into the processor 3710 or independent of it.

[0329] In some embodiments, transceiver 3720 may include a receiver and a transmitter.

[0330] The transceiver 3720 may further include an antenna, and the number of antennas may be one or more. The transceiver 3720 may be a communication interface or an interface circuit.

[0331] When the electronic device 3700 is a chip, the chip includes a transceiver module and a processing module. The transceiver module can be an input / output circuit or a communication interface; the processing module can be a processor, microprocessor, or integrated circuit integrated on the chip.

[0332] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the interface display method in the above embodiment.

[0333] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the interface display method in the above embodiment.

[0334] Furthermore, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. This apparatus may include a connected processor and a memory. The memory stores computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to perform the interface display methods described in the above-described method embodiments.

[0335] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0336] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0337] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0338] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0339] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0340] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0341] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

A method for displaying an interface, applied to an electronic device, characterized in that, include: Displays the target page in the first state of the desktop application; Obtain the operation of adding a target desktop card to the target page in the first state; It is determined that the free area of ​​the target page in the first state and the free area of ​​the target page in the second state are both larger than the area required to place the target desktop card. The free area includes the area on the target page where no interface elements are placed. The interface elements include icons and / or desktop cards. Add the target desktop card to the target page in the first state; In this case, one of the first state and the second state is a landscape mode and the other is a portrait mode. The method according to claim 1, characterized in that, The step of determining that the free area of ​​the target page in the first state and the free area of ​​the target page in the second state are both larger than the area required to place the target desktop card includes: It is determined that the height of the free area of ​​the target page in the first state is greater than or equal to the height of the target desktop card, and the height of the free area of ​​the target page in the second state is greater than or equal to the height of the target desktop card. It is determined that the width of the free area of ​​the target page in the first state is greater than or equal to the width of the target desktop card, and the width of the free area of ​​the target page in the second state is greater than or equal to the width of the target desktop card. The method according to claim 1 or 2, characterized in that, Before determining that the free area of ​​the target page in the first state and the free area of ​​the target page in the second state are both larger than the area to be occupied by placing the target desktop card, the method further includes: Obtain layout information, the height of the target desktop card, and the width of the target desktop card. The layout information includes the layout of interface elements on the target page in the first state. The method according to claim 3, characterized in that, The layout information includes one or more of the following: the height of the target page in the first state, the width of the target page in the first state, the height of the interface elements on the target page in the first state, the width of the interface elements on the target page in the first state, the number of interface elements on the target page in the first state, or the position of the interface elements on the target page in the first state. The method according to claim 3 or 4, characterized in that, The method further includes: The layout information is updated, and the updated layout information includes the height of the target desktop card, the width of the target desktop card, and the position of the target desktop card on the target page in the first state. The method according to claim 5, characterized in that, The method further includes: In response to the operation of switching to the second state, the updated layout information is obtained; The target page in the second state, which includes the target desktop card, is displayed. In the target page in the second state, the height of the target desktop card is equal to the height of the target desktop card in the target page in the first state, and the width of the target desktop card in the target page in the second state is equal to the width of the target desktop card in the target page in the first state. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain the updated layout information; Display the target page in the second state containing the target desktop card, wherein the layout of the interface elements on the target page in the first state is the same as the layout of the interface elements on the target page in the second state. The method according to claim 7, characterized in that, The target page in the first state includes a first area and a second area, and the target page in the second state includes both the first area and the second area. Both the first area and the second area are used to place interface elements. In both the first state and the second state, the relative positions of the first region and the second region are the same on the target page. The method according to claim 7 or 8, characterized in that, Both the target page in the first state and the target page in the second state include the first area. The first area includes a first interface element and a second interface element. The relative positions of the first interface element and the second interface element are the same in the first area of ​​the target page in the first state and in the first area of ​​the target page in the second state. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Obtain the operation of adding a second desktop card to the target page in the first state; It is determined that the free area of ​​the target page in the first state is smaller than the area required to place the second desktop card, and / or, the free area of ​​the target page in the second state is smaller than the area required to place the second desktop card; A prompt message is displayed, indicating that the target desktop card cannot be placed on the target page in either the first state or the second state; or... Move the first interface element in the target page to another page of the desktop application other than the target page; The method further includes: The target desktop card is displayed on the target page after the first interface element has been removed; or... Add the target desktop card to other pages of the desktop application besides the target page. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to invoke the program instructions to perform the method of any one of claims 1 to 10. A device for displaying an interface, characterized in that, Includes modules for implementing the method of any one of claims 1 to 10. A computer-readable storage medium, characterized in that, It contains a computer program that, when executed by a computer, enables the implementation of the method according to any one of claims 1 to 10. A computer program product, characterized in that, It includes computer program code that, when run on a computer, causes the method of any one of claims 1 to 10 to be performed.

Citation Information

Patent Citations

  • Information processing method and electronic equipment

    CN113050858A

  • Icon arrangement method and device, equipment and storage medium

    CN117519852A

  • Service card distribution method and system and electronic equipment

    CN117666861A