Window display method, electronic device, and storage medium
Patent Information
- Application Number
- CN202110931557.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2041-08-13
AI Technical Summary
部分大屏的电子设备支持自由窗口(freeform)模式,在自由窗口模式下,通常采用窗口平铺策略将多个窗口(目前最多三个窗口)进行并列显示,例如在一个方向上排列显示,这就意味着其中一个窗口的创建、隐藏必然导致其它窗口的移动和挤压
Smart Images

Figure CN115705126B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a window display method, electronic device and storage medium. Background Technology
[0002] With the continuous development of electronic devices, screens are becoming larger to provide users with richer information and a better user experience. Some large-screen electronic devices support freeform mode. In freeform mode, a window tiling strategy is usually used to display multiple windows (currently a maximum of three windows) side by side, such as arranged in one direction. This means that the creation or hiding of one window will inevitably cause other windows to move and be squeezed.
[0003] In related technologies, multi-window frameworks manage windows using an activity stack. The same application can create multiple activity stacks and display multiple activity stack windows on the screen. This results in different interfaces of the same application being displayed in different windows, leading to blank windows and transparent windows on the screen, resulting in poor display quality. Summary of the Invention
[0004] In view of this, embodiments of this application propose a window display method, an electronic device, and a storage medium. Embodiments of this application, by allowing multiple free windows of the same application to share the same position on the same screen in free window mode, improve the regularity and simplicity of the window display method and ensure the display effect in free window mode.
[0005] In a first aspect, embodiments of this application provide a window display method, the method comprising:
[0006] In free window mode, the first free window of the first application is displayed on the target local area of the screen;
[0007] When the window to be displayed is the second free window of the first application, a second interface is displayed on the target local area, and the second interface is the application interface corresponding to the second free window.
[0008] In this implementation, in free window mode, the first free window of the first application is displayed on the target local area of the screen. When the window to be displayed is the second free window of the first application, since the second free window and the first free window are different free windows of the same application, the interfaces of the two free windows can share the same position on the same screen. That is, the application interface corresponding to the second free window, i.e., the second interface, can be displayed on the target local area. This avoids the layout chaos caused by displaying different interfaces of the same application on different windows in free window mode in related technologies, improves the regularity and simplicity of window display, and ensures the display effect in free window mode.
[0009] In one possible implementation, displaying the second interface on the target local area when the window to be displayed is a second free window of the first application includes:
[0010] When the window to be displayed is the second free window of the first application and the second free window is a transparent window, the second interface is overlaid on the first free window in the target local area.
[0011] In this implementation, when the second free window of the first application to be displayed is a transparent window, the second interface is superimposed on the first free window in the target local area. That is, at this time, the target local area of the screen displays: the first free window and the second interface superimposed on the first free window, which further improves the regularity of the window display method.
[0012] In another possible implementation, displaying the second interface on the target local area when the window to be displayed is the second free window of the first application includes:
[0013] When the window to be displayed is the second free window of the first application and the second free window is a non-transparent window, the first free window is switched to be displayed as the second free window in the target local area, and the second free window is used to display the second interface.
[0014] In this implementation, when the second free window of the first application to be displayed is a non-transparent window, the first free window is switched to be displayed as the second free window in the target local area. That is, at this time, the target local area of the screen displays the second free window including the second interface, which further improves the simplicity of the window display method.
[0015] In another possible implementation, displaying a first free window of the first application on a target local area of the screen in free window mode includes:
[0016] In the free window mode, when the first active stack of the first application is created, a stack group with the same process identification information as the first active stack is searched.
[0017] When no stack group with the same process identification information as the first active stack is found, the first free window corresponding to the first active stack is displayed on the target local area of the screen;
[0018] The method further includes:
[0019] Create a first stack group that includes the first active stack, and set the process identification information of the first stack group.
[0020] In this implementation, in free window mode, when the first active stack of the first application is created, a stack group with the same process identification information as the first active stack is searched. If no such stack group is found, the first free window corresponding to the first active stack is displayed on the target local area of the screen. A first stack group including the first active stack is created, and the process identification information of the first stack group is set so that the first active stack can share the same position on the same screen with other active stacks of the first application, thus ensuring the executability of the window display method in free window mode.
[0021] In another possible implementation, displaying the second interface on the target local area when the window to be displayed is the second free window of the first application includes:
[0022] When the second activity stack of the first application is created, look for the stack group that has the same process identification information as the second activity stack;
[0023] When the first stack group with the same process identification information as the second active stack is found, the second interface corresponding to the second active stack is displayed on the target local area corresponding to the first stack group.
[0024] In this implementation, when the second active stack of the first application is created, a stack group with the same process identification information as the second active stack is searched. If found, the second interface corresponding to the second active stack is displayed on the target local area corresponding to the first stack group. This realizes a solution where the interfaces of multiple free windows of the same application can share the same position on the same screen when windows are managed in the way of active stack, further ensuring the display effect in free window mode.
[0025] In another possible implementation, the method further includes:
[0026] When the second free window corresponding to the second activity stack is a transparent window, the page task of the second activity stack is moved to the target activity stack, which is the activity stack currently at the top of the first stack group.
[0027] In this implementation, when the second free window corresponding to the second activity stack is a transparent window, the page task of the second activity stack is moved to the target activity stack, thus realizing a multi-stack merging management scheme for the same application and ensuring the display effect of the second interface being superimposed on the first free window in the target local area.
[0028] In another possible implementation, the method further includes:
[0029] When the second free window corresponding to the second active stack is a non-transparent window, the second active stack is moved to the top of the first stack group, and the state of the other active stacks is set to invisible. The other active stacks are the other active stacks in the first stack group other than the second active stack.
[0030] In this implementation, when the second free window corresponding to the second active stack is a non-transparent window, the second active stack is moved to the top of the first stack group, and the states of other active stacks are set to invisible. This implements a multi-stack merging management scheme for the same application, ensuring the display effect of the second free window switching display in the target local area.
[0031] Secondly, embodiments of this application provide an electronic device, the electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the window display method provided by the first aspect or any possible implementation thereof when executing the instructions.
[0032] Thirdly, embodiments of this application provide a non-volatile computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the window display method provided by the first aspect or any possible implementation of the first aspect.
[0033] Fourthly, embodiments of this application provide a window display device, the device comprising at least one unit, the at least one unit being used to implement the window display method provided by the first aspect or any possible implementation of the first aspect.
[0034] Fifthly, embodiments of this application provide a computer program product comprising computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code is executed in an electronic device, the processor in the electronic device executes the window display method provided by the first aspect or any possible implementation thereof. Attached Figure Description
[0035] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this application together with the specification and serve to explain the principles of this application.
[0036] Figure 1 A schematic diagram of an interface related to a window display method provided by an exemplary embodiment in the related art is shown.
[0037] Figure 2 A schematic diagram of an interface related to a window display method provided by an exemplary embodiment in the related art is shown.
[0038] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0039] Figure 4 The diagram shows a software structure block diagram of an electronic device provided by an embodiment of this application.
[0040] Figure 5 A flowchart illustrating a window display method provided in an exemplary embodiment of this application is shown.
[0041] Figure 6 A flowchart of a window display method provided by another exemplary embodiment of this application is shown.
[0042] Figure 7 A schematic diagram of the interface involved in the window display method provided by an exemplary embodiment of this application is shown.
[0043] Figure 8 A schematic diagram of the interface involved in the window display method provided by another exemplary embodiment of this application is shown.
[0044] Figure 9 A flowchart illustrating an exemplary embodiment of the present application shows a method for processing an activity stack.
[0045] Figure 10 A flowchart illustrating a method for processing an activity stack provided in another exemplary embodiment of this application is shown.
[0046] Figure 11 A flowchart of a window display method provided by another exemplary embodiment of this application is shown.
[0047] Figure 12 A block diagram of a window display apparatus provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0048] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0049] In this application embodiment, " / " can indicate that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" can be used to describe three relationships between the related objects. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. A and B can be singular or plural. To facilitate the description of the technical solutions of this application embodiment, the terms "first" and "second" can be used to distinguish technical features with the same or similar functions. The terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different. In this application embodiment, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" should not be construed as being more preferred or advantageous than other embodiments or design schemes. The use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner for ease of understanding.
[0050] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0051] First, a brief introduction to some concepts involved in the embodiments of this application will be given.
[0052] 1. Multi-window technology refers to the technology that allows an operating system to display multiple applications simultaneously in multiple windows. Multi-window technology mainly manifests as: split-screen mode, picture-in-picture mode, and free-form window mode.
[0053] 2. Split-screen mode refers to dividing the screen into two display areas, a main screen and a secondary screen, and running different applications on the main screen and the secondary screen respectively.
[0054] 3. Picture-in-picture mode is a video content presentation method that refers to a mode in which one video is played in full screen while another video is played in a small area of the video screen at the same time.
[0055] 4. Free Window Mode displays multiple windows on the screen, and each window can be freely scaled and moved. In Free Window Mode, the interfaces of different applications can be displayed in different windows on the same screen. The interfaces of different applications can be presented to the user simultaneously, allowing the user to operate multiple applications without switching screens. The user can move and / or scale windows at any time as needed.
[0056] For current multi-window technology, mainstream operating systems include Android and iOS. These operating systems implement split-screen and picture-in-picture modes, with Android providing a mechanism to support free-form window mode. Android's multi-window framework manages windows using an activity stack, which can lead to the same application creating multiple activity stacks and displaying windows from these stacks on the screen. For example... Figure 1 As shown, the electronic device has created an activity stack 1 for application A and an activity stack 2 for application B. It displays the window 11 of application A corresponding to activity stack 1 on a first partial area of screen 10, and a blank window 12 of application B corresponding to activity stack 2 on a second partial area of screen 10. When activity stack 3 for application B is created, the electronic device automatically shrinks and moves the window 11 of application A and the blank window 12 of application B, and displays the main window 13 of application B corresponding to activity stack 3 on a third partial area of screen 10. For example, as... Figure 2 As shown, the electronic device has created an activity stack 1 for application C and displays the main window 21 of application C corresponding to activity stack 1 on the first partial area of screen 20. When activity stack 2 for application C is created, the electronic device automatically shrinks and moves the main window 21 and displays the transparent privacy protocol window 22 of application C corresponding to activity stack 2 on the second partial area of screen 20. In this type of scenario, different interfaces of the same application may be displayed in different windows on the same screen, resulting in inconsistent window display methods for multiple activity stacks and poor display quality.
[0057] In view of this, embodiments of this application provide a window display method, an electronic device, and a storage medium. By allowing the interfaces of multiple free windows of the same application to share the same position on the same screen in free window mode, the layout chaos caused by displaying different interfaces of the same application on different windows in related technologies is avoided, thereby improving the regularity and simplicity of the window display method and ensuring the display effect in free window mode.
[0058] The window display method provided in this application is based on free-window technology, which can be implemented solely through software without relying on specific hardware. This free-window technology enables multi-window display and interaction, and can be applied to operating systems of various types of electronic devices. This technology is suitable for large-screen scenarios, as it fully utilizes the screen resources by displaying multiple applications in free-window mode on a large screen. Furthermore, each application window can be moved freely, facilitating user operation. Additionally, each application window can be freely scaled, stretched horizontally, vertically, and diagonally, allowing the size of each window to be freely changed. Moreover, developers can set the application's launch mode to free-window mode by default, enabling the application to automatically launch in free-window mode.
[0059] The above describes the application scenarios of the window display method provided in the embodiments of this application. The following is an exemplary description of the system architecture for implementing the window display method. Figure 3 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application is shown.
[0060] Electronic device 100 is a device with a screen, and may include at least one of the following: mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, laptop, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device, or smart city device. This application embodiment does not impose any special limitation on the specific type of electronic device 100.
[0061] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) connector 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0062] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0063] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0064] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. This memory can store instructions or data that the processor 110 has used or that are used frequently. If the processor 110 needs to use the instruction or data, it can directly retrieve it from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0065] In some embodiments, the processor 110 may include one or more interfaces. These 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, etc. The processor 110 can connect to modules such as touch sensors, audio modules, wireless communication modules, displays, and cameras through at least one of these interfaces.
[0066] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0067] Electronic device 100 can implement display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0068] Display screen 194 corresponds to the screen in this embodiment. Display screen 194 can be a large-screen display screen, used to display multiple applications, such as application icons or application windows. 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 LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or more display screens 194.
[0069] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phone book, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional methods or data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0070] Pressure sensor 180A is used to detect operation signals. For example, pressure sensor 180A senses pressure signals and converts them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation signals. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a signal to view the SMS message is executed. When a touch operation with a strength greater than or equal to the first pressure threshold is applied to the SMS application icon, a signal to create a new SMS message is executed.
[0071] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194, such as displaying the process of controlling an application according to operation instructions. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0072] The above examples illustrate the hardware architecture for implementing the window display method; the following examples illustrate the software architecture for implementing the window display method. For example... Figure 4 As shown in the diagram, this application provides a software architecture block diagram of an electronic device 100. The software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture operating system as an example to illustrate the software structure of the electronic device 100.
[0073] The software structure of the electronic device 100 may include at least: a window property definition unit 400, a property processing unit 401, a multi-window stack manager 402, and a window graphics transformation unit 403. The window property definition unit 400, the property processing unit 401, the multi-window stack manager 402, and the window graphics transformation unit 403 are all implemented in software.
[0074] In some possible embodiments, these software units can be executed by the processor of the electronic device, or by a combination of the processor and memory of the electronic device.
[0075] Figure 4 These components involve three layers of the operating system, from top to bottom: the application layer, the framework layer, and the graphical user interface subsystem.
[0076] The window characteristic definition unit 400 is a unit in the application layer of the operating system. It allows application developers to customize the application's free window characteristics and launch mode during development. Free window characteristics refer to the window range that the application can customize in free window mode. Application launch modes include full-screen mode, split-screen mode, picture-in-picture mode, and free window mode. Developers can choose the appropriate mode based on the application's business needs. If the application's launch mode is set to free window mode, the application will automatically launch in free window mode when the user triggers a launch operation.
[0077] The feature processing unit 401 is a unit in the framework layer of the operating system, used to parse the window features of the application when the application is launched. Optionally, when the user launches the application by clicking or by voice, the feature processing unit 401 will parse the application window features configured by the application developer in the free window mode, such as parsing the size and position of the window, and the feature processing unit 401 will update the values of these features in the window object corresponding to the window in the multi-window stack manager 402.
[0078] The multi-window stack manager 402 is a unit in the operating system's framework layer, used to implement multi-window display of applications. Furthermore, when application windows switch, the multi-window stack manager 402 also performs corresponding push and pop operations on the application, thereby scheduling application window switching. During operation, the multi-window stack manager 402 calls the window graphics transformation unit 403 to draw the interface during switching.
[0079] The window graphics transformation unit 403 is a unit in the graphical interface subsystem of the operating system. It is used to perform graphic transformations and other drawing tasks on the window when the application window undergoes transformation operations such as moving and scaling (including maximizing) in free window mode. The window graphics transformation unit 403 supports the display, movement, scaling, and full-screen operation of the application window.
[0080] The following describes the flow of the window display method provided in the embodiments of this application using several exemplary models.
[0081] Please refer to Figure 5 It illustrates a flowchart of a window display method provided in an exemplary embodiment of this application, in which the method is used for Figure 3 or Figure 4 The following example uses an electronic device. The method includes the following steps.
[0082] Step 501: In free window mode, display the first free window of the first application on the target local area of the screen.
[0083] Optionally, the current mode of the electronic device is free window mode, and after receiving the first trigger signal corresponding to the first application, the first free window of the first application is displayed on the target local area of the screen.
[0084] Optionally, the first trigger signal is a user operation signal acting on an application control of the first application. The application control is an operable control, and its type includes at least one of icons, buttons, operable items, and sliders. The first trigger signal is used to trigger the display of the first free window of the first application. The first trigger signal includes at least one of click signals, double-click signals, long-press signals, and swipe signals. The first trigger signal can also be implemented in the form of voice, which is not limited in this embodiment.
[0085] The first application can be: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a World Wide Web (web) browsing application, a calculator application, a shopping application, a music playback application, and / or a video playback application. This application does not limit the type of the first application.
[0086] The first free window is the free window of the first application. The free window is the truly active window, which not only includes all the characteristics of an active window, but can also be moved and / or scaled according to user operations, and is displayed on top of other application windows.
[0087] The first free window is used to display the first interface of the first application. Optionally, the first interface is the native page of the first application, which may include a blank interface of the first application, the main interface of the first application, or a sub-interface of the main interface of the first application. This application does not limit this aspect.
[0088] The target local area is a partial display area on the screen, meaning the size of the target local area is smaller than the screen size. This target local area can be a default setting or a custom setting. This application does not limit this.
[0089] Step 502: When the window to be displayed is the second free window of the first application, the second interface is displayed on the target local area. The second interface is the application interface corresponding to the second free window.
[0090] When the window to be displayed is the second free window of the first application, since the second free window and the first free window are different free windows of the same application, the interfaces of these two free windows can share the same position on the same screen, namely the target local area. The electronic device displays the second interface on the target local area. The second interface is different from the first interface; the first interface and the second interface are different interfaces within the first application.
[0091] Optionally, the second interface is either automatically displayed after the first interface of the first application is successfully displayed, or it is triggered to display based on a second trigger signal. Illustratively, the second trigger signal is a user operation signal applied to the first interface. The second trigger signal is used to trigger the display of the second interface. The description of the second trigger signal is analogous to the description of the first trigger signal and will not be repeated here.
[0092] It should be noted that the process by which the electronic device determines that the window to be displayed is the second free window of the first application can be referred to the relevant description in the following embodiments, and will not be introduced here.
[0093] In summary, the embodiments of this application, by displaying a first free window of a first application on a target local area of the screen in free window mode, and when the window to be displayed is a second free window of the first application, since the second free window and the first free window are different free windows of the same application, the interfaces of these two free windows can share the same position on the same screen, that is, the application interface corresponding to the second free window, i.e., the second interface, can be displayed on the target local area. This avoids the layout chaos caused by displaying different interfaces of the same application on different windows in free window mode in related technologies, improves the regularity and simplicity of the window display method, and ensures the display effect in free window mode.
[0094] Optionally, the second free window can be either a transparent window or an opaque window. A transparent window has a transparent background but opaque controls within the window, while an opaque window has both an opaque background and opaque controls within the window. In some possible embodiments, a transparent window may only display one or more of the title bar, border, and title.
[0095] In one possible implementation, the display method of the second interface corresponding to the second free window varies depending on the type of the second free window. That is, step 502 includes, but is not limited to, the following steps: Figure 6 As shown: Step 601, when the window to be displayed is the second free window of the first application, determine whether the second free window is a transparent window; Step 602, if the second free window is a transparent window, then overlay the second interface on the first free window in the target local area; Step 603, if the second free window is a non-transparent window, switch the first free window to be displayed as the second free window in the target local area, and the second free window is used to display the second interface.
[0096] Optionally, the electronic device obtains a first identifier of the second free window through a preset interface. The first identifier is used to indicate whether the second free window is a transparent window. For example, the preset interface is the Translucent interface.
[0097] Schematic illustration: when the first identifier is a first value, it indicates that the second free window is a transparent window; when the first identifier is a second value, it indicates that the second free window is a non-transparent window. For example, the first value is 1 and the second value is 0. This application does not limit this.
[0098] If the second free window is a non-transparent window, the first free window is switched to be displayed as the second free window in the target local area. The second free window is used to display the second interface. That is, at this time, the target local area of the screen displays the second free window, which includes the second interface.
[0099] In an illustrative example, such as Figure 7 As shown, the electronic device displays application A's window 71 on a first partial area of screen 70, and application B's blank window 72 on a second partial area of screen 70; when the window to be displayed is application B's main window (non-transparent window), the electronic device switches the display of application B's blank window 72 to application B's main window 73 on the second partial area of screen 70. (This is in relation to related technologies.) Figure 1Compared to the example shown, according to the window display method provided in the embodiments of this application, the interface of the blank window 72 of application B and the interface of the main window 73 can share the same position on the same screen, namely the second local area of screen 70. The blank window 72 of application B can be switched to be displayed as the main window 73 of application B, which further improves the regularity and simplicity of the window display method.
[0100] If the second free window is a transparent window, then the second interface is superimposed on the first free window in the target local area. That is, at this time, the target local area of the screen displays: the first free window including the first interface, and the second interface superimposed on the first free window.
[0101] In an illustrative example, such as Figure 8 As shown, the electronic device displays the main window 81 of application C on a first partial area of screen 80. When the window to be displayed is the transparent privacy protocol window (transparent window) of application C, the electronic device overlays the application interface corresponding to the transparent privacy protocol window on the main window 81 in the first partial area. This application interface has a transparent background but the privacy protocol controls 82 are opaque. (This is in contrast to related technologies.) Figure 2 Compared to the example shown, according to the window display method provided in the embodiments of this application, the interface of the main window 81 of application C and the interface of the transparent privacy protocol window can share the same position on the same screen, namely the first partial area of screen 80. The interface of the transparent privacy protocol window of application C can be superimposed on the main window 81 of application C, which further improves the regularity and simplicity of the window display method.
[0102] It should be noted that, since current operating systems manage windows using an active stack approach, the window display method provided in this application includes a multi-stack merging management scheme for the same application. For an active stack, the processing method includes, but is not limited to, the following steps: Figure 9 The following is stated:
[0103] Step 901: When the active stack is created, find the stack group that has the same process identification information as the active stack.
[0104] Optionally, the process identification information includes the process name (process_name). Alternatively, the process identification information includes both the process name and the process user ID (process_uid).
[0105] The process name is used to indicate the application. The process name can be the application's package name, and there is a one-to-one correspondence between the process name and the application. For example, process name 1 corresponds to application A, process name 2 corresponds to application B, and process name 3 corresponds to application C.
[0106] The process user identifier is used to indicate the user account logged into the application, and there is a one-to-one correspondence between the process user identifier and the user account. For example, process user identifier 1 corresponds to user account S1, process user identifier 2 corresponds to user account S2, and process user identifier 3 corresponds to user account S3.
[0107] Optionally, when a new active stack is created, the electronic device obtains the process identification information of the active stack and searches for stack groups with the same process identification information.
[0108] A stack group is a collection of active stacks with process identification information, and each stack group contains at least one active stack. The interfaces corresponding to the active stacks in the stack group share the same location on the same screen.
[0109] Step 902: Determine whether a stack group with the same process identification information as the active stack has been found.
[0110] The electronic device determines whether a stack group with the same process identification information as the active stack is found. If no stack group with the same process identification information as the active stack is found, step 903 is executed; if a stack group with the same process identification information as the active stack is found, step 904 is executed.
[0111] Step 903: If no stack group with the same process identification information as the active stack is found, create a stack group that includes the active stack and set the process identification information of the stack group.
[0112] If no stack group with the same process identifier information as the active stack is found, it means that there is no other active stack for the application corresponding to the active stack. The electronic device then creates a stack group that includes the active stack and sets the process identifier information of the stack group to the process identifier information of the active stack.
[0113] Step 904: If a stack group with the same process identification information as the active stack is found, the application interface corresponding to the active stack is displayed in the local area corresponding to the stack group.
[0114] If a stack group with the same process identifier information as the active stack is found, it means that there are other active stacks of the application corresponding to the active stack. In this case, the active stack can share the same position on the same screen with other active stacks of the same application. The electronic device merges the active stack into the stack group and displays the application interface corresponding to the active stack on the local area corresponding to the stack group.
[0115] It should be noted that the step of merging activity stacks can be performed before or after the step of displaying the application interface corresponding to the activity stack, and these two steps can also be performed in parallel. For ease of description, we will only use the example of merging the activity stack into the stack group after the electronic device displays the application interface corresponding to the activity stack in the local area corresponding to the stack group.
[0116] In one possible implementation, after the electronic device displays the application interface corresponding to the active stack on the local area corresponding to the stack group, the active stack is merged into the stack group. That is, after step 904 above, the following steps may also be included, such as... Figure 10 As shown:
[0117] Step 905: Determine whether the free window corresponding to the activity stack is a transparent window.
[0118] The electronic device determines whether the free window corresponding to the active stack is a transparent window. If the free window corresponding to the active stack is a transparent window, then step 906 is executed; if the free window corresponding to the active stack is a non-transparent window, then step 907 is executed.
[0119] Optionally, the electronic device obtains the first identifier of the free window corresponding to the activity stack through a preset interface. When the first identifier is a first value, it indicates that the free window is a transparent window; when the first identifier is a second value, it indicates that the free window is a non-transparent window. For example, the preset interface is the Translucent interface. Related details can be found by analogy to the relevant details in the above embodiments, and will not be repeated here.
[0120] Step 906: If the free window corresponding to the activity stack is a transparent window, then move the page task of the activity stack to the target activity stack, which is the activity stack currently at the top of the stack group.
[0121] Optionally, if the free window corresponding to the activity stack is a transparent window, the page task of the activity stack is moved to the target activity stack by repatenting.
[0122] Step 907: If the free window corresponding to the activity stack is a non-transparent window, then move the activity stack to the top of the stack group and set the state of other activity stacks in the stack group to invisible.
[0123] Among them, the other stacks are the active stacks in this stack group other than the active stack at the top of the stack.
[0124] Optionally, the activity stack can be either visible or invisible. The activity stack is set to visible by default. A visible activity stack indicates that the application interface corresponding to that activity stack is running in the foreground, while an invisible activity stack indicates that the application interface corresponding to that activity stack is running in the background.
[0125] Optionally, the electronic device can set the state of other active stacks in the stack group to an invisible state, including: the electronic device calling a preset function to set the state of other active stacks to an invisible state, and the free windows of other active stacks being retained in the background, that is, the electronic device can run the free windows of other active stacks in the background. For example, the preset function is the moveToBack function.
[0126] Based on the activity stack processing method described above, please refer to... Figure 11 It illustrates a flowchart of a window display method provided in another exemplary embodiment of this application, which is used in this embodiment for... Figure 3 or Figure 4 The following example uses an electronic device. The method includes the following steps.
[0127] Step 1101: When the first active stack of the first application is created, find the stack group that has the same process identification information as the first active stack.
[0128] Among them, the first activity stack is the activity stack corresponding to the first free window of the first application.
[0129] Step 1102: When no stack group with the same process identification information as the first active stack is found, the first free window corresponding to the first active stack is displayed on the target local area of the screen.
[0130] Step 1103: Create a first stack group including the first active stack, and set the process identification information of the first stack group.
[0131] The electronic device creates a first stack group including a first active stack, and sets the process identification information of the first stack group to the process identification information of the first active stack.
[0132] It should be noted that the steps of displaying the first free window corresponding to the first active stack and creating the first stack group including the first active stack can be executed sequentially or in parallel, and this application embodiment does not limit this.
[0133] Step 1104: When the second active stack of the first application is created, find the stack group that has the same process identification information as the second active stack.
[0134] The second activity stack is the activity stack corresponding to the second free window of the first application.
[0135] Step 1105: When a first stack group with the same process identification information as the second active stack is found, the second interface corresponding to the second active stack is displayed on the target local area corresponding to the first stack group.
[0136] The second interface is the application interface corresponding to the second free window.
[0137] Step 1106: If the second free window corresponding to the second activity stack is a transparent window, then move the page task of the second activity stack to the target activity stack, which is the activity stack currently at the top of the first stack group.
[0138] When the second free window corresponding to the second activity stack is a transparent window, the electronic device moves the page task of the second activity stack to the target activity stack. At this time, the target local area of the screen displays: the first free window including the first interface, and the second interface superimposed on the first free window.
[0139] Step 1107: If the second free window corresponding to the second active stack is a non-transparent window, then move the second active stack to the top of the first stack group and set the state of the other active stacks to invisible. The other active stacks are the other active stacks in the first stack group other than the second active stack.
[0140] If the second free window corresponding to the second activity stack is a non-transparent window, the electronic device moves the second activity stack to the top of the first stack group and sets the state of the other activity stacks, including the first activity stack, to invisible. At this time, the target local area of the screen displays the second free window, including the second interface.
[0141] It should be noted that the steps of displaying the second interface corresponding to the second activity stack and merging the activity stack can be executed sequentially or in parallel, and this application embodiment does not limit this.
[0142] Optionally, when the third active stack of the first application is created, a stack group with the same process identification information as the third active stack is searched; when a first stack group with the same process identification information as the third active stack is found, the third interface corresponding to the third active stack is displayed on the target local area corresponding to the first stack group. The processing method of the third active stack can be compared with the processing method of the second active stack, and will not be described in detail here.
[0143] It should be noted that the description of each step in this embodiment can be compared with the relevant details in the above embodiments, and will not be repeated here.
[0144] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0145] Please refer to Figure 12 This diagram illustrates a block diagram of a window display device provided in an exemplary embodiment of this application. The device can be implemented using software, hardware, or a combination of both. Figure 3 The provided electronic device may include all or part of a first display unit 1210 and a second display unit 1220;
[0146] The first display unit 1210 is used to display a first free window of the first application on a target local area of the screen in free window mode;
[0147] The second display unit 1220 is used to display a second interface on a target local area when the window to be displayed is the second free window of the first application. The second interface is the application interface corresponding to the second free window.
[0148] In one possible implementation, the second display unit 1220 is further configured to:
[0149] When the window to be displayed is the second free window of the first application and the second free window is a transparent window, the second interface is overlaid on the first free window in the target local area.
[0150] In another possible implementation, the second display unit 1220 is also used for:
[0151] When the window to be displayed is the second free window of the first application and the second free window is a non-transparent window, the first free window is switched to be displayed as the second free window in the target local area, and the second free window is used to display the second interface.
[0152] In another possible implementation, the first display unit 1210 is also used for:
[0153] In free window mode, when the first active stack of the first application is created, the stack group with the same process identification information as the first active stack is searched.
[0154] When no stack group with the same process identification information as the first active stack is found, the first free window corresponding to the first active stack is displayed on the target local area of the screen;
[0155] The device further includes: a setting unit; the setting unit is used to create a first stack group including a first active stack and to set the process identification information of the first stack group.
[0156] In another possible implementation, the second display unit 1220 is also used for:
[0157] When the second active stack of the first application is created, look for the stack group that has the same process identification information as the second active stack;
[0158] When a first stack group with the same process identification information as the second active stack is found, the second interface corresponding to the second active stack is displayed on the target local area corresponding to the first stack group.
[0159] In another possible implementation, the device further includes: a first moving unit;
[0160] The first moving unit is used to move the page task of the second activity stack to the target activity stack when the second free window corresponding to the second activity stack is a transparent window. The target activity stack is the activity stack currently located at the top of the first stack group.
[0161] In another possible implementation, the device further includes: a second moving unit;
[0162] The second moving unit is used to move the second active stack to the top of the first stack group when the second free window corresponding to the second active stack is a non-transparent window, and to set the state of other active stacks to invisible state. The other active stacks are the other active stacks in the first stack group other than the second active stack.
[0163] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0164] This application provides an electronic device, which includes: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method executed by the electronic device in the above embodiments.
[0165] This application provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the method executed by the electronic device in the above embodiments.
[0166] This application provides a non-volatile computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method executed by the electronic device in the above embodiments.
[0167] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), electrically programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital video disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing.
[0168] The computer-readable program instructions or code described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0169] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this application.
[0170] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0171] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0172] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0174] It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented using hardware (such as circuits or ASICs (Application Specific Integrated Circuits)) that performs the corresponding function or action, or using a combination of hardware and software, such as firmware.
[0175] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0176] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A window display method, characterized in that, The method includes: In free window mode, the first free window of the first application is displayed on the target local area of the screen; When the window to be displayed is the second free window of the first application, a second interface is displayed on the target local area, and the second interface is the application interface corresponding to the second free window; The step of displaying a first free window of the first application on a target local area of the screen in free window mode includes: In the free window mode, when the first active stack of the first application is created, a stack group with the same process identification information as the first active stack is searched. When no stack group with the same process identification information as the first active stack is found, the first free window corresponding to the first active stack is displayed on the target local area of the screen; Create a first stack group that includes the first active stack, and set the process identification information of the first stack group; When the window to be displayed is the second free window of the first application, displaying the second interface on the target local area includes: When the second activity stack of the first application is created, look for the stack group that has the same process identification information as the second activity stack; When the first stack group with the same process identification information as the second active stack is found, the second interface corresponding to the second active stack is displayed on the target local area corresponding to the first stack group.
2. The method according to claim 1, characterized in that, When the window to be displayed is the second free window of the first application, displaying the second interface on the target local area includes: When the window to be displayed is the second free window of the first application and the second free window is a transparent window, the second interface is overlaid on the first free window in the target local area.
3. The method according to claim 1 or 2, characterized in that, When the window to be displayed is the second free window of the first application, displaying the second interface on the target local area includes: When the window to be displayed is the second free window of the first application and the second free window is a non-transparent window, the first free window is switched to be displayed as the second free window in the target local area, and the second free window is used to display the second interface.
4. The method according to claim 1, characterized in that, The method further includes: When the second free window corresponding to the second activity stack is a transparent window, the page task of the second activity stack is moved to the target activity stack, which is the activity stack currently at the top of the first stack group.
5. The method according to claim 1 or 4, characterized in that, The method further includes: When the second free window corresponding to the second active stack is a non-transparent window, the second active stack is moved to the top of the first stack group, and the state of the other active stacks is set to invisible. The other active stacks are the other active stacks in the first stack group other than the second active stack.
6. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method according to any one of claims 1-5 when executing the instructions.
7. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1-5.
8. A computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, characterized in that, When the computer-readable code is run in an electronic device, the processor in the electronic device performs the method according to any one of claims 1-5.
Citation Information
Patent Citations
Application display method and device
CN111625154A