Control display method and electronic equipment

CN119968618APending Publication Date: 2025-05-09HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380069868.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-30
Filing Date
2023-09-06
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In windowed applications, system controls easily exceed the window display area, affecting the user experience and making it difficult for users to identify the source of the system controls.

Method used

By calculating the scaling ratio between the window and the screen, the actual display position and size of the system controls are adjusted to fit the display area of ​​the windowed application, ensuring that the controls are displayed within the window and follow the changes in the window.

Benefits of technology

It effectively avoids the problem of system controls exceeding the window display area, improves user experience, and ensures that users can correctly identify the source of system controls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119968618A_ABST
    Figure CN119968618A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control display method and electronic equipment. The method comprises the steps that a windowed application is displayed on a screen of the electronic equipment, in response to operation of a user on the windowed application, the electronic equipment displays a system control in a display area of the windowed application, and the actual display position and the actual display size of the system control are followed according to the size and the position of a window. In the technical scheme, the actual display position and the actual display size of the system control are adaptive to the windowed application, so that the problem that the system control exceeds the display area of the window when being displayed according to the default display position and the default display size is avoided, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Control display method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 30, 2022, with application number 202211206525.1 and invention name “Control Display Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] Embodiments of the present application relate to the technical field of electronic devices, and more specifically, to a control display method and an electronic device. Background Art

[0003] Controls are an essential part of every application. By combining controls, you can create beautiful interfaces. Generally, the controls used by an application can include system controls and custom controls. System controls are customized by the system and can be directly called by the application.

[0004] However, when the application is a windowed application, such as a floating display or split-screen display, when the application calls the system control, the control may exceed the display area of ​​the window, resulting in the user being unable to tell which application popped up the system control, which greatly affects the user experience.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a control display method and electronic device, which can adapt the system controls called by the windowed application to the windowed application, avoid the problem of the system controls exceeding the display area of ​​the window, and improve the user experience.

[0007] In a first aspect, a control display method is provided, which is applied to an electronic device including a screen, the method comprising: displaying a first window, the first window being used to display a first application, and the area of ​​the first window being smaller than the area of ​​the screen; in response to a user operation on the first application, displaying a first system control in a display area of ​​the first window; wherein the actual display position and the actual display size of the first system control are determined based on the default display position and the default display size of the first system control and the scaling ratio of the first window relative to the screen, the actual display position and the actual display size of the first system control are adapted to the first window, and the default display position and the default display size of the first system control are adapted to the screen.

[0008] In the embodiment of the present application, the first application is a windowed application. When the first application calls the first system control, the first system control follows the size and position of the first window, and its size and position are adapted to the first window. This allows the first system control to be displayed within the display area of ​​the first window, avoiding the problem of the first system control exceeding the display area of ​​the first window when the first application calls the first system control, thereby improving the user experience.

[0009] In combination with the first aspect, in a possible implementation, the scaling ratio of the first window relative to the screen is a first ratio or a second ratio, wherein the first ratio is the ratio between the length of the long side of the first window and the length of the long side of the screen, and the second ratio is the ratio between the length of the short side of the first window and the length of the short side of the screen.

[0010] The length of the long side of the first window, the length of the long side of the screen, the length of the short side of the first window, and the length of the short side of the screen can be directly obtained, and the zoom ratio calculated thereby is simple and quick.

[0011] In combination with the first aspect, in a possible implementation, when the first ratio is unequal to the second ratio, the scaling ratio of the first window relative to the screen is a smaller value between the first ratio and the second ratio.

[0012] When the scaling ratio of the first window relative to the screen is the smaller value between the first ratio and the second ratio, it can be ensured that the first system control does not exceed the display area of ​​the first window when following the first window.

[0013] In combination with the first aspect, in a possible implementation, the actual display size of the first system control includes an actual width and an actual height; the default display size of the first system control includes a preset width and a preset height; wherein the actual width is the product of the preset width and the scaling ratio, and the actual height is the product of the preset height and the scaling ratio.

[0014] The actual display size of the first system control can be determined by the default display size and the scaling ratio of the first system control. The first system control is reduced according to the same scaling ratio to ensure that the first system control can be displayed within the display area of ​​the first window without exceeding the display area of ​​the first window.

[0015] In combination with the first aspect, in a possible implementation, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the first window as the origin; the preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; wherein the first horizontal coordinate is the product of the second horizontal coordinate and the zoom ratio, and the first vertical coordinate is the product of the second vertical coordinate and the zoom ratio.

[0016] The actual display position of the first system control can be determined by the default display position and scaling of the first system control. The position of the first system control follows the window change, which can ensure that the first system control can be displayed within the display area of ​​the first window without exceeding the display area of ​​the first window.

[0017] In combination with the first aspect, in a possible implementation, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the screen as the origin; the preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; the coordinates of the upper left corner of the first window include a third horizontal coordinate and a third vertical coordinate with the upper left corner of the screen as the origin; wherein, the first horizontal coordinate is the value obtained by multiplying the second horizontal coordinate and the scaling ratio plus the third horizontal coordinate, and the first vertical coordinate is the value obtained by multiplying the second vertical coordinate and the scaling ratio plus the third vertical coordinate.

[0018] The first system control, the first window, and the screen are all in the same coordinate system, and no coordinate system conversion is required.

[0019] In combination with the first aspect, in a possible implementation, before displaying the first system control in the display area of ​​the first window in response to the user's operation on the first application, the method also includes: receiving the user's operation on the first application; determining that the first application calls the first system control based on the operation; determining that the first application is a windowed application based on the size of the first window; determining the scaling ratio based on the size of the first window and the size of the screen; and updating the default display position and default display size of the first system control based on the scaling ratio to obtain the actual display position and actual display size of the first system control.

[0020] In combination with the first aspect, in a possible implementation, the first system control is any one of the following controls: a message prompt box, a system dialog box, a system warning prompt box, an error pop-up box, a floating box, an input method window, and a system status bar.

[0021] In combination with the first aspect, in a possible implementation, the Z-order value of the first system control is greater than or equal to 2000 and less than or equal to 2999.

[0022] The window type of the first system control is system window, and its level range is 2000-2999.

[0023] In combination with the first aspect, in a possible implementation, the first window is a floating window or a split-screen window.

[0024] In a second aspect, a control display method is provided, which is applied to an electronic device including a screen, the method comprising: displaying a first window, the first window being used to display a first application, and the area of ​​the first window being smaller than the area of ​​the screen, the first window corresponding to a first virtual screen, wherein the size and position of the first virtual screen are consistent with the size and position of the first window; in response to a user operation on the first application, displaying a first system control in a display area of ​​the first window, wherein the first system control is displayed according to a default display position and a default display size, and the default display position and default display size of the first system control are adapted to the first virtual screen.

[0025] In an embodiment of the present application, when creating the first application, a virtual screen, namely the first virtual screen, can be created accordingly. In this way, the windowed application can be implemented based on the first virtual screen, and accordingly, the system controls can be adapted based on the size of the first virtual screen, rather than based on the actual screen size of the electronic device. In this way, the default display position and default display size of the system controls are adapted to the first virtual screen, that is, to the first window. Therefore, the system controls will not exceed the display area of ​​the first window, thereby improving the user experience.

[0026] In combination with the second aspect, in a possible implementation manner, the method further includes: creating the first virtual screen.

[0027] According to a third aspect, an electronic device is provided, comprising a screen and a display unit, wherein the display unit is configured to: display a first window, wherein the first window is configured to display a first application, and wherein the area of ​​the first window is smaller than the area of ​​the screen; and display a first system control within the display area of ​​the first window in response to a user operation on the first application; wherein the actual display position and the actual display size of the first system control are determined based on the default display position and the default display size of the first system control and the scaling ratio of the first window relative to the screen, and the actual display position and the actual display size of the first system control are adapted to the first window, and the default display position and the default display size of the first system control are adapted to the screen.

[0028] In combination with the third aspect, in a possible implementation, the scaling ratio of the first window relative to the screen is a first ratio or a second ratio, wherein the first ratio is the ratio between the long side length of the first window and the long side length of the screen, and the second ratio is the ratio between the short side length of the first window and the short side length of the screen.

[0029] In combination with the third aspect, in a possible implementation, when the first ratio is not equal to the second ratio, the scaling ratio of the first window relative to the screen is a smaller value between the first ratio and the second ratio.

[0030] In combination with the third aspect, in a possible implementation, the actual display size of the first system control includes an actual width and an actual height; the default display size of the first system control includes a preset width and a preset height; wherein the actual width is the product of the preset width and the scaling ratio, and the actual height is the product of the preset height and the scaling ratio.

[0031] In combination with the third aspect, in a possible implementation, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the first window as the origin; the preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; wherein the first horizontal coordinate is the product of the second horizontal coordinate and the zoom ratio, and the first vertical coordinate is the product of the second vertical coordinate and the zoom ratio.

[0032] In combination with the third aspect, in a possible implementation method, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the screen as the origin; the preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; the coordinates of the upper left corner of the first window include a third horizontal coordinate and a third vertical coordinate with the upper left corner of the screen as the origin; wherein, the first horizontal coordinate is the value obtained by multiplying the second horizontal coordinate and the scaling ratio plus the third horizontal coordinate, and the first vertical coordinate is the value obtained by multiplying the second vertical coordinate and the scaling ratio plus the third vertical coordinate.

[0033] In combination with the third aspect, in a possible implementation, the electronic device also includes a processing unit, and before the display unit displays the first system control in the display area of ​​the first window, the processing unit is used to: receive the user's operation on the first application; determine that the first application calls the first system control based on the operation; determine that the first application is a windowed application based on the size of the first window; determine the scaling ratio based on the size of the first window and the size of the screen; based on the scaling ratio, update the default display position and default display size of the first system control to obtain the actual display position and actual display size of the first system control.

[0034] In combination with the third aspect, in a possible implementation, the first system control is any one of the following controls: a message prompt box, a system dialog box, a system warning prompt box, an error pop-up box, a floating box, an input method window, and a system status bar.

[0035] In combination with the third aspect, in a possible implementation, the Z-order value of the first system control is greater than or equal to 2000 and less than or equal to 2999.

[0036] In combination with the third aspect, in a possible implementation, the first window is a floating window or a split-screen window.

[0037] In a fourth aspect, an electronic device is provided, comprising a screen and a display unit, wherein the display unit is used to: display a first window, the first window being used to display a first application, and the area of ​​the first window being smaller than the area of ​​the screen, the first window corresponding to a first virtual screen, wherein the size and position of the first virtual screen are consistent with the size and position of the first window; in response to a user operation on the first application, displaying a first system control in the display area of ​​the first window, wherein the first system control is displayed according to a default display position and a default display size, and the default display position and the default display size of the first system control are adapted to the first virtual screen.

[0038] In combination with the fourth aspect, in a possible implementation, the electronic device further includes a processing unit configured to create the first virtual screen.

[0039] In a fifth aspect, a device is provided, which is included in an electronic device and has the function of implementing the behaviors involved in the above-mentioned first aspect and any possible implementation method of the first aspect, or has the function of implementing the above-mentioned second aspect and any possible implementation method of the second aspect.

[0040] This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a display module or unit, an acquisition module or unit, a receiving module or unit, a processing module or unit, etc.

[0041] In the sixth aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to execute the method of the above-mentioned first aspect and any possible implementation of the first aspect, or execute the method of the above-mentioned second aspect and any possible implementation of the second aspect.

[0042] In the seventh aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation of the first aspect, or executes the method of the above-mentioned second aspect and any possible implementation of the second aspect.

[0043] In an eighth aspect, a computer program product comprising instructions is provided, which, when run on a computer, enables the computer to execute the method of the above-mentioned first aspect and any possible implementation of the first aspect, or to execute the method of the above-mentioned second aspect and any possible implementation of the second aspect.

[0044] In the ninth aspect, a chip is provided, which includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface, executes the method in the above-mentioned first aspect and any possible implementation of the first aspect, or executes the method in the above-mentioned second aspect and any possible implementation of the second aspect.

[0045] Optionally, as an implementation method, the chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored on the memory. When the instructions are executed, the processor is used to execute the method in the above-mentioned first aspect and any possible implementation method of the first aspect, or execute the above-mentioned second aspect and any possible implementation method of the second aspect.

[0046] The above chip may specifically be a field programmable gate array or a dedicated integrated circuit.

[0047] The beneficial effects of the devices described in the third to ninth aspects can refer to the beneficial effects of the methods described in the first to second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0049] FIG2 is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.

[0050] FIG3 is a schematic diagram of a window type provided in an embodiment of the present application.

[0051] FIG4 is a schematic diagram showing the relationship between controls and windows provided in an embodiment of the present application.

[0052] FIG5 is a schematic diagram of the mapping relationship of windows provided in an embodiment of the present application.

[0053] FIG6 is a schematic diagram of a user interface of an existing control display solution.

[0054] FIG7 is a schematic flowchart of a control display method provided in an embodiment of the present application.

[0055] FIG8 is a schematic diagram of a control display method provided in an embodiment of the present application.

[0056] FIG9 is a schematic diagram of a set of user interfaces provided in an embodiment of the present application.

[0057] FIG10 is a schematic flowchart of a control display method provided in an embodiment of the present application.

[0058] FIG11 is a schematic flowchart of a control display method provided in an embodiment of the present application.

[0059] FIG12 is a schematic diagram of a control display method provided in an embodiment of the present application.

[0060] FIG13 is a schematic diagram of a control provided in an embodiment of the present application.

[0061] FIG14 is a schematic diagram of a user interface of an existing control display solution.

[0062] FIG15 is a schematic diagram of a user interface provided in an embodiment of the present application.

[0063] FIG16 is a schematic structural block diagram of a device provided in an embodiment of the present application.

[0064] FIG17 is a schematic structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0066] It should be noted that, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two, and “at least one” and “one or more” refer to one, two or more. The singular expressions “a”, “an”, “said”, “the” and “this” are intended to also include expressions such as “one or more”, unless there is a clear indication to the contrary in the context.

[0067] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features.

[0068] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0069] The methods provided in the embodiments of the present application are applicable to electronic devices, including but not limited to mobile phones, tablet computers, in-vehicle devices, wearable devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart screens, and other electronic devices with display screens. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0070] For example, FIG1 shows a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0071] As shown in Figure 1, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

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

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

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

[0075] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may 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.

[0076] For example, the processor 110 and the touch sensor 180K can communicate via an I2C bus interface to implement the touch function of the electronic device 100. The processor 110 and the camera 193 can communicate via a camera serial interface (CSI) in MIPI to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 can communicate via a display serial interface (DSI) in MIPI to implement the display function of the electronic device 100.

[0077] It is understood that the interface connection relationship between the modules described in the above examples is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0078] The charging management module 140 is configured to receive charging input from a charger. The power management module 141 is configured to connect to the battery 142. While the charging management module 140 is charging the battery 142, it can also power the electronic device 100 through the power management module 141. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status.

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

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

[0081] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0082] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to 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 sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

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

[0084] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be 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, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0085] Electronic device 100 can implement a camera function using an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP processes data fed back by camera 193. Camera 193 is used to capture still images or video. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than one.

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

[0087] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0088] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0089] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can execute the above instructions stored in the internal memory 121, so that the electronic device 100 performs the method provided in this application, as well as various functional applications and data processing. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data created during the use of the electronic device 100 (such as images, contacts, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute the instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110, so that the electronic device 100 executes the method provided in the embodiment of the present application.

[0090] The electronic device 100 can implement audio functions such as audio playback and recording through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0091] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and a bone conduction sensor 180M.

[0092] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0093] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for shooting anti-shake. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0094] It should be understood that when the electronic device 100 is stationary, the gyroscope sensor 180B can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device 100 and be applied to applications such as landscape and portrait screen switching and pedometers.

[0095] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0096] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0097] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).

[0098] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0099] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0100] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0101] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0102] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

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

[0104] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

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

[0106] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback.

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

[0108] The SIM card interface 195 is used to connect a SIM card.

[0109] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0110] The above describes a possible hardware structure diagram of the electronic device 100. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device 100 is exemplarily described.

[0111] Figure 2 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, The system is divided into four layers, from top to bottom: application layer, application framework layer, system runtime layer and kernel layer.

[0112] The application layer includes a series of application packages. As shown in Figure 2, these packages include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short messaging. Applications primarily focus on the user interface (UI) and are typically written in Java using interfaces in the application framework layer.

[0113] Applications in electronic devices can be either running or not running. When running, applications can be categorized as foreground applications or background applications, depending on where they run. Foreground applications run in the foreground and are displayed on the electronic device's display interface; background applications run in the background and are not displayed on the electronic device's display interface.

[0114] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer can include window management services, activity management services, package management services, view system, notification manager, telephony manager, content providers, and so on.

[0115] The Window Manager Service (WMS) manages all windows in the system. It is primarily responsible for starting, adding, and deleting windows; managing window sizes, borders, and levels; managing input method windows; displaying animation effects when switching windows; and managing window display when switching users. The WMS also serves as a relay station for input events, updating the Input Dispatcher with information about all windows, allowing the Input Dispatcher to dispatch input events generated by user touches to the appropriate window. The Window Manager Service is a system service class that is the core of the entire window management mechanism.

[0116] The window mentioned here is an abstract concept. For ease of understanding, think of it as a container or an abstract collection of functions. A view is the form in which a window exists; the window is the carrier of the view. A view cannot exist independently and must be attached to a window to be presented on the screen.

[0117] The Android system defines multiple window types, as shown in Figure 3. These include application windows, subwindows, and system windows. Each window has a corresponding hierarchy (also known as z-order), with windows with higher hierarchies appearing above smaller ones. The window's hierarchy size corresponds to its coordinate on the vertical screen's z-axis. A larger z-coordinate indicates a window closer to the user, resulting in a higher hierarchy and potentially covering smaller windows. Each window must be assigned a specific type. In specific implementations, the window's type parameter determines the window's display hierarchy and specifies the window type. The hierarchy range for application windows is 1-99; the hierarchy range for subwindows is 1000-1999; and the hierarchy range for system windows is 2000-2999. Therefore, application windows are typically placed at the bottom; subwindows must be attached to their parent windows and typically appear above application windows; and system windows are typically placed at the top and are not obscured by other windows.

[0118] An application window is a window related to an application, and may include a base window, a normal application window, and an application startup window. A base window is a window that serves as the basis for other application windows, and its type is represented as TYPE_BASE_APPLICATION. All other application windows need to be presented on top of this type of window. A normal application window usually corresponds to an activity, and its type is represented as TYPE_APPLICATION. In the following embodiments of this application, unless otherwise specified, the application windows involved may specifically refer to normal application windows. The application startup window is displayed when the application starts. This type of window is used by the system to display some other content before the application can display its own window. Its type is represented as TYPE_APPLICATION_STARTING.

[0119] Child windows can include media windows, media overlay windows, dialog windows, pop-up windows, etc. The Media window is displayed behind the application window to which it is attached and is used to display media content, such as video. Its type is expressed as TYPE_APPLICATION_MEDIA. The media overlay window is used to display some overlays on the media window. This type of window is displayed between the application window and the media window. Its type is expressed as TYPE_APPLICATION_MEDIA_OVERLAY. The Dialog window is used to display a dialog box on an application window. Its type is expressed as TYPE_APPLICATION_ATTACHED_DIALOG. The pop-up window can use views of any layout as its content. This type of window is suspended above the current Activity.

[0120] System windows are windows created by the system, including the system status bar, input method window, message prompt box (Toast), system warning prompt box (such as ANR), error pop-up box, floating window pop-up box, etc. System windows require permission to be declared before they can be created.

[0121] In an application, window operations are performed by the WindowManager, while actual window processing is performed by the WindowMangerService. The WindowManagerService is a separate process, so the interaction between the WindowManager and WindowMangerService is an inter-process communication (IPC) process. The WindowMangerService determines which windows to display and where to display them based on the position and size of each window on the screen. This essentially involves calculating the visible area of ​​each window. The window position involved here includes the window's position on the X, Y, and Z axes.

[0122] Typically, the screen of an electronic device is a two-dimensional space with the top-left corner as the origin, the rightward direction being the X-axis, and the downward direction being the Y-axis. To facilitate managing the display order of windows, the mobile phone screen is expanded into a three-dimensional space, defining an additional Z-axis, which runs perpendicular to the screen surface and points outward. Multiple windows are arranged along this virtual Z-axis in the order in which they appear. Therefore, the window display order is also called the Z order (or z-order).

[0123] The Activity Manager Service (AMS) is used to manage all aspects of the application lifecycle and activity stack, and provides common navigation back functionality. The Activity Manager can be used to obtain information about running activities in the system, such as processes, applications, services, and tasks. For example, the Activity Manager can be used to obtain global memory usage information, count memory information under processes, obtain running process information (such as obtaining the activity running in the foreground and determining whether the application is running in the foreground), etc. AMS can uniformly schedule the activities of all applications, so AMS can launch the application after the user clicks the application icon.

[0124] Package Manager Service (PMS) is an Android system service that is mainly used to implement functions such as application installation and uninstallation, component query and matching, and permission management.

[0125] The view system is used to build applications, and may include, for example, lists, grids, text boxes, buttons, and an embeddable world wide web browser. The display interface of an electronic device may be composed of one or more views.

[0126] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, or flashing indicator lights.

[0127] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0128] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0129] The system runtime layer is a collection of program libraries located below the application framework layer and can be divided into two parts: the system library and the Android runtime.

[0130] The Android runtime consists of a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core library consists of two parts: one for the Java language's callable functions and the other for the Android core library.

[0131] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0132] The system library (also called the C / C++ native library) supports the application framework and can include multiple functional modules, such as: surface manager, media libraries, 2D graphics engine, 3D graphics processing library, image processing library, etc.

[0133] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0134] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0135] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing and layer processing.

[0136] A 2D graphics engine is a drawing engine for 2D drawings.

[0137] The kernel layer is the layer between hardware and software, providing essential operating system functions such as file management, memory management, process management, and network protocol stacks. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, and Bluetooth drivers.

[0138] The kernel layer controls the computer's hardware resources and provides a standard interface for hardware systems (such as processors, memory, disks, printers, etc.) through the hardware abstraction layer (HAL). The hardware abstraction layer is a hardware interface layer abstracted from a specific hardware platform. It is responsible for implementing the functions and control of the specific hardware platform, while also providing a unified API interface for other software modules. Specifically, the hardware abstraction layer abstracts the common features of hardware operation and control, hiding the hardware interface details of a specific platform, and providing a unified virtual hardware platform and control interface to upper-level software. This isolates other software modules from the underlying hardware, thereby facilitating the system's porting to new hardware platforms.

[0139] For ease of understanding, the following embodiments of the present application will take an electronic device having the structure shown in Figures 1 and 2 as an example, and combine the accompanying drawings and application scenarios to specifically explain the control display method provided in the embodiments of the present application.

[0140] Controls are an essential part of every application. Through the combination of controls, beautiful interfaces can be formed. Controls can be understood as technical functions for completing specific displays or specific pages / forms. Generally, the controls used by applications can include system controls and custom controls. System controls are customized by the system and can be used directly. They are the most basic components in application development, such as message prompt boxes (such as Toast), dialog boxes (such as System Dialog), error pop-ups, floating window pop-ups (or floating boxes), system status bars, etc. Applications can call system controls. Custom controls are new controls generated by applications based on their own needs based on system controls. Custom controls belong to applications.

[0141] Figure 4 illustrates the relationship between controls and windows. As shown in Figure 4, an activity is an application component and an interface carrier, capable of displaying web pages and interacting with the user. Each activity corresponds to an application window. Typically, the size of each activity window is equal to the screen size. Therefore, by setting a different Z-axis position for each activity window, only the topmost activity window (the currently active activity window) is visible. The specific implementation class for windows is PhoneWindow, and each activity creates a PhoneWindow object. The PhoneWindow object is the interface between the activity and the entire view system, representing the most fundamental part of the window system. PhoneWindow contains a top-level view, DecorView, which PhoneWindow sets as the root view of the entire application window. DecorView is the root view in the view tree. It doesn't display anything to the user, but it divides the screen into two areas: the title bar and the content bar. Typically, the layout file set in the activity is loaded into the content bar and displayed to the user.

[0142] In short, an Activity is responsible for interface presentation, user interaction, and business logic processing. It uses a Window to display view elements. The Window is the carrier of the View, and the View is the specific display of the Window. Views include the aforementioned system controls and custom controls. Each control is hosted by a corresponding window, for example, system controls are hosted in the system window, and custom controls are hosted in a child window. The WMS can specify the type, x-position, and y-position of a control (or window), so that the control is displayed to the user at the corresponding location.

[0143] Figure 5 shows a schematic diagram of the window mapping relationship. As shown in Figure 5, for an application, it may include multiple windows, such as Window 1, Window 2, and Window 3 shown in Figure 5. Each window may also contain different controls (such as system controls and / or custom controls). Taking Window 1 as an example, it may include UI View 1 (UIView 1), UI View 2 (UIView 2), and UI View 3 (UIView 3), etc. Each UI view can be understood as a control. The various UI views in Window 1 can be synthesized into a layer. Different windows correspond to different layers. For example, Window 1 corresponds to Layer 1 (Layer 1), Window 2 corresponds to Layer 2 (Layer 2), and Window 3 corresponds to Layer 3 (Layer 3). There is a root layer (RootLayer) among the multiple layers. The graphics synthesis system (such as the SurfaceFlinger service) can mix the contents of multiple windows according to the z-order and output them for display. It will be understood that the number of windows, UI views, and layers shown in Figure 5 is merely exemplary and does not impose any limitation on this application.

[0144] With the continuous development of electronic device technology, the screen sizes of electronic devices such as mobile phones and tablets are getting larger and larger, and the number of applications (apps) installed on electronic devices is also increasing. To meet the personalized needs of users, more and more electronic devices support multi-window mode (also known as multi-screen mode), that is, the ability to run and display multiple applications simultaneously on a single screen.

[0145] When the electronic device is in multi-window mode, the display modes of the application window include full-screen display, split-screen display, and floating display.

[0146] Full-screen display, also known as full-screen mode, refers to the display of only one application window on the screen, and the interface of the application fills the entire screen. In the embodiments of the present application, when a window is displayed full-screen, the state of the window is full-screen state, the window is defined as a full-screen window, and accordingly, the application displayed in the window is a full-screen display application.

[0147] Split-screen display, also known as split-screen mode, refers to two or more application windows that each occupy a portion of the screen, with no two application windows overlapping. Each application window can be resized, and the position of the application window may be immovable or only movable to a fixed position, such as swapping the positions of two application windows. In the embodiments of the present application, when a window is displayed in split-screen mode, the state of the window is split-screen mode, the window is defined as a split-screen window, and accordingly, the application displayed in the window is a split-screen display application.

[0148] Floating display, also known as floating mode, refers to at least one application window being displayed floating above other user interfaces and partially covering other user interfaces. When the user does not operate the floating application window, the floating application window remains in a fixed position and does not change with changes in other user interfaces. The at least one application window is displayed in layers on the screen, and the application windows can partially or fully overlap each other. Each application window can be resized and moved. In an embodiment of the present application, when a window is displayed in a floating state, for example, floating above a window displayed in full screen or above a window displayed in split screen, the state of the window is a floating state, and the window is defined as a floating window. Accordingly, the application displayed in the window is a floating display application.

[0149] Compared with full-screen display applications, the windows of split-screen display applications and floating display applications only occupy a part of the screen. Therefore, in the embodiments of the present application, split-screen display applications and floating display applications can also be collectively referred to as windowed applications.

[0150] As mentioned above, applications can call system controls, but when the application is a windowed application, the problem of controls exceeding the display area of ​​the window will occur when the application calls the system controls. This is because the display position of the system controls on the screen is relatively fixed, and its display position is defined by the system. For example, the system defines the system controls as being located at the bottom, middle, or top of the screen. In short, the position of the system controls is defined relative to the screen, so the system controls are displayed attached to the screen. If the application is a full-screen application, the application window will fill the entire screen. When the application calls the system controls, the position of the system controls relative to the screen can adapt to the application window. If the application is a windowed application, the application window will not fill the entire screen, but will occupy a part of the screen. When the application calls the system controls, the system does not know which application will call the system controls, so the system controls are still displayed at the preset position relative to the screen and will not be displayed following the application window. This causes the system controls to exceed the display area of ​​the window, which can easily cause misunderstandings for users.

[0151] For example, as shown in Figure 6 (a), the application displayed in window 201 is a windowed application, which is displayed floating above another full-screen window 203. When the user operates the windowed application, such as pressing the back key, the windowed application invokes a system Dialog control 202, prompting the user to "press the back key again to switch to the desktop." Dialog control 202 is attached to the screen and displayed in the middle. At this time, the windowed application is in the form of a floating window, occupying a portion of the screen, so Dialog control 202 exceeds the display area of ​​the floating window.

[0152] As shown in (b) of Figure 6 , the applications displayed in window 204 and window 205 are both windowed applications. Specifically, the two windowed applications are split-screen applications, with window 204 and window 205 forming a top-bottom split-screen format. The display area of ​​window 205 is larger than that of window 204. When a user operates the windowed application in window 204, such as by clicking the return key, the windowed application invokes system Dialog control 206, prompting the user to "click the return key again to switch to the desktop." Dialog control 206 is attached to the screen and displayed in the center. Since the windowed application is split-screen at this time and the display area of ​​window 205 is larger than that of window 204, Dialog control 206 is displayed in the area of ​​window 205. However, in reality, Dialog control 206 is invoked by the application in window 204, and the prompt indicates that the application in window 204 is switching to the desktop, not that the application in window 205 is switching to the desktop.

[0153] In summary, currently when a windowed application actively calls system controls, the system controls are displayed at the bottom, middle, or top of the screen according to the preset position set when the application is in full-screen mode. System controls can easily exceed the display area of ​​the window, making it impossible for users to tell which application popped up the system controls, which greatly affects the user experience.

[0154] FIG7 shows a schematic flow chart of a control display method provided in an embodiment of the present application. The method is applied to an electronic device, such as the electronic device 100 shown in FIG1 . In some embodiments, the electronic device may have a software architecture as shown in FIG2 . As shown in FIG7 , the method 300 may include steps S310 to S320.

[0155] S310: The electronic device displays a first window, where the first window is used to display a first application, and an area of ​​the first window is smaller than an area of ​​the screen.

[0156] In the embodiment of the present application, the first window is an application window. Exemplarily, the first window is a common application window. For example, in a specific implementation, the type of the first window can be represented as TYPE_APPLICATION.

[0157] Here, the screen area can be understood as the maximum area that the display screen of the electronic device can display. In the embodiment of the present application, the area of ​​the first window is smaller than the area of ​​the screen, that is, the first window occupies a portion of the screen to display content. Accordingly, the first application is a windowed application.

[0158] In some embodiments, the first application may be a floating display application or a split-screen display application. Correspondingly, the first window may be a floating window or a split-screen window.

[0159] S320: In response to the user's operation on the first application, the electronic device displays a first system control in the display area of ​​the first window.

[0160] The actual display position and the actual display size of the first system control are determined according to the default display position and the default display size of the first system control and the scaling ratio of the first window relative to the screen.

[0161] In the embodiment of the present application, the actual display position and actual display size of the first system control are adapted to the first window, and the default display position and default display size of the first system control are adapted to the screen of the electronic device.

[0162] That is, the first system control has a preset display position and size, but the default display position and size are defined based on the screen size. When the first application calls the first system control, the first application is a windowed application, and the actual display position and size of the first system control must follow the size and position of the first window to adapt to the first window.

[0163] Here, the user's operation on the first application can be any operation that requires the first application to call a system control to respond, such as a click operation, a sliding operation, an input operation, etc., and the embodiment of the present application does not limit this.

[0164] It is understandable that the electronic device displays the first system control in response to the user's operation on the first application, so the first system control is actually actively called by the first application. The window type of the first system control is a system window.

[0165] In the embodiment of the present application, the first application is a windowed application. When the first application calls the first system control, the first system control follows the size and position of the first window, and its size and position are adapted to the first window. This allows the first system control to be displayed within the display area of ​​the first window, avoiding the problem of the first system control exceeding the display area of ​​the first window when the first application calls the first system control, thereby improving the user experience.

[0166] In some embodiments, the scaling ratio of the first window relative to the screen is a first ratio or a second ratio, wherein the first ratio is the ratio between the length of the long side of the first window and the length of the long side of the screen, and the second ratio is the ratio between the length of the short side of the first window and the length of the short side of the screen.

[0167] For ease of understanding, taking Figure 8 as an example, Figure 8 (a) or (b) schematically illustrates an electronic device screen and a first window displayed on the screen. If the long side of the first window is h and the long side of the screen is H, then the first ratio is h / H. If the short side of the first window is w and the short side of the screen is W, then the second ratio is w / W. That is, the scale ratio of the first window relative to the screen can be h / H or w / W.

[0168] In some embodiments, if the first window is scaled proportionally relative to the screen, the first ratio and the second ratio are equal, ie, h / H=w / W.

[0169] In some embodiments, if the first window is non-proportionally scaled relative to the screen, the first ratio is not equal to the second ratio, that is, h / H ≠ w / W. In this case, the scaling ratio of the first window relative to the screen can be the first ratio or the second ratio, or can be the smaller of the first ratio and the second ratio.

[0170] When the scaling ratio of the first window relative to the screen is the smaller of the first ratio and the second ratio, it can be ensured that the first system control with the actual display position and actual display size obtained in step S320 does not exceed the display area of ​​the first window.

[0171] In some embodiments, the scaling ratio of the first window relative to the screen may be a third ratio, where the third ratio is a ratio between an area of ​​the first window and an area of ​​the screen.

[0172] In some embodiments, the scaling ratio of the first window relative to the screen may be a fourth ratio, where the fourth ratio is a ratio between a diagonal length of the first window and a diagonal length of the screen.

[0173] It is understandable that, since the display area of ​​the first window occupies a portion of the screen, the area of ​​the first window is smaller than the area of ​​the screen, and therefore the scaling ratio of the first window relative to the screen is less than 1.

[0174] In some embodiments, the actual display size of the first system control includes an actual width and an actual height. The default display size of the first system control includes a preset width and a preset height. The actual width is the product of the preset width and the scaling ratio, and the actual height is the product of the preset height and the scaling ratio.

[0175] For ease of understanding, let's take Figure 8 as an example, where (a) in Figure 8 shows a schematic diagram of the first system control adapting to the screen according to the default display size, and (b) in Figure 8 shows a schematic diagram of the first system control adapting to the first window according to the actual display size. The position of the first window on the screen and the size of the first window shown in (a) in Figure 8 are consistent with the position of the first window on the screen and the size of the first window shown in (b) in Figure 8.

[0176] Referring to FIG8 (a), the default display size of the first system control includes a preset width T and a preset height G. Referring to FIG8 (b), the actual display size of the first system control includes an actual width t and an actual height g. The actual width t is the product of the preset width T and the above-determined scaling ratio, and the actual height g is the product of the preset height G and the above-determined scaling ratio.

[0177] That is to say, when the zoom ratio and the preset display size of the first system control are known, the actual width of the first system control when displayed in the first window can be obtained by using (preset width T*zoom ratio), and the actual height of the first system control when displayed in the first window can be obtained by using (preset height G*zoom ratio).

[0178] In this way, when the first application calls the first system control, the size of the first system control changes with the size of the first window. The first system control is scaled down according to the same scaling ratio, which ensures that the first system control can be displayed within the display area of ​​the first window without exceeding the display area of ​​the first window.

[0179] In some embodiments, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the first window as the origin. The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin. The first horizontal coordinate is the product of the second horizontal coordinate and the scaling factor, and the first vertical coordinate is the product of the second vertical coordinate and the scaling factor.

[0180] For ease of understanding, let's take Figure 8 as an example, where (a) in Figure 8 shows a schematic diagram of the first system control adapting to the screen according to the default display position, and (b) in Figure 8 shows a schematic diagram of the first system control adapting to the first window according to the actual display position. The position of the first window on the screen and the size of the first window shown in (a) in Figure 8 are consistent with the position of the first window on the screen and the size of the first window shown in (b) in Figure 8.

[0181] Referring to (a) in Figure 8, the coordinates of the preset display position of the first system control can be based on the upper left corner A of the screen as the origin. The origin A is the positive axis of the X axis to the right, and the origin A is the positive axis of the Y axis downward, so the two-dimensional coordinates of point A in the coordinate system based on the screen (hereinafter referred to as the second coordinate system for the convenience of description) are (0,0). Generally, in a specific implementation, the position of the first system control can be represented by the coordinates of a point on the first system control. Exemplarily, the upper left corner C of the first system control represents the preset display position of the first system control. Accordingly, the preset display position of the first system control can include a second horizontal coordinate and a second vertical coordinate, that is, the coordinates of point C in the second coordinate system are (second horizontal coordinate, second vertical coordinate).

[0182] Referring to (b) in Figure 8 , the coordinates of the actual display position of the first system control can be based on the upper left corner B of the first window as the origin. The origin B is the positive axis of the X axis to the right, and the origin B is the positive axis of the Y axis downward, so the two-dimensional coordinates of point B in the coordinate system based on the first window (hereinafter referred to as the first coordinate system for the convenience of description) are (0,0). Similarly, the upper left corner D of the first system control represents the actual display position of the first system control. Accordingly, the actual display position of the first system control can include a first horizontal coordinate and a first vertical coordinate, that is, the coordinates of point D in the first coordinate system are (first horizontal coordinate, first vertical coordinate). The first horizontal coordinate is the product of the second horizontal coordinate and the scaling ratio determined above, and the first vertical coordinate is the product of the second vertical coordinate and the scaling ratio determined above.

[0183] That is to say, when the zoom ratio and the preset display position of the first system control are known, the horizontal coordinate of the first system control when it is displayed in the first window can be obtained by using (the second horizontal coordinate * the zoom ratio), and the vertical coordinate of the first system control when it is displayed in the first window can be obtained by using (the second vertical coordinate * the zoom ratio).

[0184] In this embodiment, the coordinates of point C are based on the upper left corner of the screen. The second horizontal coordinate and the second vertical coordinate represent the distance between point C and the long side of the screen, and the distance between point C and the short side of the screen, respectively. When the second horizontal coordinate and the second vertical coordinate are multiplied by the scaling factor, the distances will shrink synchronously with the first window when the first window is scaled down relative to the screen. This ensures that the scaled-down first system control can be fully displayed within the first window without exceeding the display area of ​​the first window.

[0185] In the implementation of this application, the point on the first system control used to indicate the position of the first system control can be called a reference point. Figure 8 uses the upper left corner of the first system control as an example for illustration. In other embodiments, the reference point can be any point on the first system control, such as the upper right corner, lower left corner, lower right corner, or center point of the first system control, and this embodiment of the application is not limited to this.

[0186] In some embodiments, the actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the screen as the origin. The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin. The coordinates of the upper left corner of the first window include a third horizontal coordinate and a third vertical coordinate with the upper left corner of the screen as the origin. The first horizontal coordinate is the product of the second horizontal coordinate and the scaling ratio plus the third horizontal coordinate, and the first vertical coordinate is the product of the second vertical coordinate and the scaling ratio plus the third vertical coordinate.

[0187] For ease of understanding, still taking Figure 8 as an example, any window, control, etc. displayed on the screen are in the same coordinate system. The coordinate system can be a screen coordinate system, that is, the upper left corner A of the screen is the origin, the right of the origin A is the positive axis of the X axis, and the downward direction of the origin A is the positive axis of the Y axis. Referring to (a) in Figure 8, the coordinates of point A are (0,0), the coordinates of point B in the upper left corner of the first window are (third horizontal coordinate, third vertical coordinate), the preset display position of the first system control is represented by its upper left corner C, and the coordinates of point C are (second horizontal coordinate, second vertical coordinate), and the actual display position of the first system control is represented by its scaled upper left corner D, and the coordinates of point D are (first horizontal coordinate, first vertical coordinate). Then, the first horizontal coordinate can be obtained by using (second horizontal coordinate * scaling ratio + third horizontal coordinate), and the first vertical coordinate can be obtained by using (second vertical coordinate * scaling ratio + third vertical coordinate).

[0188] The display position of the first system control follows the position change of the first window, which can ensure that the first system control is completely displayed in the display area of ​​the first window.

[0189] FIG9 shows a schematic diagram of a user interface provided in an embodiment of the present application.

[0190] As shown in (a) in Figure 9, the application displayed in window 401 is a windowed application, which is displayed floating above another full-screen window 403. When the user operates the windowed application, for example, clicking the back key, the windowed application will call the system Dialog control 402, prompting the user to "click the back key again to switch to the desktop". The electronic device executes the control display method provided in the embodiment of the present application, so that the Dialog control 402 is displayed in the middle position of the window 401 and does not exceed the display area of ​​​​the window 401. At this time, the actual display position and actual display size of the Dialog control 402 are adapted to the window 401, which is used to remind the user that the application in the window 401 is to switch to the desktop, rather than being located in the middle position of the screen as shown in (a) in Figure 6.

[0191] As shown in (b) in Figure 9, the applications displayed in window 404 and window 405 are all windowed applications. Specifically, the two windowed applications are split-screen display applications. Window 404 and window 405 form a top-bottom split-screen form, and the display area of ​​window 405 is larger than the display area of ​​window 404. When the user operates the windowed application in window 404, for example, clicking the return key, the windowed application calls the system Dialog control 406, prompting the user to "click the return key again to switch to the desktop." The electronic device executes the control display method provided in the embodiment of the present application so that the Dialog control 406 is displayed in the middle of window 404 and does not exceed the display area of ​​window 404. At this time, the actual display position and actual display size of the Dialog control 406 are adapted to window 404, which is used to remind the user that the application in window 404 is to switch to the desktop, rather than being located in the middle of the screen as shown in (b) in Figure 6.

[0192] In some embodiments, before step S320, method 300 may further include the following steps S1 to S5:

[0193] S1. The electronic device receives a user's operation on a first application.

[0194] Exemplarily, this step may be performed by an input module in the electronic device. Specifically, a sensor module in the HAL layer may recognize the user's actions.

[0195] S2: The electronic device determines, based on the operation, that the first application calls the first system control.

[0196] S3: The electronic device determines that the first application is a windowed application according to the size of the first window.

[0197] Here, the electronic device determines whether the first system control is displayed in a manner adapted to the screen or in a manner adapted to the window. When the electronic device determines that the first application is a windowed application, the first system control may be displayed in a manner adapted to the first window. If the first application is a full-screen application, the first system control may be displayed in a manner adapted to the screen.

[0198] S4. The electronic device determines a zoom ratio according to the size of the first window and the size of the screen.

[0199] In this step, the method for determining the scaling ratio can be referred to the previous description and will not be repeated here for the sake of brevity. In a specific implementation, this step can be implemented by the window management service WMS in the application framework layer as shown in Figure 2. The WMS can obtain the size of the first window and the size of the screen, and thus can determine the scaling ratio of the first window relative to the screen according to the aforementioned method.

[0200] S5. Based on the scaling ratio, update the default display position and the default display size of the first system control to obtain the actual display position and the actual display size of the first system control.

[0201] In this step, the method for calculating the actual display position and actual display size of the first system control can be referred to the previous description and will not be repeated here for the sake of brevity. In a specific implementation, this step can be implemented by the window management service WMS in the application framework layer as shown in Figure 2. The WMS can update the actual display position and actual display size of the first system control based on the scaling ratio and the default display position and default display size of the first system control, and display them in the display area of ​​the first window.

[0202] In some embodiments, the first system control is any one of the following controls: a message prompt box, a system dialog box, an error pop-up box, a floating box, an input method window, and a system status bar.

[0203] In some embodiments, the Z-order value of the first system control is greater than or equal to 2000 and less than or equal to 2999.

[0204] In some embodiments, the Z-order value of the first window is greater than or equal to 1 and less than or equal to 99.

[0205] Figure 10 shows a schematic flow chart of a control display method provided by an embodiment of the present application. The method 500 shown in Figure 10 is a specific example of the method 300. As shown in Figure 10, the method 500 may include steps S501 to S510.

[0206] S501, start.

[0207] In this step, the electronic device may display an application window on the screen, for example, a window of the first application, ie, the aforementioned first window.

[0208] S502, applying and adding controls.

[0209] For example, the application may add a control in response to a user operation on the first application, for example, the application receives an instruction to add a control. Adding a control here may be understood as displaying a control in the display area of ​​the application window.

[0210] In this step, the application can add system controls or custom controls.

[0211] S503, determining whether it is added by the system.

[0212] That is, the electronic device determines whether the control added by the application is a system control.

[0213] If not, step S506 is executed to control the layout of the controls according to the default display position and default display size.

[0214] If so, execute step S504.

[0215] S504: Determine whether the application is a windowed application.

[0216] That is, the electronic device determines whether the system control may exceed the window display area when the application calls the system control.

[0217] If not, step S507 is executed to control the control system controls to adapt the screen according to the default display position and default display size.

[0218] If so, execute step S505.

[0219] S505: Determine whether the application window is minimized.

[0220] That is, the electronic device needs to determine whether the system controls need to be displayed on the screen.

[0221] If so, step S508 is executed to control the system control to adapt the screen according to the default display position and default display size.

[0222] If not, execute step S509.

[0223] S509: Control the control system to adapt the window according to the actual display position and the actual display size.

[0224] That is, when the application window is displayed on the screen and the application is a windowed application, the control system controls the window. The method for determining the actual display position and actual display size of the system control can refer to the relevant description of the aforementioned method 300, which is not repeated here for brevity.

[0225] S510, layer synthesis.

[0226] In this step, the electronic device can perform layer synthesis according to the process shown in Figure 5. The process of layer synthesis is the same as that of the existing solution and will not be described in detail here.

[0227] S511, the layer is sent for display.

[0228] In this step, the electronic device sends the synthesized layer to the display screen for display. When the application window is displayed on the screen, the controls added by the application can be seen by the user.

[0229] S512, end.

[0230] In some embodiments, steps S503 to S509 may be performed by a window management service (WMS). Steps S510 and S511 may be performed by a SurfaceFlinger service. Specifically, the SurfaceFlinger service mixes the contents of multiple layers according to z-order and outputs them for display.

[0231] It should be noted that steps S503, S504, and S505 can be executed simultaneously or one after another, and this embodiment of the present application does not limit this.

[0232] Figure 11 shows a schematic flow chart of a control display method provided by an embodiment of the present application. The method is applied to an electronic device, which may be, for example, the electronic device 100 shown in Figure 1. As shown in Figure 11, method 600 includes steps S610 to S620.

[0233] S610, displaying a first window, where the first window is used to display a first application, and an area of ​​the first window is smaller than an area of ​​the screen, and the first window corresponds to a first virtual screen, wherein a size and position of the first virtual screen are consistent with a size and position of the first window.

[0234] Here, the first virtual screen is created when the first application is created. The first virtual screen is identical to the first window in position and size.

[0235] S620, in response to the user's operation on the first application, displaying the first system control in the display area of ​​the first window, wherein the first system control is displayed according to a default display position and a default display size, and the default display position and default display size of the first system control are adapted to the first virtual screen.

[0236] In an embodiment of the present application, when creating the first application, a virtual screen, namely the first virtual screen, can be created accordingly. In this way, the windowed application can be implemented based on the first virtual screen, and accordingly, the system controls can be adapted based on the size of the first virtual screen, rather than based on the actual screen size of the electronic device. In this way, the default display position and default display size of the system controls are adapted to the first virtual screen, that is, to the first window. Therefore, the system controls will not exceed the display area of ​​the first window, thereby improving the user experience.

[0237] Figure 12 shows a schematic diagram of a control display method provided by an embodiment of the present application. As shown in Figure 12, the outermost box represents the screen size of the electronic device. In the process of applying the method 600 shown in Figure 11, each windowed application created on the system side can be implemented based on a virtual screen. That is, each time a windowed application is created, a virtual screen of corresponding size and position is created. For example, an application 1 window, an application 2 window, and an application 3 window are created on the screen of the electronic device. Accordingly, the electronic device also creates a virtual screen 1 corresponding to the application 1 window, a virtual screen 2 corresponding to the application 2 window, and a virtual screen 3 corresponding to the application 3 window. In this way, the system control 1 called by the application 1 window is implemented based on the virtual screen 1, and its size and position are adapted to the virtual screen 1; the system control 2 called by the application 2 window is implemented based on the virtual screen 2, and its size and position are adapted to the virtual screen 2; the system control 3 called by the application 3 window is implemented based on the virtual screen 3, and its size and position are adapted to the virtual screen 3. The system controls called by windowed applications are not adapted based on the size and position of the actual outermost screen, but are adapted based on the size and position of the virtual screen adapted to the window. The system controls will not be offset, which prevents the system controls from exceeding the actual display area of ​​the corresponding window when displayed, improving the user experience.

[0238] In some embodiments, the system controls mentioned above may be message prompt boxes, system dialog boxes, error pop-up boxes, floating boxes, input method windows, system status bars, and the like.

[0239] Of course, in some embodiments, the above-mentioned system controls may not include a floating box. The floating box can also be called a floating window pop-up box, and its type is usually expressed as TYPE_SYSTEM_OVERLAY. Figure 13 shows a schematic diagram of the setting position of the floating box and a schematic diagram of the user interface. As shown in Figure 13, the system control 702 is an example of a floating box, and the floating box is generally displayed on the left or right side of the screen and suspended on the window (such as window 701). Since the window type of type TYPE_SYSTEM_OVERLAY is a floating control, it is itself provided by the system to third-party applications to achieve a floating effect, that is, the floating control itself needs to be suspended on the screen, so the floating control does not need to follow the size and position of the application window.

[0240] In some embodiments, when three parties need to add a control and the type of the control is not a floating control, and the application window is not minimized, the control display method provided in the application embodiment can be executed to make the system control to be added follow the size and position of the application window.

[0241] The above, combined with Figures 7 to 13, focuses on describing the control display method applied to system controls. When a windowed application calls a system control, the size and position of the control can be updated according to the proportion of the application window so that the position of the system control does not exceed the actual display area of ​​the window.

[0242] In other embodiments, the control display method provided in the embodiments of the present application can also be applied to custom controls. As mentioned above, custom controls support applications setting their position on the screen or their display position in a window. However, most applications specify the position of custom controls on the screen based on the full-screen adaptation angle, without considering the windowed display effect, resulting in display anomalies.

[0243] For example, for a certain custom control, the developer can specify the type and position of the control in the code field during the application development phase, where the position of the control can be represented by coordinates. In some cases, the position of the control specified by the developer is adapted to the full screen, so that the horizontal and vertical coordinates corresponding to the control are fixed values, such as the horizontal coordinate is 100 and the vertical coordinate is 300. In this way, the control position specified by the application can only be adapted to the full screen, and cannot be adapted to the window. Therefore, when the windowed application actively calls the custom control, it may cause the display position parameters of the custom control to be abnormal. For example, the coordinates of the custom control are not adapted according to the actual size area of ​​the window, resulting in the coordinates exceeding the display area of ​​the window. In this way, the position of the control will also exceed the display area of ​​the window, affecting the user experience.

[0244] For example, as shown in Figure 14, when an electronic device is projected onto a display or an electronic device with a larger screen size is used, multiple windowed applications (such as floating display applications) may be open on the screen, such as window 801 and window 802 shown in Figure 14. When the application in window 801 needs to call custom control 803, since the display position of custom control 803 is fixed relative to the screen, the position of control 803 will exceed the display area of ​​window 801. The user cannot tell which application popped up the content, which greatly affects the user experience.

[0245] Therefore, the control display method provided in the embodiment of the present application is also applicable to custom controls with fixed display positions. For example, as shown in Figure 15, when applied to the control display method provided in the present application, custom control 803 changes with window 801 and is displayed within the display area of ​​window 801.

[0246] The process of applying the control display method provided in the embodiment of the present application to a custom control is similar to the process of applying the control display method introduced above to a system control. It is only necessary to replace the corresponding system control with a custom control. For details, please refer to the relevant description above. This is just an introduction and will not be repeated here.

[0247] To sum up, in scenarios where windowed applications actively call system controls, or where the size and position of application-defined controls exceed the actual display area of ​​the window, resulting in abnormal control position and size, the control display method provided in this application can be used to achieve control position compatibility, thereby improving the user experience.

[0248] The control display method provided in the embodiment of the present application is mainly implemented by the window management service in the electronic device, so that the size and position of the control can be adjusted at the system level, solving the problem that the control cannot adapt to windowed applications.

[0249] It should be understood that the embodiments of this application are only The control display method provided by the present application can also be applied to other operating systems such as Hongmeng system, etc. For different operating systems, the window management mechanism may be different, but as long as there is a problem that the position and size of the control cannot adapt to the windowed scene, the control display method provided by this application can be applied.

[0250] The control display method provided by the embodiment of the present application is described in detail above in conjunction with Figures 1 to 15. The device embodiment of the present application will be described in detail below in conjunction with Figures 16 and 17. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment. Therefore, for parts not described in detail, reference can be made to the above method embodiment.

[0251] Figure 16 shows a schematic structural diagram of a device provided in an embodiment of the present application. The device 900 can be located in the electronic device 100 shown in Figure 1 or be a specific example of the electronic device 100. The device 900 can perform each step of the method shown in Figure 7 or 11, and can specifically implement the embodiments shown in Figures 8-10, 12, and 15. To avoid redundancy, the description will not be repeated.

[0252] As shown in FIG. 16 , the apparatus 900 may include a display unit 910 and a processing unit 920 .

[0253] The display unit 910 can be used to execute steps S310 and S320 in the method 300, or execute steps S610 and S620 in the method 600. The display unit 910 is used to execute display-related steps such as displaying windows, displaying application interfaces, and displaying controls.

[0254] The processing unit 920 can be used to execute steps S503 to S511 in the method 500. The processing unit 920 is mainly used to execute steps related to control processing, layer synthesis, and layer display.

[0255] FIG17 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 1000 shown in FIG17 may be a specific example of the electronic device 100 in FIG1 .

[0256] The electronic device 1000 shown in FIG17 includes a memory 1010, a processor 1020, and a bus 1030. The memory 1010 and the processor 1020 are communicatively connected to each other via the bus 1030.

[0257] The memory 1010 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1010 may store programs. When the program stored in the memory 1010 is executed by the processor 1020, the processor 1020 is configured to execute the various steps of the control display method according to the embodiment of the present application.

[0258] The processor 1020 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to execute the control display method of the embodiment of the present application.

[0259] The processor 1020 may also be an integrated circuit chip with signal processing capabilities. During implementation, the various steps of the control display method of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 1020. The aforementioned processor 1020 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or the like. The storage medium is located in the memory 1010, and the processor 1020 reads the information in the memory 1010 and executes the control display method of the embodiment of the present application in combination with its hardware.

[0260] In some embodiments, the electronic device 1000 further includes a communication interface 1040. The communication interface 1040 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the electronic device 1000 and other devices or a communication network.

[0261] The bus 1030 may include a path for transmitting information between various components of the electronic device 1000 (eg, the memory 1010 , the processor 1020 , and the communication interface 1030 ).

[0262] An embodiment of the present application also provides an electronic device, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs including instructions, which, when executed by the one or more processors, enable the electronic device to execute the various steps or specific embodiments of the methods shown in Figures 7 to 13 and 15.

[0263] An embodiment of the present application also provides a readable storage medium including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes each step or specific embodiment of the method shown in Figures 7 to 13 and 15.

[0264] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0265] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0266] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0267] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0268] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0269] If the functions are implemented in the form of 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 the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0270] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A control display method, characterized in that: Applied to an electronic device including a screen, the method includes: Displaying a first window, where the first window is used to display a first application, and an area of ​​the first window is smaller than an area of ​​the screen; In response to a user operation on the first application, displaying a first system control in a display area of ​​the first window; Among them, the actual display position and actual display size of the first system control are determined according to the default display position and default display size of the first system control and the scaling ratio of the first window relative to the screen. The actual display position and actual display size of the first system control are adapted to the first window, and the default display position and default display size of the first system control are adapted to the screen.

2. The method according to claim 1, characterized in that The scaling ratio of the first window relative to the screen is a first ratio or a second ratio, wherein the first ratio is the ratio between the long side length of the first window and the long side length of the screen, and the second ratio is the ratio between the short side length of the first window and the short side length of the screen.

3. The method according to claim 2, characterized in that When the first ratio is not equal to the second ratio, the zoom ratio of the first window relative to the screen is a smaller value between the first ratio and the second ratio.

4. The method according to any one of claims 1 to 3, characterized in that The actual display size of the first system control includes an actual width and an actual height; The default display size of the first system control includes a preset width and a preset height; The actual width is the product of the preset width and the scaling ratio, and the actual height is the product of the preset height and the scaling ratio.

5. The method according to any one of claims 1 to 4, characterized in that The actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the first window as the origin; The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; The first horizontal coordinate is the product of the second horizontal coordinate and the scaling ratio, and the first vertical coordinate is the product of the second vertical coordinate and the scaling ratio.

6. The method according to any one of claims 1 to 4, characterized in that The actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the screen as the origin; The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; The coordinates of the upper left corner of the first window include a third horizontal coordinate and a third vertical coordinate with the upper left corner of the screen as the origin; The first horizontal coordinate is a value obtained by multiplying the second horizontal coordinate and the scaling ratio by the third horizontal coordinate, and the first vertical coordinate is a value obtained by multiplying the second vertical coordinate and the scaling ratio by the third vertical coordinate.

7. The method according to any one of claims 1 to 6, characterized in that Before displaying the first system control in the display area of ​​the first window in response to the user's operation on the first application, the method further includes: receiving the operation of the first application by the user; determining, according to the operation, that the first application calls the first system control; determining, based on a size of the first window, that the first application is a windowed application; determining the scaling ratio according to the size of the first window and the size of the screen; Based on the scaling ratio, the default display position and the default display size of the first system control are updated to obtain the actual display position and the actual display size of the first system control.

8. The method according to any one of claims 1 to 7, characterized in that The first system control is any one of the following controls: a message prompt box, a system dialog box, a system warning prompt box, an error pop-up box, a floating box, an input method window, and a system status bar.

9. The method according to any one of claims 1 to 8, characterized in that The Z-order value of the first system control is greater than or equal to 2000 and less than or equal to 2999.

10. A control display method, characterized in that: Applied to an electronic device including a screen, the method includes: Displaying a first window, wherein the first window is used to display a first application, and the area of ​​the first window is smaller than the area of ​​the screen, and the first window corresponds to a first virtual screen, wherein the size and position of the first virtual screen are the same as the size and position of the first window. consistent settings; In response to the user's operation on the first application, a first system control is displayed in the display area of ​​the first window, wherein the first system control is displayed according to a default display position and a default display size, and the default display position and default display size of the first system control are adapted to the first virtual screen.

11. An electronic device, characterized in that: It includes a screen and a display unit, wherein the display unit is used to: Displaying a first window, where the first window is used to display a first application, and an area of ​​the first window is smaller than an area of ​​the screen; In response to a user operation on the first application, displaying a first system control in a display area of ​​the first window; Among them, the actual display position and actual display size of the first system control are determined according to the default display position and default display size of the first system control and the scaling ratio of the first window relative to the screen. The actual display position and actual display size of the first system control are adapted to the first window, and the default display position and default display size of the first system control are adapted to the screen.

12. The electronic device according to claim 11, wherein: The scaling ratio of the first window relative to the screen is a first ratio or a second ratio, wherein the first ratio is the ratio between the long side length of the first window and the long side length of the screen, and the second ratio is the ratio between the short side length of the first window and the short side length of the screen.

13. The electronic device according to claim 12, wherein: When the first ratio is not equal to the second ratio, the zoom ratio of the first window relative to the screen is a smaller value between the first ratio and the second ratio.

14. The electronic device according to any one of claims 11 to 13, characterized in that: The actual display size of the first system control includes an actual width and an actual height; The default display size of the first system control includes a preset width and a preset height; The actual width is the product of the preset width and the scaling ratio, and the actual height is the product of the preset height and the scaling ratio.

15. The electronic device according to any one of claims 11 to 14, characterized in that: The actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the first window as the origin; The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; The first horizontal coordinate is the product of the second horizontal coordinate and the scaling ratio, and the first vertical coordinate is the product of the second vertical coordinate and the scaling ratio.

16. The electronic device according to any one of claims 11 to 14, characterized in that: The actual display position of the first system control includes a first horizontal coordinate and a first vertical coordinate with the upper left corner of the screen as the origin; The preset display position of the first system control includes a second horizontal coordinate and a second vertical coordinate with the upper left corner of the screen as the origin; The coordinates of the upper left corner of the first window include a third horizontal coordinate and a third vertical coordinate with the upper left corner of the screen as the origin; The first horizontal coordinate is a value obtained by multiplying the second horizontal coordinate and the scaling ratio by the third horizontal coordinate, and the first vertical coordinate is a value obtained by multiplying the second vertical coordinate and the scaling ratio by the third vertical coordinate.

17. The electronic device according to any one of claims 11 to 16, characterized in that: The electronic device further includes a processing unit, which is configured to: receiving the operation of the first application by the user; determining, according to the operation, that the first application calls the first system control; determining, based on a size of the first window, that the first application is a windowed application; determining the scaling ratio according to the size of the first window and the size of the screen; Based on the scaling ratio, the default display position and the default display size of the first system control are updated to obtain the actual display position and the actual display size of the first system control.

18. The electronic device according to any one of claims 11 to 17, characterized in that: The first system control is any one of the following controls: a message prompt box, a system dialog box, a system warning prompt box, an error pop-up box, a floating box, an input method window, and a system status bar.

19. The electronic device according to any one of claims 11 to 18, characterized in that: The Z-order value of the first system control is greater than or equal to 2000 and less than or equal to 2999.

20. An electronic device, characterized in that: It includes a screen and a display unit, wherein the display unit is used to: Displaying a first window, where the first window is used to display a first application, an area of ​​the first window is smaller than an area of ​​the screen, the first window corresponds to a first virtual screen, and a size and position of the first virtual screen are consistent with a size and position of the first window; In response to the user's operation on the first application, a first system control is displayed in the display area of ​​the first window, wherein the first system control is displayed according to a default display position and a default display size, and the default display position and default display size of the first system control are adapted to the first virtual screen.

21. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer programs, which include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 10.

23. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 10.