Application multi-window display method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- PCT/CN2026/090265
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-16
- Filing Date
- 2026-04-13
- Publication Date
- 2026-10-22
Smart Images

Figure CN2026090265_22102026_PF_FP_ABST
Abstract
Description
Applications of multi-window display methods, devices, electronic equipment, and storage media
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510478456.7, filed in China on April 16, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application belongs to the field of electronic equipment technology, specifically relating to a method, apparatus, electronic device, and storage medium for multi-window display. Background Technology
[0004] With the continuous advancement of electronic device technology and the innovative development of screen technology, large-screen electronic devices (such as those with foldable screens) have emerged, simultaneously meeting users' requirements for screen size and portability. Foldable screen electronic devices can provide users with richer display content; for example, a foldable phone that folds left and right can simultaneously display the interfaces of two applications.
[0005] Currently, when a foldable phone is unfolded, users can perform split-screen operation, dividing the large folded screen into two separate screens. This allows the phone to display the interface of one application on each screen. For example, by splitting the inner screen of the foldable phone vertically, the upper screen can display the interface of one application, while the lower screen displays the interface of another.
[0006] However, in the above-described method, when the inner screen of the foldable phone is in a split-screen state, the aspect ratio of each split screen is approximately the same as that of a landscape display. That is, the width of each split screen is much larger than its height. In this case, each split screen still displays an application interface from one application in a portrait mode. Furthermore, because the application interface is displayed on the large foldable screen, the user interface (UI) becomes larger, leading to an imbalance in the display ratio of the application interface and a reduction in the amount of information displayed. This results in a poor display effect for the application interface on the electronic device. Summary of the Invention
[0007] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for multi-window display, which can improve the display effect of the electronic device on the application interface.
[0008] In a first aspect, embodiments of this application provide a method for multi-window display of an application. The method includes: when a screen splitting operation on the screen of an electronic device is detected, acquiring at least one first application container, wherein the application interface of the application corresponding to the first application container supports multi-window display, and each first application container corresponds to a screen splitting container; and displaying at least two application interfaces corresponding to each first application container in the split-screen screen based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding screen splitting container.
[0009] Secondly, embodiments of this application provide an application multi-window display device, comprising: an acquisition module and a display module. The acquisition module is configured to acquire at least one first application container upon detecting a screen splitting operation on the screen of the application multi-window display device. The application interface of the first application container supports multi-window display, and each first application container corresponds to one screen splitting container. The display module is configured to display at least two application interfaces corresponding to each first application container on the split-screen screen based on the display configuration parameters of each first application container acquired by the acquisition module, the interface configuration information of the corresponding application, and the corresponding screen splitting container.
[0010] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0011] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0012] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0013] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0014] In this embodiment of the application, when a split-screen operation on the screen of an electronic device is detected, at least one first application container is obtained. The application interface of the application corresponding to the first application container supports multi-window display, and each first application container corresponds to a split-screen container. Based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, at least two application interfaces corresponding to each first application container are displayed on the split-screen screen. In this solution, when the electronic device detects a user's split-screen operation on the screen, it can obtain at least one first application container whose interface supports multi-window display. Then, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, it can determine the application interface to be displayed in the split-screen container corresponding to each first application container, as well as the display window size information. Based on the application interface to be displayed and the display window size information, it displays at least two application interfaces corresponding to each first application container in both the split-screen screen and the corresponding split-screen container. This achieves the simultaneous display of at least two application interfaces of one application within a single split-screen window after the electronic device screen is split, making the display size of each application interface adaptable to the split-screen size and resulting in a more reasonable display ratio for each application interface. This improves the display effect of the application interface on the electronic device. Attached Figure Description
[0015] Figure 1 is a schematic diagram of an example of a chat interface in split-screen mode provided by related technologies;
[0016] Figure 2 is one of the flowcharts of the multi-window display method provided in the embodiments of this application;
[0017] Figure 3 is a second flowchart of the application multi-window display method provided in the embodiments of this application;
[0018] Figure 4 is a flowchart of determining whether at least one container configuration information meets the multi-window display conditions according to an embodiment of this application;
[0019] Figure 5 is a flowchart illustrating the process of determining whether the windowingMode context meets the conditions for entering the application multi-window display mode, as provided in an embodiment of this application.
[0020] Figure 6 is a schematic diagram of the split-screen stack structure provided in an embodiment of this application;
[0021] Figure 7 is a flowchart of the application multi-window display method provided in the embodiment of this application;
[0022] Figure 8 is a schematic diagram of an example of two windows within an application container provided in an embodiment of this application;
[0023] Figure 9 is a schematic diagram of an example of the application interface covering the left and right regions, provided in an embodiment of this application.
[0024] Figure 10 is a schematic diagram of an example of a full-screen coverage application interface provided in an embodiment of this application;
[0025] Figure 11 is a flowchart of determining the visibility of the application interface provided in an embodiment of this application;
[0026] Figure 12 is a flowchart of the application interface animation transition provided in the prior art;
[0027] Figure 13 is a schematic diagram of an example of a chat interface in split-screen mode provided in an embodiment of this application;
[0028] Figure 14 is one of the schematic diagrams of the multi-window display device provided in the embodiments of this application;
[0029] Figure 15 is a second schematic diagram of the multi-window display device provided in the embodiments of this application;
[0030] Figure 16 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;
[0031] Figure 17 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0034] The terms "at least one," "at least one," etc., in this application refer to any one, any two, or a combination of two or more of the included objects. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more, and its meaning is similar to that of "at least one."
[0035] First, the terms used in the specification of this application will be explained.
[0036] Activity: The user interface of an application in the Android system, also known as a "page".
[0037] ActivityRecord: An important data structure in the Android system used to represent and manage Activities, storing various information related to Activities.
[0038] Split-screen: A solution for two applications to share the same screen on an Android device.
[0039] Multi-window application: A window technology solution for large-screen devices that allows an application to display two Activity pages simultaneously, reducing UI adaptation issues for third-party applications.
[0040] Foldable screen phones: Foldable screen phones are a type of smartphone with built-in screens that are flexible active matrix organic light-emitting diodes (AMOLED) or active matrix organic light-emitting diodes (AMOLED). Currently, major manufacturers have begun to promote two popular types of foldable screen phones: vertical and horizontal. When folded, the screen can be used to access both the inner and outer screens.
[0041] The application multi-window display method, device, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0042] This application's embodiments can be applied to scenarios where splitting the screen on an electronic device does not affect the display ratio of the application interface in each split screen. For example, a foldable phone that folds left and right can display two application interfaces of the same application in full-screen multi-window mode when unfolded. After the user performs a split-screen operation on the foldable phone, the two application interfaces of the same application can also be displayed in multi-window mode in the corresponding split screen. Similarly, a large-screen electronic device can display two application interfaces of the same application in full-screen multi-window mode. After the user performs a split-screen operation on the large-screen electronic device, the two application interfaces of the same application can also be displayed in multi-window mode in the corresponding split screen.
[0043] Currently, large-screen electronic devices typically have large screen sizes with nearly equal aspect ratios. For example, when a foldable phone is unfolded, the inner screen is large with approximately equal width and height. Many third-party applications haven't adapted their interfaces to this near-square screen, leading to numerous UI adaptation issues when displaying third-party applications on large-screen electronic devices. Existing large-screen electronic devices, such as foldable phones, can address these interface adaptation problems when displaying third-party applications in full-screen mode through multi-window application display. This involves displaying two application interfaces from a single application simultaneously. This approach provides a low-cost, system-level large-screen adaptation solution, especially when third-party applications have low willingness to adapt and require significant adaptation work.
[0044] However, due to the increased screen size of large-screen electronic devices, more users frequently utilize split-screen functionality, dividing the large screen into two separate screens. This allows the large-screen device to display the interface of one application on each screen simultaneously, effectively showing two application interfaces at once. When the screen of a large-screen electronic device is in a vertical split-screen state, the aspect ratio of the split screens is approximately the same as that of a landscape display, meaning the width of each split screen is much greater than its height. In this case, each split screen still displays one application interface from one application in a portrait mode. As shown in Figure 1, taking a foldable phone as an example, the chat interface displayed on the upper split screen in Figure 1 is shorter than in full-screen mode. Furthermore, because the UI is enlarged when displaying the application interface on the foldable screen, the display ratio becomes disproportionate, the amount of information displayed is reduced, and the display effect is worse than a full-screen display, failing to leverage the display advantages of the foldable screen. Therefore, the display effect of application interfaces on electronic devices is poor.
[0045] The following example illustrates the application multi-window display method provided in this application embodiment using a specific scenario.
[0046] Scenario 1: Assume the large-screen electronic device is a foldable phone that can be folded left and right. When the foldable phone is unfolded, the inner screen displays two application interfaces of instant messaging application A in full screen: the contact message list interface of instant messaging application A and the chat interface of contact B. The user performs split-screen input. For example, the user needs to split the foldable phone vertically and display the application interface of instant messaging application A on the upper split screen, and the application interface of map application D on the lower split screen. When a foldable phone detects a user's split-screen operation on the foldable screen, it obtains a first application container, such as the application container for instant messaging application A. Instant messaging application A supports multi-window display, and its application container corresponds to the upper split-screen container after the split-screen is vertically divided. Based on the display configuration parameters of the application container for instant messaging application A, such as window boundary values, the display ratio of the first and second windows, and the width of the dividing line between windows, the foldable phone calculates and updates the window display parameters of the first and second windows within the application container. Each window is used to display one application interface from instant messaging application A. Based on the interface configuration information of instant messaging application A, such as the visibility marker of each interface, the foldable phone obtains two application interfaces from instant messaging application A: the contact message list interface and the chat interface of contact B. Based on the upper split-screen container after the split-screen is vertically divided, and the updated window display parameters of the first and second windows, the foldable phone displays the contact message list interface from instant messaging application A in the first window of the upper split-screen and the chat interface of contact B from instant messaging application A in the second window.
[0047] It should be noted that the above scenario 1 is only an exemplary example of a scenario that may be applied to the embodiments of this application. In actual implementation, the embodiments of this application can also be applied to more scenarios where users need to split the screen of an electronic device without affecting the display ratio of the application interface in each split screen. The embodiments of this application are not limited here.
[0048] Based on the above-mentioned scenarios applied in the embodiments of this application, the application multi-window display method provided in the embodiments of this application, when detecting a screen split operation on the screen of an electronic device, obtains at least one first application container, the application interface of the application corresponding to the first application container supports multi-window display, and each first application container corresponds to a screen split container; based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application and the corresponding screen split container, at least two application interfaces corresponding to each first application container are displayed in the screen after screen split. In this solution, when the electronic device detects a user's split-screen operation on the screen, it can obtain at least one first application container whose interface supports multi-window display. Then, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, it can determine the application interface to be displayed in the split-screen container corresponding to each first application container, as well as the display window size information. Based on the application interface to be displayed and the display window size information, it displays at least two application interfaces corresponding to each first application container in both the split-screen screen and the corresponding split-screen container. This achieves the simultaneous display of at least two application interfaces of one application within a single split-screen window after the electronic device screen is split, making the display size of each application interface adaptable to the split-screen size and resulting in a more reasonable display ratio for each application interface. This improves the display effect of the application interface on the electronic device.
[0049] The execution subject of the application multi-window display method provided in this application embodiment can be an application multi-window display device, which can be an electronic device, or a functional module or functional entity in an electronic device. The following uses an electronic device as an example to illustrate the technical solution provided in this application embodiment.
[0050] Figure 2 shows a flowchart of an application multi-window display method provided in an embodiment of this application. As shown in Figure 2, the application multi-window display method provided in this embodiment of the application may include the following steps 301 and 301a.
[0051] Step 301: When the electronic device detects a split-screen operation on the screen of the electronic device, it acquires at least one first application container.
[0052] In this embodiment of the application, the application interface of the application corresponding to the first application container mentioned above supports multi-window display.
[0053] In this embodiment of the application, each first application container corresponds to a split-screen container.
[0054] Optionally, in this embodiment of the application, the above-mentioned screen splitting operation of the electronic device screen can be a vertical screen splitting operation of the screen of the electronic device.
[0055] It is understandable that splitting the screen of the aforementioned electronic device means dividing the screen of the electronic device into two screen areas, namely the screen area located in the upper half of the screen and the screen area located in the lower half of the screen. Each screen area can be called a split screen, or a split container.
[0056] Optionally, in this embodiment, the above-mentioned methods for split-screen operation on the screen of the electronic device may include, but are not limited to, at least one of the following: switching from left-right split-screen to top-bottom split-screen, entering top-bottom split-screen by swiping up with three fingers on the electronic device, or initiating top-bottom split-screen in the application responsible for managing the split-screen function. The specific method can be determined according to actual usage needs, and this embodiment does not impose any limitations on it.
[0057] Optionally, in this embodiment of the application, the electronic device may be an electronic device with a foldable screen.
[0058] Optionally, in this embodiment of the application, when the electronic device detects a split-screen operation on the folding screen, it acquires at least one first application container. The folding screen is in an unfolded state, and the split-screen operation on the folding screen refers to the vertical split-screen operation on the inner screen of the folding screen.
[0059] Understandably, an application container is associated with an application and is responsible for managing all the content within that application, such as managing the collection of application interfaces within that application. A split-screen container is associated with one of the split screens after the screen of the aforementioned electronic device is split, and is responsible for managing the content related to that split screen, such as managing the display mode information of that split screen.
[0060] Optionally, in this embodiment of the application, referring to FIG2 and FIG3, before “obtaining at least one first application container” in step 301 above, the application multi-window display method provided in this embodiment of the application may further include the following step 401, and the “obtaining at least one first application container” in step 301 above can be specifically implemented by the following step 402.
[0061] Step 401: When the electronic device detects a screen splitting operation on the screen of the electronic device and at least one container configuration information changes, it determines whether the configuration information of at least one container satisfies the multi-window display condition.
[0062] In this embodiment of the application, when the electronic device detects a screen splitting operation on the screen of the electronic device, it will split the screen of the electronic device into two screens and remount different application containers to their respective screen splitting containers, thereby causing changes in the container configuration information. The electronic device will detect and judge the changed container configuration information to determine at least one first application container that can be displayed in multiple windows.
[0063] In this embodiment of the application, the container configuration information mentioned above can be the container configuration information of a split-screen container or the container configuration information of an application container.
[0064] Optionally, in this embodiment of the application, the above-mentioned multi-window display conditions include at least one of the following:
[0065] The container corresponding to at least one of the above container configuration information is an application container;
[0066] The application corresponding to the container configuration information mentioned above has an application interface that can be displayed in multiple windows.
[0067] The application corresponding to the container corresponding to at least one of the above container configuration information has the permission to display multiple windows;
[0068] If the application corresponding to the container corresponding to at least one of the above container configuration information is a specific application, then the specific application is in an account login state.
[0069] At least one of the above container configuration information includes information related to the application interface display;
[0070] The above-mentioned container configuration information includes at least one of application information, split-screen information, and application interface information.
[0071] Optionally, in this embodiment of the application, the electronic device can determine whether the container corresponding to the at least one container configuration information is an application container by judging whether the container corresponding to the at least one container configuration information is a leaf container.
[0072] It is understandable that the aforementioned leaf container refers to a container that no longer contains other sub-containers. During the split-screen process, the application container is remounted to the corresponding split-screen container, meaning the application container is a sub-container of the corresponding split-screen container. Since there are no other sub-containers under the application container, when the container corresponding to at least one of the above container configuration information is a leaf container, it means that the container corresponding to the container configuration information has no sub-containers. Therefore, the container corresponding to the container configuration information is an application container, not a split-screen container, and the container corresponding to the container configuration information has the basic conditions for multi-window display.
[0073] Optionally, in this embodiment of the application, the electronic device can determine whether the container corresponding to the at least one container configuration information contains a window component for carrying and displaying application interface information, thereby determining that the application corresponding to the container of the at least one container configuration information has an application interface that can be displayed in multiple windows.
[0074] It is understandable that if the container corresponding to at least one of the above container configuration information contains a window component for carrying and displaying application interface information, it means that the application corresponding to the container corresponding to the container configuration information contains at least one application interface, that is, there is an application interface that can be displayed in multiple windows, and the container corresponding to the container configuration information has the basic conditions for multi-window display.
[0075] Optionally, in this embodiment of the application, the electronic device can determine whether the application corresponding to the container corresponding to the at least one container configuration information has permission for multi-window display by judging whether the at least one container configuration information contains permission information related to multi-window display.
[0076] It is understandable that if at least one of the above container configuration information contains permission information related to multi-window display, it means that the user has triggered the electronic device to turn on the multi-window display switch of the application corresponding to the container corresponding to the container configuration information. Therefore, it is determined that the application corresponding to the container corresponding to the at least one container configuration information has the permission to display multi-window, and the container corresponding to the container configuration information has the basic conditions for multi-window display.
[0077] It should be noted that for certain applications, such as instant messaging applications, an instant messaging application can only contain at least two application interfaces simultaneously when the user is logged in. Only then can an electronic device display at least two of these interfaces in multiple windows. If the instant messaging application is not logged in, it means it only contains one application interface—the login interface—and the electronic device cannot display at least two of these interfaces in multiple windows. Therefore, if at least one container configuration information corresponds to a specific application, and that specific application is logged in, then the container corresponding to that configuration information meets the basic conditions for multi-window display.
[0078] It should be noted that the change in the configuration information of at least one container may be caused by a variety of factors. If the information that has changed in the configuration information of at least one container includes information related to the application interface display, it indicates that the change in the container configuration information is caused by the electronic device performing a screen splitting operation. The container corresponding to the configuration information has the basic conditions for multi-window display.
[0079] In this embodiment of the application, the information related to the display of the application interface may include, but is not limited to, any of the following: application interface display boundaries (bounds), application interface windowingMode, application interface display orientation, application interface layout orientation, etc.
[0080] In this embodiment of the application, the application interface windowingMode may include full-screen mode, split-screen mode or application multi-window display mode, the application interface display orientation may include landscape display orientation, portrait display orientation, etc., and the application interface layout orientation may include left-to-right layout, right-to-left layout, etc.
[0081] It should be noted that when the container corresponding to at least one of the above-mentioned container configuration information enters the application's multi-window display mode, the electronic device will change the container's window mode parameters. For example, by calling the container's corresponding `setWindowingMode` method to set the container's `windowingMode` property, the container's configuration information will change. In this case, the change in container configuration information is caused by updating the container to multi-window display, hence it is called a secondary configuration information change. Therefore, when determining whether the above-mentioned at least one container configuration information meets the multi-window display condition, the case where the at least one container configuration information is secondary configuration information can be excluded. It can also be understood that the at least one container configuration information includes at least one of the following: application information, split-screen information, and application interface information, rather than secondary configuration information.
[0082] Step 402: The electronic device identifies at least one first application container as the container whose container configuration information meets the multi-window display condition from at least one container configuration information.
[0083] It is understood that if the container configuration information in at least one of the above container configuration information meets the multi-window display conditions, it means that the application corresponding to the container of the container configuration information supports multi-window display. Therefore, the container corresponding to the container configuration information that meets the multi-window display conditions in at least one container configuration information is determined as at least one first application container for subsequent multi-window display operations.
[0084] Optionally, in this embodiment of the application, the electronic device may further determine whether the container corresponding to the container configuration information that meets the multi-window display conditions in the above-mentioned at least one container configuration information is in the application multi-window display mode and whether the environment in which the container is located meets the conditions for entering the application multi-window display mode. If the container is not in the application multi-window display mode and the environment in which the container is located meets the conditions for entering the application multi-window display mode, the container is determined as the above-mentioned at least one first application container.
[0085] It should be noted that the specific implementation scheme for determining whether the environment in which the container is located meets the conditions for entering the application's multi-window display mode can be found in the description of the following embodiments, and will not be repeated here.
[0086] For example, Figure 4 illustrates a flowchart of an embodiment of this application for determining whether at least one container configuration information meets the conditions for multi-window display. The steps for an electronic device to determine whether at least one container configuration information meets the conditions for multi-window display are described in detail below with reference to Figure 4:
[0087] Step 101: The electronic device triggers the split-screen mode on the screen.
[0088] Specifically, the electronic device receives the user's split-screen operation on the screen of the electronic device and, in response to the split-screen operation, triggers the screen to split vertically.
[0089] Step 102: The electronic device determines the size and hierarchy of the split-screen container.
[0090] Specifically, in the Window Manager Shell (WMShell) of the System User Interface (SystemUI) process, the electronic device calculates the actual size and hierarchical level of the two split-screen container tasks through the StageCoordinator of the split-screen module. That is, it calculates the screen area occupied by each split-screen container task and whether it is in the upper or lower half of the screen. The calculated data is stored in the native Android system window container transaction (WCT). The electronic device then applies the WCT containing the calculated data to the SystemServer process through the container manager TaskOrganizer.
[0091] It's important to note that StageCoordinator is a component or interface related to split-screen management. It coordinates and manages the display, interaction, and switching of two or more application windows (such as the upper and lower split screens) in split-screen mode. When a user triggers a folded screen split, the electronic device can create two containers through StageCoordinator: the main split-screen container mainStage Task and the secondary split-screen container sideStage Task.
[0092] Step 103: Set the size of the split-screen container on the electronic device and remount the application container to the corresponding split-screen container.
[0093] Specifically, in the WindowManagerService (WMS) of the SystemServer process, the electronic device is responsible for parsing the WCT passed from the SystemUI process and actually applying it to the split-screen container task through the WindowOrganizerController. It sets the size and level of the split-screen container task and reparents the application container task to the corresponding split-screen container task, making it a child container task of the split-screen container task.
[0094] Step 104: Electronic device detects changes in container configuration information.
[0095] Specifically, when an electronic device detects a change in the configuration information of a split-screen container task or an application container task, the electronic device calls the onConfigurationChanged method of the container task and instrumentes this node to listen for changes in the task's configuration.
[0096] Step 105: The electronic device determines whether the container is a leaf container.
[0097] Specifically, if the electronic device detects that the container task whose container configuration information has changed is a leaf container, it means that this container task is the actual container task in which the application is located, i.e., the application container task, and not the split-screen container task, then continue; otherwise, the container does not meet the conditions for multi-window display, and the process ends.
[0098] Step 106: The electronic device determines whether the container has child elements.
[0099] Specifically, if the electronic device detects that the application container task whose container configuration information has changed has child elements, such as ActivityRecord, which is a window container specifically used to carry and display application interface content (WindowContainer), that is, the application corresponding to the container has an application interface that can be displayed in multiple windows, then continue; otherwise, the container does not meet the conditions for multi-window display and the process ends.
[0100] Step 107: The electronic device determines whether the application corresponding to the container has the multi-window display switch turned on.
[0101] Specifically, if the electronic device detects that the application corresponding to the application container task whose container configuration information has changed has turned on the multi-window display switch, for example, if the electronic device is a foldable screen device and the user has turned on the corresponding application switch in the foldable screen zone - application multi-window display, then continue; otherwise, the container does not meet the multi-window display conditions and the process ends.
[0102] Step 108: The electronic device determines whether it is logged in when the application corresponding to the container is a specific application.
[0103] Specifically, if the electronic device detects that the application container task corresponding to the container configuration information has changed is a specific application, such as an instant messaging application, and that application notifies the WMS framework that it is logged in through relevant methods of WindowManagerService, then the process continues. If the application container task corresponds to a specific application but is not logged in, then the multi-window display condition is not met, and the process ends. It should be noted that if the application container corresponds to an application that is not a specific application, then it is not necessary to determine whether it is logged in, and subsequent steps are executed directly.
[0104] Step 109: The electronic device determines whether the specified container configuration information has changed.
[0105] Specifically, if the electronic device detects that the changed container configuration information is related to the application interface display, it continues; otherwise, the container does not meet the multi-window display conditions, and the process ends.
[0106] Step 110: The electronic device determines whether the change in container configuration information is a secondary configuration information change.
[0107] Specifically, if the electronic device detects that the changed container configuration information is not a secondary configuration information change generated by entering the application multi-window display mode, then the container configuration information meets the multi-window display conditions, that is, the application container task corresponding to the container configuration information meets the basic multi-window display conditions, and the application interface of the application corresponding to the application container task supports multi-window display, and the next step of judgment is continued; otherwise, the container does not meet the multi-window display conditions, and the process ends.
[0108] Step 111: The electronic device determines whether the container is not in the application multi-window display mode and whether the environment in which the container is located meets the conditions for entering the application multi-window display mode.
[0109] Specifically, if the electronic device detects that the application container task that meets the above conditions is not in the application multi-window display mode, but the windowingMode context meets the conditions for entering the application multi-window display mode, the electronic device should set the application container task to enter the application multi-window display mode; otherwise, continue to the next step.
[0110] It should be noted that the condition for the windowingMode context to meet the requirements for entering the application's multi-window display mode refers to the environment in which the current application container resides meeting the requirements for entering the application's multi-window display mode. For a detailed explanation of the specific implementation scheme for determining whether the environment in which the application container resides meets the requirements for entering the application's multi-window display mode, please refer to the description of the following embodiments, which will not be repeated here.
[0111] Step 112: The electronic device determines whether the container is in application multi-window display mode and whether the environment in which the container is located does not meet the conditions for entering application multi-window display mode.
[0112] Specifically, if the electronic device detects that the application container task that meets the above conditions is in the application multi-window display mode, but the windowingMode context does not meet the conditions for entering the application multi-window display mode, the electronic device should set the application container task to exit the application multi-window display mode; otherwise, continue to the next step.
[0113] Step 113: The electronic device determines whether the container is in application multi-window display mode and whether the environment in which the container is located meets the conditions for entering application multi-window display mode.
[0114] Specifically, if the electronic device detects that the application container task meets the above conditions and is in application multi-window display mode, and the windowingMode context also meets the conditions for entering application multi-window display mode, it means that the electronic device needs to update the application multi-window display mode based on the new Configuration. For example, if the size of the application interface display boundaries (bounds) changes, then the size of the Activity under the application container task is updated; if the application interface layout direction (layoutDirection) is updated from left to right (LTR) to right to left (RTL), then the coordinates of the Activity under the application container task are updated. Otherwise, the process ends.
[0115] For example, assuming the electronic device is one with a foldable screen, Figure 5 shows a flowchart of an embodiment of this application for determining whether the windowingMode context meets the conditions for entering the application multi-window display mode. The steps for the electronic device to determine whether the windowingMode context meets the conditions for entering the application multi-window display mode are described in detail below with reference to Figure 5:
[0116] Step 114: The electronic device determines the current windowingMode context.
[0117] It should be noted that when an electronic device determines the current windowingMode context, it means that the electronic device determines the environment in which the current application container is located.
[0118] Step 115: The electronic device determines whether the application container is a desktop container.
[0119] Specifically, if the electronic device detects that the application container task that meets the above multi-window display conditions is not the desktop container homeTask, it continues; otherwise, the process ends.
[0120] Step 116: The electronic device determines whether the foldable screen is in a folded state.
[0121] Specifically, if the electronic device detects that the foldable screen of the current electronic device is not in a folded state, that is, the screen state of the foldable screen of the electronic device is in an unfolded state, then continue; otherwise, end the process.
[0122] Step 117: The electronic device determines whether the application container is the root container.
[0123] Specifically, if the electronic device detects that the application container task that meets the above multi-window display conditions is not the root container rootTask, it continues; otherwise, the process ends.
[0124] Step 118: The electronic device determines whether it has a foldable screen.
[0125] Specifically, if the electronic device detects that it is an electronic device with a foldable screen, it continues; otherwise, the process ends.
[0126] Step 119: The electronic device determines whether the parent container of the application container is a split-screen container.
[0127] Specifically, if the electronic device detects that the parent container of the application container task that meets the above multi-window display conditions is a split-screen container task, it determines that the windowingMode context meets the conditions for entering the application multi-window display mode; otherwise, the process ends.
[0128] It should be noted that the termination process mentioned in the above embodiments refers to the condition that the steps of the application multi-window display method provided in this application embodiment are not met, and the application interface of the application container task corresponding to the application can be displayed in accordance with existing related technologies.
[0129] In this embodiment, the electronic device adds a listener to the Window Management Service (WMS) to determine whether the container corresponding to the changed container configuration information meets the multi-window display conditions, thereby further determining whether the application corresponding to the container can enter the application multi-window display mode, which improves the efficiency of the electronic device in performing application multi-window display.
[0130] Optionally, in the embodiments of this application, after step 402 above, the application multi-window display method provided in the embodiments of this application may further include the following step 403.
[0131] Step 403: The electronic device updates the window mode parameter in the container configuration information of at least one first application container to the first parameter.
[0132] In this embodiment of the application, the first parameter is used to indicate that the application corresponding to the first application container supports multi-window display.
[0133] In this embodiment of the application, at least one first application container obtained through the above steps 401 and 402 is an application container whose application interface supports multi-window display. The electronic device can mark the at least one first application container to enter the application multi-window display mode by updating the window mode parameter in the container configuration information of the at least one first application container.
[0134] For example, an electronic device can, depending on whether the two application container tasks corresponding to the upper and lower split-screen container tasks on the electronic device's screen support multi-window display, change the windowingMode of the Configuration in the application container task that actually corresponds to the upper and lower split-screen container task to the windowingMode corresponding to the application multi-window display mode: multi-landscape, i.e., the first parameter.
[0135] It should be noted that Figure 6 is a schematic diagram of a split-screen stack structure provided in an embodiment of this application. As shown in Figure 6, the container with Task=4 represents the upper split-screen container task after the screen of the electronic device is split, and the container with Task=5 represents the lower split-screen container task after the screen of the electronic device is split. TaskA is the application container task corresponding to the upper split-screen container task, and TaskB is the application container task corresponding to the lower split-screen container task. Assuming that both TaskA and TaskB meet the application multi-window display conditions, the electronic device can change the windowingMode of the Configuration of TaskA and TaskB to the windowingMode corresponding to the application multi-window display mode: multi-landscape. Thus, TaskA and TaskB no longer follow the window display mode of their parent container task, that is, the split-screen container task, such as multi-window. Therefore, the electronic device can support the application containers TaskA and TaskB to use the application multi-window display mode in the split-screen scenario.
[0136] In this embodiment, the electronic device updates the window mode parameter in the container configuration information of at least one first application container to the first parameter, thereby cutting off the influence of its parent container task, i.e., the split-screen container task, on the windowingMode of the first application container task. Then, it identifies the application container task that has entered the application multi-window display mode through the windowingMode identifier and controls the size and display of the Activity inside the application container task.
[0137] Step 301a: The electronic device displays at least two application interfaces corresponding to each first application container in the split-screen screen based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container.
[0138] Optionally, in this embodiment of the application, referring to FIG2 and FIG7, the above step 301a can be specifically implemented by the following steps 302 to 304.
[0139] Step 302: The electronic device updates the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container.
[0140] In this embodiment, each window is used to display an application interface.
[0141] For example, when an electronic device is in a split-screen state and enters the application multi-window display mode, the electronic device can update the display configuration parameters of the application container task accordingly, such as the application container display boundary, application container layout direction, etc., and will recalculate the display parameters of the Activity inside the application container task based on factors such as the current display boundary of the application container task, the application drag ratio, the application container layout direction, the width of the split line, and whether scaling is used.
[0142] Optionally, in the embodiments of this application, before step 302 above, the application multi-window display method provided in the embodiments of this application may further include the following steps 501 and 502, and the above step 302 may be specifically implemented by the following steps 503 and 504.
[0143] Step 501: The electronic device obtains the distances of the four gaps corresponding to each first application container.
[0144] In this embodiment of the application, a gap distance is a gap distance reserved on one side of a first application container.
[0145] Optionally, in this embodiment of the application, the electronic device may also obtain the gap distance of the space reserved in the middle of each first application container for displaying the drag bar.
[0146] For example, as shown in FIG8, the application container task 70 includes LeftActivity 71 and RightActivity 72, and a gap 73 reserved on the left side of the application container task 70 with the left side of LeftActivity 71, a gap 75 reserved on the right side of the application container task 70 with the right side of RightActivity 72, a gap 74 reserved on the top of the application container task 70 with the top of LeftActivity 71 or RightActivity 72, a gap 76 reserved on the bottom of the application container task 70 with the bottom of LeftActivity 71 or RightActivity 72, and a gap 77 reserved in the middle of the application container task 70 for displaying the drag bar. The electronic device can obtain the gap distances of gaps 73, gap 74, gap 75, gap 76 and gap 77, which are leftPadding, topPadding, rightPadding, bottomPadding and middlePadding, respectively.
[0147] Step 502: The electronic device obtains the width value of each first application container and the display ratio of at least two windows within each first application container.
[0148] For example, assuming that the width of the application container task70 in Figure 8 is taskwidth and the height is taskheight, the display ratio of the left-side LeftActivity71 is 0.4, and the application container layout direction of application container task70 is from left to right.
[0149] Step 503: The electronic device calculates the display coordinate information of at least two windows in each first application container based on the distance of the four gaps corresponding to each first application container, the width value of each first application container, and the display ratio of at least two windows in each first application container.
[0150] For example, the electronic device can calculate the display coordinate information of LeftActivity71 and RightActivity72 in Figure 8 as follows, and obtain the gap distances of gaps 73, 74, 75, 76, and 77, which are leftPadding, topPadding, rightPadding, bottomPadding, and middlePadding, respectively. The width of the application container task70 is taskwidth, and the height is taskheight. The display ratio of the left-side LeftActivity71 is 0.4. Therefore, the actual length that can be used to display LeftActivity71 and RightActivity72 is: ContentW = taskwidth - leftPadding - middlePadding – rightPadding; The width of LeftActivity71 is: Leftwidth = ContentW * ratio; the display coordinate area of LeftActivity71 is: leftActivityrect = (leftpadding, toppadding, leftpadding + leftwidth, taskheight - bottomPadding); while the width of RightActivity72 is: rightWidth = ContentW * (1 - ratio), the coordinates of the left edge of RightActivity72 are: leftpoint = leftpadding + leftwidth + middlePadding, and the display coordinate area of RightActivity72 is: rightActivityrect = ...
[0151] (leftpoint,topPadding,leftpoint+rightWidth,taskheight-bottomPadding).
[0152] Step 504: The electronic device updates the window display parameters of at least two windows in each first application container based on the display coordinate information of at least two windows in each first application container.
[0153] For example, the electronic device can update its corresponding window display parameters based on the display coordinate areas of the left LeftActivity71 and the right RightActivity72 calculated above.
[0154] In this embodiment, the electronic device can update the window display parameters of at least two windows in each first application container, so that the corresponding application interface can be displayed in a multi-window application display manner based on the window display parameters.
[0155] Step 303: The electronic device obtains at least two application interfaces corresponding to each first application container based on the interface configuration information of the application corresponding to each first application container.
[0156] It should be noted that electronic devices can use inner classes in WMS to assist in determining the visibility of the interface. When the process method in the EnsureActivitiesVisibleHelper class iterates through and refreshes the visibility of the Activity, based on the principle of "if it is covered, it is not visible", after instrumenting the visibility judgment logic, the visibility of the Activity corresponding to each first application container is determined by the same position area coverage judgment and the full screen coverage judgment in the instrumentation method.
[0157] As can be understood, as shown in Figure 9, the application container task80 includes ActivityA81, ActivityB82, ActivityC83, ActivityD84, ActivityE85, and ActivityF86. In the left area of the application container task80, ActivityA81 is at the top and covers ActivityB82 and ActivityC83, so ActivityA81 is visible, while ActivityB82 and ActivityC83 are not visible. In the right area of the application container task80, ActivityD84 is at the top and covers ActivityE85 and ActivityF86, so ActivityD84 is visible, while ActivityE85 and ActivityF86 are not visible. As shown in Figure 10, the application container task90 includes ActivityA81, ActivityB82, ActivityC83, ActivityD84, ActivityE85, ActivityF86, ActivityG87, and ActivityH88. ActivityH88 is at the top, full-screen, and covers ActivityA81, ActivityB82, ActivityC83, ActivityD84, ActivityE85, ActivityF86, and ActivityG87. Therefore, ActivityH88 is visible, while the others are not.
[0158] Optionally, in the embodiments of this application, step 303 can be implemented by steps 601 to 603 as described below.
[0159] Step 601: For each application interface corresponding to the first application container, the electronic device determines whether an application interface is a visible application interface based on the second parameter in the interface configuration information of the application corresponding to the first application container, as well as the display area and transparency parameters of the application interface.
[0160] In this embodiment of the application, the second parameter is used to indicate whether an application interface is covered by an application container that occupies the corresponding display area.
[0161] In this embodiment of the application, the display area can be full-screen display, left-side display, or right-side display.
[0162] In this embodiment of the application, the transparency parameter can be completely opaque, completely transparent, or partially transparent.
[0163] It is understandable that, when the display area of an application interface is full-screen, the second parameter is used to indicate whether the application interface is covered by an application container that occupies the full-screen area.
[0164] Optionally, in this embodiment of the application, the second parameter is used to indicate whether an application interface is covered by the application interface of an application container that occupies the full-screen area. For example, the step 601 above, "determining whether an application interface is a visible application interface based on the second parameter in the interface configuration information of the application corresponding to each first application container, and the display area and transparency parameters of an application interface", can be specifically implemented through the following steps 701 and 702.
[0165] Step 701: When the value of the second parameter in the interface configuration information of the application corresponding to each first application container is the first value, the electronic device marks an application interface as an invisible application interface.
[0166] It should be noted that when an electronic device determines the visibility of an application interface, the second parameter it uses is the second parameter in the interface configuration information of the application corresponding to the first application container, not the second parameter in the interface configuration information of all applications corresponding to the first application containers.
[0167] For example, the second parameter mentioned above can be the parameter mBehindFullOccludedForMultiLands in EnsureActivitiesVisibleHelper, which indicates whether the application interface is covered by the application interface of an application container that occupies the full-screen area. The first value mentioned above can be true, indicating that the application interface is covered by the application interface of an application container that occupies the full-screen area.
[0168] Step 702: When the value of the second parameter in the interface configuration information of the application corresponding to each first application container is the second value, the electronic device determines whether an application interface is a visible application interface based on the display area and transparency parameters of an application interface.
[0169] For example, the second value mentioned above can be false.
[0170] Optionally, in this embodiment of the application, the step 702 above, "the electronic device determines whether an application interface is a visible application interface based on the display area and transparency parameters of an application interface", can be specifically implemented through the following step 801.
[0171] Step 801: When an application interface is a full-screen and opaque application interface, the electronic device marks an application interface as a visible application interface and updates the value of the second parameter in the interface configuration information of each first application container to the first value.
[0172] In this embodiment, the electronic device updates the value of the second parameter in the interface configuration information of the application corresponding to each first application container to the first value, which is used to determine the visibility of other application interfaces in the future.
[0173] It should be noted that when the electronic device updates the value of the second parameter in the interface configuration information of the application corresponding to each first application container to the first value, it means that the electronic device updates the value of the second parameter in the interface configuration information of the application corresponding to the first application container that is marked as visible to the first value, rather than updating the value of the second parameter in the interface configuration information of all applications corresponding to the first application containers.
[0174] It is understandable that when an electronic device traverses all application interfaces in a first application container, the first application interface traversed is the application interface with the latest creation time, that is, the visible application interface displayed at the top. In other words, when an electronic device traverses all application interfaces in a first application container, the value of the second parameter in the interface configuration information of the application corresponding to the first application container obtained for the first time is the second value.
[0175] Optionally, in this embodiment of the application, the step 702 above, "the electronic device determines whether an application interface is a visible application interface based on the display area and transparency parameters of an application interface", can be specifically implemented through the following steps 802 to 804.
[0176] Step 802: When an application interface is a left-side application interface and an application interface is not a top application interface and the value of the third parameter in the interface configuration information of each first application container is a first value, the electronic device marks an application interface as an invisible application interface.
[0177] In this embodiment of the application, the third parameter is used to indicate whether the application interface is covered by an application container that occupies the left side area.
[0178] It should be noted that when an electronic device determines the visibility of a certain application interface on the left, the third parameter it uses is the third parameter in the interface configuration information of the application corresponding to the first application container of that application interface, and not the third parameter in the interface configuration information of all applications corresponding to the first application containers.
[0179] For example, the third parameter mentioned above can be the parameter mBehindMasterOccludedForMultiLands in EnsureActivitiesVisibleHelper, which indicates whether the application interface is covered by the application interface of an application container occupying the left area. The first value mentioned above can be true, indicating that the application interface is covered by the application interface of an application container occupying the left area.
[0180] Step 803: When an application interface is a left-side application interface, an application interface is a top-side application interface, the value of the third parameter in the interface configuration information of each first application container corresponding to the application is the second value, and an application interface is an opaque application interface, the electronic device marks an application interface as a visible application interface and updates the value of the third parameter in the interface configuration information of each first application container corresponding to the application to the first value.
[0181] For example, the second value mentioned above can be false.
[0182] In this embodiment, the electronic device updates the value of the third parameter in the interface configuration information of the application corresponding to each first application container to the first value, which is used to determine the visibility of other application interfaces in the future.
[0183] It should be noted that when the electronic device updates the value of the third parameter in the interface configuration information of the application corresponding to each first application container to the first value, it means that the electronic device updates the value of the third parameter in the interface configuration information of the application corresponding to the first application container that is marked as visible to the first value, rather than updating the value of the third parameter in the interface configuration information of all applications corresponding to the first application containers.
[0184] It is understandable that when an electronic device traverses all the left-side application interfaces in a first application container, the first left-side application interface traversed is the one with the latest creation time, that is, the visible left-side application interface displayed at the top. In other words, when an electronic device traverses all the left-side application interfaces in a first application container, the value of the third parameter in the interface configuration information of the application corresponding to the first application container obtained for the first time is the second value.
[0185] Step 804: When an application interface is a left-side application interface, an application interface is a top application interface and the value of the third parameter in the interface configuration information of each first application container is the second value, and an application interface is a transparent application interface, the electronic device marks an application interface as a visible application interface.
[0186] Optionally, in this embodiment of the application, the step 702 above, "the electronic device determines whether an application interface is a visible application interface based on the display area and transparency parameters of an application interface", can be specifically implemented through the following steps 805 to 807.
[0187] Step 805: When an application interface is the right-side application interface and an application interface is not the top application interface and the fourth parameter in the interface configuration information of each first application container is the first value, the electronic device marks an application interface as an invisible application interface.
[0188] In this embodiment, the fourth parameter is used to indicate whether an application interface is covered by an application container that occupies the right-side area.
[0189] It should be noted that when an electronic device determines the visibility of a certain application interface on the right, the fourth parameter it uses is the fourth parameter in the interface configuration information of the application corresponding to the first application container of that application interface, and not the fourth parameter in the interface configuration information of all applications corresponding to the first application containers.
[0190] For example, the fourth parameter mentioned above can be the parameter mBehindSlaveOccludedForMultiLands in EnsureActivitiesVisibleHelper, which indicates whether the application interface is covered by the application interface of an application container occupying the right area. The first value mentioned above can be true, indicating that the application interface is covered by the application interface of an application container occupying the right area.
[0191] Step 806: In the case that an application interface is a right-side application interface, an application interface is a top application interface and the value of the fourth parameter in the interface configuration information of the application corresponding to each first application container is the second value, and an application interface is an opaque application interface, the electronic device marks an application interface as a visible application interface and updates the value of the fourth parameter in the interface configuration information of the application corresponding to each first application container to the first value.
[0192] For example, the second value mentioned above can be false.
[0193] In this embodiment, the electronic device updates the value of the fourth parameter in the interface configuration information of the application corresponding to each first application container to the first value, which is used to determine the visibility of other application interfaces in the future.
[0194] It should be noted that when the electronic device updates the value of the fourth parameter in the interface configuration information of the application corresponding to each first application container to the first value, it means that the electronic device updates the value of the fourth parameter in the interface configuration information of the application corresponding to the first application container that is marked as visible to the first value, rather than updating the value of the fourth parameter in the interface configuration information of all applications corresponding to the first application containers.
[0195] It is understandable that when an electronic device traverses all right-side application interfaces in a first application container, the first right-side application interface traversed is the one with the latest creation time, that is, the visible right-side application interface displayed at the top. In other words, when an electronic device traverses all right-side application interfaces in a first application container, the value of the fourth parameter in the interface configuration information of the application corresponding to the first application container obtained for the first time is the second value.
[0196] Step 807: When an application interface is a right-side application interface, an application interface is a top application interface and the fourth parameter in the interface configuration information of each first application container is a second value, and an application interface is a transparent application interface, the electronic device marks an application interface as a visible application interface.
[0197] Step 602: The electronic device traverses all application interfaces in the application corresponding to each first application container and determines whether all application interfaces corresponding to each first application container are visible application interfaces.
[0198] In this embodiment of the application, the electronic device can traverse all application interfaces in the application corresponding to each first application container to determine at least one application interface displayed in each subsequent first application container.
[0199] For example, Figure 11 shows a flowchart of determining the visibility of an application interface according to an embodiment of this application. The steps for an electronic device to determine the visibility of the application interface of an application corresponding to a first application container are described in detail below with reference to Figure 11:
[0200] Step 201: The electronic device obtains the interface configuration information corresponding to the Activity.
[0201] Specifically, during the process of traversing the visibility of an Activity through EnsureActivitiesVisibleHelper, the electronic device first obtains the interface configuration information of the application corresponding to the first application container of the Activity, and then inserts the following visibility judgment logic. When the windowingMode of the application container task corresponding to the Activity is the application multi-landscape display mode, the original visibility result is intercepted and the following instrumentation logic judgment is entered.
[0202] Step 202: The electronic device determines whether the corresponding mBehindFullOccludedForMultiLands is true.
[0203] Specifically, when the electronic device traverses the current Activity, if the mBehindFullOccludedForMultiLands flag of EnsureActivitiesVisibleHelper is true, it means that the current Activity is under an opaque Activity that fills the application container task, i.e., the Activity is covered by an Activity that occupies the full screen area of the application container task, so the electronic device sets the Activity to be invisible; otherwise, step 203 is executed.
[0204] Step 203: The electronic device determines whether the Activity is a full-screen and opaque application interface.
[0205] Specifically, when the electronic device traverses the current Activity, if the Activity is a full-screen Activity and is opaque (e.g., the parameter includesParent is true), then step 204 is executed; otherwise, step 205 is executed.
[0206] Step 204: The electronic device sets the mBehindFullOccludedForMultiLands flag to be enabled.
[0207] Specifically, the electronic device sets the mBehindFullOccludedForMultiLands flag of EnsureActivitiesVisibleHelper to true, meaning the electronic device sets the value of mBehindFullOccludedForMultiLands to true and sets the Activity to be visible. In other words, the visibility of the current Activity is set to true, indicating that this Activity is the application interface displayed in full screen at the top of the application container task.
[0208] Step 205: The electronic device determines whether the Activity is the application interface on the left.
[0209] Specifically, when the electronic device traverses the current Activity, if it is the application interface on the left (masterActivity), then step 206 is executed; otherwise, step 209 is executed.
[0210] It should be noted that electronic devices can obtain whether the current Activity is displayed on the left or right side of the application interface through a specific interface.
[0211] Step 206: The electronic device determines whether the Activity is an application interface that is not displayed at the top and whether the corresponding mBehindMasterOccludedForMultiLands is true.
[0212] Specifically, if the current Activity is the application interface on the left but not the application interface displayed at the top, and the mBehindMasterOccludedForMultiLands property of EnsureActivitiesVisibleHelper is true, then this Activity is covered on the left and the electronic device sets this Activity to be invisible; otherwise, proceed to step 207.
[0213] Step 207: The electronic device determines whether the Activity is an opaque application interface.
[0214] Specifically, if the current Activity is opaque (e.g., the parameter includesParent is true), it means that this Activity is a non-transparent application interface displayed at the top left, and the electronic device executes step 208; otherwise, it means that the current Activity is a transparent application interface displayed at the top left, and the electronic device directly sets the current Activity to be visible, that is, sets the visibility of the current Activity to true. However, since this Activity is transparent, it does not completely cover other application interfaces, so the visibility of its bottom Activity cannot be determined.
[0215] Step 208: The electronic device sets the mBehindMasterOccludedForMultiLands flag to be active.
[0216] Specifically, the electronic device sets the mBehindMasterOccludedForMultiLands flag of EnsureActivitiesVisibleHelper to true, which is used to determine the visibility of the subsequent left-hand Activity and set the current Activity to be visible, that is, to set the visibility of the current Activity to true.
[0217] Step 209: The electronic device determines whether the Activity is the application interface on the right.
[0218] Specifically, when the electronic device traverses the current Activity, if it is the application interface on the right (slaveActivity), then step 210 is executed; otherwise, step 213 is executed.
[0219] Step 210: The electronic device determines whether the Activity is an application interface that is not displayed at the top and whether the corresponding mBehindSlaveOccludedForMultiLands is true.
[0220] Specifically, if the current Activity is the application interface on the right but not the application interface displayed at the top, and the mBehindSlaveOccludedForMultiLands property of EnsureActivitiesVisibleHelper is true, then this Activity is in a state where the right side is covered, and the electronic device sets this Activity to be invisible; otherwise, proceed to step 211.
[0221] Step 211: The electronic device determines whether the Activity is an opaque application interface.
[0222] Specifically, if the current Activity is opaque (e.g., the parameter includesParent is true), it means that this Activity is a non-transparent application interface displayed at the top right, and the electronic device executes step 212; otherwise, it means that the current Activity is a transparent application interface displayed at the top right, and the electronic device directly sets the current Activity to be visible, that is, sets the visibility of the current Activity to true. However, since this Activity is transparent, it does not completely cover other application interfaces, so the visibility of its bottom Activity cannot be determined.
[0223] Step 212: Set the mBehindSlaveOccludedForMultiLands flag to be enabled in the electronic device.
[0224] Specifically, the electronic device sets the mBehindSlaveOccludedForMultiLands flag of EnsureActivitiesVisibleHelper to true, which is used to determine the visibility of the subsequent right-side Activity and to set the current Activity to be visible, that is, to set the visibility of the current Activity to true.
[0225] Step 213: The electronic device returns to the original value and sets the Activity visibility based on the original value.
[0226] Specifically, if none of the above conditions apply, the visibility logic is not interfered with, and the original value is returned directly.
[0227] Step 603: The electronic device determines at least two application interfaces that are visible among all application interfaces corresponding to each first application container.
[0228] In this embodiment of the application, the above-mentioned at least two application interfaces are application interfaces used for subsequent multi-window display.
[0229] In this embodiment, the electronic device can determine the visibility of all Activities within the application container task according to the principle of "if covered, it is not visible", so that it can be displayed normally according to the visibility of the application interface later.
[0230] Step 304: The electronic device displays at least two application interfaces corresponding to each first application container in the split-screen screen based on the split-screen container corresponding to each first application container and the updated window display parameters.
[0231] In this embodiment of the application, the electronic device can display at least two application interfaces corresponding to the first application container in each split-screen container of the split-screen screen based on the updated window display parameters obtained in the above steps.
[0232] This application provides a method for multi-window display of applications. When an electronic device detects a user's screen split-screen operation, the electronic device can obtain at least one first application container whose application interface supports multi-window display. Then, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, the application interface to be displayed in the split-screen container corresponding to each first application container and the display window size information can be determined. Based on the application interface to be displayed and the display window size information, at least two application interfaces corresponding to each first application container are displayed in the split-screen screen and in the split-screen container corresponding to each first application container, respectively. This achieves the simultaneous display of at least two application interfaces of one application in a single split-screen of the electronic device screen, making the display size of each application interface adaptable to the split-screen size of the screen, and the display ratio of each application interface more reasonable. Thus, the display effect of the application interface of the electronic device is improved.
[0233] Optionally, the application multi-window display method provided in this application embodiment may further include the following step 305.
[0234] Step 305: When the electronic device detects a trigger display event for the first application interface, if the window mode parameter in the container configuration information of the first application container corresponding to the first application interface is the first parameter, then the first application interface is displayed.
[0235] In this embodiment of the application, the first application interface is an application interface in the application corresponding to the first application container that is different from the at least two application interfaces.
[0236] In this embodiment of the application, the first application interface is an application interface that is different from the at least two application interfaces in the application corresponding to the first application container.
[0237] In this embodiment of the application, after the electronic device displays at least two application interfaces corresponding to each first application container in the split-screen screen, if the user triggers the electronic device to display a first application interface different from the at least two application interfaces through a first input in the application corresponding to the first application container, that is, when the electronic device displays a new application interface, the electronic device can increase the compatibility with the first application interface with the window mode parameter set to the first parameter in the container configuration information, so that the electronic device can normally display the first application interface in the application multi-window display mode.
[0238] In existing related technologies, as shown in Figure 12, the `handleRequest` method in the `StageCoordinator` is incompatible with multi-landscape mode in the native Android application interface transition (shellTransition) animation flow. When using the application multi-window display method provided in this embodiment to simultaneously display two application interfaces of an application in a split-screen container task, if the user needs to open a new application interface, during the process of the electronic device rendering the application interface according to the animation flow shown in Figure 12, when passing through `handleRequest` in `StageCoordinator`, due to the incompatibility of multi-landscape mode in the existing technology, the subsequent animation display will be different from the split-screen mode, and the subsequent process will exit the split-screen scene. This embodiment adds compatibility with the application multi-window display mode multi-landscape, solving the above problem.
[0239] For example, in this embodiment of the application, the electronic device adds compatibility with the multi-landscape display mode of the application in the stagecoordinator on the WMShell side to meet the subsequent process of the activity startup animation. For example, the electronic device can display the first application interface normally without exiting the split-screen scene when the windowingMode of the application container task corresponding to the first application interface is the application multi-landscape display mode and the application container task is a sub-container of the split-screen container task.
[0240] Optionally, in this embodiment of the application, after the electronic device displays at least two application interfaces corresponding to each first application container in the split-screen screen based on the split-screen container corresponding to each first application container and the updated window display parameters, the electronic device may also add drag controls between each application interface so that the user can adjust the display size of the application interface in real time by operating the drag controls.
[0241] Optionally, in this embodiment of the application, after the electronic device displays at least two application interfaces corresponding to each first application container in the split-screen screen based on the split-screen container corresponding to each first application container and the updated window display parameters, the electronic device can also adjust the display size of at least two application interfaces corresponding to the first application container of the split-screen container in real time according to the size change of the split-screen container.
[0242] In light of the applicable scenarios of the embodiments of this application, and in conjunction with the various implementation schemes of the embodiments of this application described above, specific examples are given below to illustrate the implementation process of the embodiments of this application in specific scenarios:
[0243] Example 1, in conjunction with the above scenario 1: Assume the large-screen electronic device is a foldable phone that can be folded left and right. The foldable phone is in the unfolded state, and the inner screen displays two application interfaces of instant messaging application A in full screen: the contact message list interface of instant messaging application A and the chat interface of contact B. The user performs split-screen input. For example, the user needs to split the foldable phone into two screens, with the application interface of instant messaging application A displayed on the upper screen and the application interface of map application D displayed on the lower screen. When a foldable phone detects a user's split-screen operation on the foldable screen, it will initiate a split-screen operation on the inner screen. Assuming the foldable phone remounts the application container corresponding to instant messaging application A to the upper split-screen container after the split-screen operation, and remounts the application container corresponding to map application D to the lower split-screen container, some container configuration information will change during the split-screen adaptation process. The foldable phone detects these changes and determines whether the application container corresponding to the changed configuration information meets the conditions for multi-window display and whether the environment in which the application container is located meets the conditions for entering the application multi-window display mode. Ultimately, a first application container that meets the above conditions is obtained. This first application container is the application container corresponding to instant messaging application A. The application interface of instant messaging application A supports multi-window display. The application container corresponding to A corresponds to the upper split-screen container after the split-screen is applied. The application container corresponding to the map application D does not meet the conditions for multi-window display. The foldable phone calculates and updates the window display parameters of the first and second windows within the application container corresponding to the instant messaging application A based on the display configuration parameters of the application container corresponding to the instant messaging application A, such as window boundary values, display ratio of the first and second windows, and width of the dividing line between windows. Each window is used to display one application interface of the instant messaging application A. Based on the interface configuration information of the instant messaging application A, such as the visibility marker, display area, and transparency parameters of each interface, the foldable phone obtains two application interfaces in the instant messaging application A with true visibility: the contact message list interface of the instant messaging application A on the left and the chat interface of contact B on the right. As shown in Figure 13, the foldable phone, based on the upper split-screen container after the split screen is split, and the updated window display parameters of the first window 92 and the second window 93, displays the contact message list interface 921 of instant messaging application A in the first window 92 of the upper split screen 91 of the foldable phone after the split screen, and displays the chat interface 931 of contact B in instant messaging application A in the second window 93. Since the application container corresponding to map application D does not meet the conditions for multi-window display, an application interface of map application D, such as map display interface 941, is still displayed in the lower split screen 94 after the split screen is split.
[0244] In the above examples, referring to Figures 1 and 13, it can be seen that the technical solution provided by this application embodiment allows two split-screen container tasks to respectively mount corresponding application container tasks. When the application corresponding to the application container task is adapted to full-screen application multi-window display, without increasing the application adaptation cost, the application can display more content in the split-screen, optimizing the display effect. This optimizes the display effect of third-party applications in split-screen scenarios, allowing the application corresponding to the application container task in the split-screen to display two Activities simultaneously with a more reasonable aspect ratio, reducing application UI display anomalies and displaying more application content. As shown in Figure 13, with one Activity on the left and one Activity on the right, the display ratio is better and more content is displayed compared to Figure 1. Simultaneously, the technical solution provided by this application embodiment ensures the consistency and continuity of the display effect of the application interface after split-screen and the display effect of the application interface in full-screen mode when the application multi-window display permission of a certain application is enabled.
[0245] Each of the above-described method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application does not impose any restrictions on this.
[0246] The application multi-window display method provided in this application embodiment can be executed by an application multi-window display device. This application embodiment uses an application multi-window display device executing the application multi-window display method as an example to illustrate the application multi-window display device provided in this application embodiment.
[0247] Figure 14 illustrates a possible structural diagram of an application multi-window display device according to some embodiments of this application. As shown in Figure 14, the application multi-window display device 10 may include an acquisition module 11 and a display module 12. The acquisition module 11 is used to acquire at least one first application container when a screen splitting operation is detected on the screen of the application multi-window display device 10. The application interface of the first application container supports multi-window display, and each first application container corresponds to one screen splitting container. The display module 12 is used to display at least two application interfaces corresponding to each first application container on the split-screen screen based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding screen splitting container acquired by the acquisition module 11.
[0248] In one possible implementation, referring to Figures 14 and 15, the application multi-window display device 10 may further include a processing module 13. This processing module 13 is used to update the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container obtained by the acquisition module 11, with each window displaying an application interface. The acquisition module 11 is also used to obtain at least two application interfaces corresponding to each first application container based on the interface configuration information of the application corresponding to each first application container. Specifically, the display module 12 is used to display the at least two application interfaces corresponding to each first application container obtained by the acquisition module 11 in the split-screen screen based on the split-screen container corresponding to each first application container obtained by the acquisition module 11 and the updated window display parameters of the processing module 13.
[0249] In one possible implementation, referring to Figures 14 and 15, the application multi-window display device 10 may further include a determining module 14. This determining module 14 is used to determine whether the configuration information of the at least one container satisfies the multi-window display conditions if the configuration information of the at least one container changes before the obtaining module 11 obtains the at least one first application container. The determining module 14 is also used to determine the container corresponding to the configuration information of the at least one container that satisfies the multi-window display conditions as the at least one first application container.
[0250] In one possible implementation, the multi-window display conditions include at least one of the following: the container corresponding to the at least one container configuration information is an application container; the application corresponding to the container corresponding to the at least one container configuration information has an application interface that can be displayed in multiple windows; the application corresponding to the container corresponding to the at least one container configuration information has permission for multi-window display; when the application corresponding to the container corresponding to the at least one container configuration information is a specific application, the specific application is in an account login state; the at least one container configuration information includes information related to the display of the application interface; the at least one container configuration information includes at least one of application information, split-screen information, and application interface information.
[0251] In one possible implementation, referring to Figure 14 and as shown in Figure 15, the application multi-window display device 10 may further include a processing module 13. This processing module 13 is further configured to, after the acquisition module 11 acquires at least one first application container, update the window mode parameter in the container configuration information of the at least one first application container to a first parameter, which indicates that the application corresponding to the first application container supports multi-window display.
[0252] In one possible implementation, the display module 12 is further configured to, upon detecting a trigger display event for the first application interface, display the first application interface if the window mode parameter in the container configuration information of the first application container corresponding to the first application interface is the first parameter, wherein the first application interface is an application interface in the application corresponding to the first application container that is different from the above at least two application interfaces.
[0253] In one possible implementation, the acquisition module 11 is further configured to, before the processing module 13 updates the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container, acquire four gap distances corresponding to each first application container, where each gap distance is a gap distance reserved on one side of a first application container; and acquire the width value of each first application container and the display ratio of at least two windows within each first application container. Specifically, the processing module 13 is configured to, based on the four gap distances corresponding to each first application container, the width value of each first application container, and the display ratio of at least two windows within each first application container acquired by the acquisition module 11, calculate the display coordinate information of at least two windows within each first application container; and, based on the display coordinate information of at least two windows within each first application container, update the window display parameters of at least two windows within each first application container.
[0254] In one possible implementation, referring to Figure 14 and as shown in Figure 15, the application multi-window display device 10 may further include a determining module 14. This determining module 14 is configured to, for each application interface corresponding to a first application container, determine whether the application interface is a visible application interface based on a second parameter in the interface configuration information of the application corresponding to each first application container, and the display area and transparency parameters of the application interface. The second parameter indicates whether the application interface is covered by the application interface of an application container occupying the corresponding display area. It also traverses all application interfaces corresponding to each first application container to determine whether all application interfaces corresponding to each first application container are visible application interfaces. Finally, it identifies the visible application interfaces among all application interfaces corresponding to each first application container as at least two application interfaces corresponding to each first application container.
[0255] In one possible implementation, the second parameter is used to indicate whether an application interface is covered by the application interface of an application container that occupies the full-screen area. Specifically, the determining module 14 is used to mark an application interface as invisible if the value of the second parameter in the interface configuration information of the application corresponding to each first application container is a first value; or, if the value of the second parameter in the interface configuration information of the application corresponding to each first application container is a second value, to determine whether the application interface is visible based on the display area and transparency parameters of the application interface.
[0256] In one possible implementation, the determining module 14 is specifically used to mark an application interface as a visible application interface when the application interface is a full-screen and opaque application interface. The processing module 13 is further used to update the value of the second parameter in the interface configuration information of the application corresponding to each first application container to the first value.
[0257] In one possible implementation, the determining module 14 is specifically configured to: mark an application interface as invisible when the application interface is a left-side application interface, is not a top-side application interface, and the value of the third parameter in the interface configuration information of each first application container is a first value; the third parameter indicates whether the application interface is covered by the application interface of an application container occupying the left-side area; or, mark an application interface as visible when the application interface is a left-side application interface, is a top-side application interface, the value of the third parameter in the interface configuration information of each first application container is a second value, and the application interface is opaque, and update the value of the third parameter in the interface configuration information of each first application container to the first value; or, mark an application interface as visible when the application interface is a left-side application interface, is a top-side application interface, the value of the third parameter in the interface configuration information of each first application container is a second value, and the application interface is transparent.
[0258] In one possible implementation, the determining module 14 is specifically configured to: mark an application interface as invisible when the application interface is a right-side application interface, is not a top application interface, and the value of the fourth parameter in the interface configuration information of each first application container is a first value; the fourth parameter indicates whether the application interface is covered by the application interface of an application container occupying the right-side area; or, mark an application interface as visible when the application interface is a right-side application interface, is a top application interface, the value of the fourth parameter in the interface configuration information of each first application container is a second value, and the application interface is opaque, and update the value of the fourth parameter in the interface configuration information of each first application container to the first value; or, mark an application interface as visible when the application interface is a right-side application interface, is a top application interface, the value of the fourth parameter in the interface configuration information of each first application container is a second value, and the application interface is transparent.
[0259] This application provides an application multi-window display device. When the application multi-window display device detects a user's screen split-screen operation, it can obtain at least one first application container whose application interface supports multi-window display. Then, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, it can determine the application interface to be displayed in the split-screen container corresponding to each first application container and the display window size information. Based on the application interface to be displayed and the display window size information, it displays at least two application interfaces corresponding to each first application container in both the split-screen screen and the corresponding split-screen container. This achieves the simultaneous display of at least two application interfaces of one application in a single split-screen of the application multi-window display device, making the display size of each application interface adaptable to the split-screen size of the screen, and the display ratio of each application interface more reasonable. Thus, the display effect of the application interface of the application multi-window display device is improved.
[0260] The multi-window display device used in the embodiments of this application can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. The embodiments of this application do not impose specific limitations.
[0261] The multi-window display device used in the embodiments of this application can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application does not specifically limit the specific operating system used.
[0262] The multi-window display device provided in this application embodiment can realize the various processes implemented in the above method embodiments, and will not be repeated here to avoid repetition.
[0263] Optionally, as shown in FIG16, this application embodiment also provides an electronic device 1600, including a processor 1601 and a memory 1602. The memory 1602 stores a program or instructions that can run on the processor 1601. When the program or instructions are executed by the processor 1601, they implement the various steps of the above-described application multi-window display method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0264] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0265] Figure 17 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of this application.
[0266] The electronic device 1700 includes, but is not limited to, components such as: radio frequency unit 1701, network module 1702, audio output unit 1703, input unit 1704, sensor 1705, display unit 1706, user input unit 1707, interface unit 1708, memory 1709, and processor 1710.
[0267] Those skilled in the art will understand that the electronic device 1700 may also include a power supply (such as a battery) for powering various components. The power supply may be logically connected to the processor 1710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in Figure 17 does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0268] The processor 1710 is configured to, upon detecting a split-screen operation on the screen of the electronic device 1700, acquire at least one first application container, wherein the application interface of the corresponding application supports multi-window display, and each first application container corresponds to one split-screen container. The display unit 1706 is configured to, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, display at least two application interfaces corresponding to each first application container on the split-screen screen.
[0269] Optionally, the processor 1710 is further configured to update the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container, with each window displaying an application interface respectively. The processor 1710 is also configured to obtain at least two application interfaces corresponding to each first application container based on the interface configuration information of the application corresponding to each first application container. Specifically, the display unit 1706 is configured to display at least two application interfaces corresponding to each first application container on the split-screen screen based on the split-screen container corresponding to each first application container and the updated window display parameters.
[0270] Optionally, the processor 1710 is further configured to, before acquiring at least one first application container, determine whether the configuration information of the at least one container satisfies the multi-window display condition if the configuration information of the at least one container changes. The processor 1710 is also configured to identify the container corresponding to the configuration information of the at least one container that satisfies the multi-window display condition as the at least one first application container.
[0271] Optionally, the above-mentioned multi-window display conditions include at least one of the following: the container corresponding to the at least one container configuration information is an application container; the application corresponding to the container corresponding to the at least one container configuration information has an application interface that can be displayed in multiple windows; the application corresponding to the container corresponding to the at least one container configuration information has the permission to display in multiple windows; when the application corresponding to the container corresponding to the at least one container configuration information is a specific application, the specific application is in an account login state; the at least one container configuration information includes information related to the display of the application interface; the at least one container configuration information includes at least one of application information, split-screen information, and application interface information.
[0272] Optionally, the processor 1710 is further configured to, after obtaining at least one first application container, update the window mode parameter in the container configuration information of the at least one first application container to a first parameter, wherein the first parameter is used to indicate that the application corresponding to the first application container supports multi-window display.
[0273] Optionally, the display unit 1706 is further configured to, upon detecting a trigger display event for the first application interface, display the first application interface if the window mode parameter in the container configuration information of the first application container corresponding to the first application interface is the first parameter, wherein the first application interface is an application interface in the application corresponding to the first application container that is different from the above at least two application interfaces.
[0274] Optionally, the processor 1710 is further configured to, before updating the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container, obtain four gap distances corresponding to each first application container, where each gap distance is a gap distance reserved on one side of a first application container; and obtain the width value of each first application container and the display ratio of at least two windows within each first application container. Specifically, the processor 1710 is configured to calculate the display coordinate information of at least two windows within each first application container based on the four gap distances corresponding to each first application container, the width value of each first application container, and the display ratio of at least two windows within each first application container; and update the window display parameters of at least two windows within each first application container based on the display coordinate information of at least two windows within each first application container.
[0275] Optionally, the processor 1710 is further configured to, for each application interface corresponding to the application of the first application container, determine whether the application interface is a visible application interface based on a second parameter in the interface configuration information of the application corresponding to the first application container, and the display area and transparency parameters of the application interface, wherein the second parameter is used to indicate whether the application interface is covered by the application interface of an application container occupying the corresponding display area; and to traverse all application interfaces corresponding to the application of the first application container to determine whether all application interfaces corresponding to the first application container are visible application interfaces; and to determine at least two application interfaces corresponding to the first application container from the visible application interfaces among all application interfaces corresponding to the first application container.
[0276] Optionally, the second parameter is used to indicate whether an application interface is covered by an application interface of an application container occupying the full-screen area. Specifically, the processor 1710 is used to mark an application interface as invisible when the value of the second parameter in the interface configuration information of the application corresponding to each first application container is a first value; or, when the value of the second parameter in the interface configuration information of the application corresponding to each first application container is a second value, to determine whether the application interface is a visible application interface based on the display area and transparency parameters of the application interface.
[0277] Optionally, the processor 1710 is specifically used to mark an application interface as a visible application interface when the application interface is a full-screen and opaque application interface, and update the value of the second parameter in the interface configuration information of the application corresponding to each first application container to the first value.
[0278] Optionally, the processor 1710 is specifically configured to: mark an application interface as invisible when the application interface is a left-side application interface, and the application interface is not a top application interface, and the value of the third parameter in the interface configuration information of each first application container is a first value; the third parameter is used to indicate whether the application interface is covered by the application interface of an application container occupying the left-side area; or, mark an application interface as visible when the application interface is a left-side application interface, and the application interface is a top application interface, and the value of the third parameter in the interface configuration information of each first application container is a second value, and the application interface is an opaque application interface, and update the value of the third parameter in the interface configuration information of each first application container to the first value; or, mark an application interface as visible when the application interface is a left-side application interface, and the application interface is a top application interface, and the value of the third parameter in the interface configuration information of each first application container is a second value, and the application interface is a transparent application interface.
[0279] Optionally, the processor 1710 is specifically configured to: mark an application interface as invisible when the application interface is a right-side application interface, and the application interface is not a top application interface, and the value of the fourth parameter in the interface configuration information of each first application container is a first value; the fourth parameter is used to indicate whether the application interface is covered by the application interface of an application container occupying the right-side area; or, mark an application interface as visible when the application interface is a right-side application interface, and the application interface is a top application interface, and the value of the fourth parameter in the interface configuration information of each first application container is a second value, and the application interface is an opaque application interface, and update the value of the fourth parameter in the interface configuration information of each first application container to the first value; or, mark an application interface as visible when the application interface is a right-side application interface, and the application interface is a top application interface, and the value of the fourth parameter in the interface configuration information of each first application container is a second value, and the application interface is a transparent application interface.
[0280] This application provides an electronic device that, when detecting a user's screen split-screen operation, can acquire at least one first application container whose application interface supports multi-window display. Then, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, it can determine the application interface to be displayed in the split-screen container corresponding to each first application container, as well as the display window size information. Based on the application interface to be displayed and the display window size information, it displays at least two application interfaces corresponding to each first application container in both the split-screen screen and the corresponding split-screen container. This achieves simultaneous display of at least two application interfaces of one application within a single split-screen window after the electronic device screen is split, making the display size of each application interface adaptable to the split-screen size of the screen, and resulting in a more reasonable display ratio for each application interface. This improves the display effect of the application interface on the electronic device.
[0281] The electronic device provided in this application embodiment can implement all the processes implemented in the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here. The beneficial effects of the various implementation methods in this embodiment can be found in the beneficial effects of the corresponding implementation methods in the above method embodiments. To avoid repetition, it will not be described again here.
[0282] It should be understood that, in this embodiment, the input unit 1704 may include a graphics processing unit (GPU) 17041 and a microphone 17042. The GPU 17041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1706 may include a display panel 17061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1707 includes at least one of a touch panel 17071 and other input devices 17072. The touch panel 17071 is also called a touch screen. The touch panel 17071 may include a touch detection device and a touch controller. Other input devices 17072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0283] The memory 1709 can be used to store software programs and various data. The memory 1709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1709 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1709 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0284] Processor 1710 may include one or more processing units; optionally, processor 1710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1710.
[0285] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described application multi-window display method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0286] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0287] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described multi-window display method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0288] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0289] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the multi-window display method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0290] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0291] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0292] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A multi-window display method applied to an electronic device, the method comprising: When a split-screen operation on the screen of the electronic device is detected, at least one first application container is obtained. The application interface of the application corresponding to the first application container supports multi-window display, and each first application container corresponds to a split-screen container. Based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container, at least two application interfaces corresponding to each first application container are displayed on the screen after splitting the screen.
2. The method according to claim 1, wherein, The step of displaying at least two application interfaces corresponding to each first application container in the split-screen screen based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container includes: Based on the display configuration parameters of each of the first application containers, update the window display parameters of at least two windows within each of the first application containers, wherein each window is used to display an application interface. Based on the interface configuration information of the application corresponding to each first application container, obtain at least two application interfaces corresponding to each first application container; Based on the split-screen container corresponding to each of the first application containers and the updated window display parameters, at least two application interfaces corresponding to each of the first application containers are displayed in the split-screen screen.
3. The method according to claim 1, wherein, Before obtaining at least one first application container, the method further includes: If at least one container configuration information changes, determine whether the at least one container configuration information meets the multi-window display conditions; The acquisition of at least one first application container includes: The container corresponding to the container configuration information that satisfies the multi-window display condition in the at least one container configuration information is determined as the at least one first application container.
4. The method according to claim 3, wherein, The multi-window display conditions include at least one of the following: The container corresponding to the at least one container configuration information is an application container; The application corresponding to the container with the at least one container configuration information has an application interface that can be displayed in multiple windows; The application corresponding to the container corresponding to the at least one container configuration information has the permission to display multiple windows; If the application corresponding to the container corresponding to the at least one container configuration information is a specific application, the specific application is in an account login state; The at least one container configuration information includes information related to the application interface display; The at least one container configuration information includes at least one of application information, split-screen information, and application interface information.
5. The method according to claim 3, wherein, After obtaining at least one first application container, the method further includes: The window mode parameter in the container configuration information of the at least one first application container is updated to a first parameter, which is used to indicate that the application corresponding to the first application container supports multi-window display.
6. The method according to claim 5, wherein, The method further includes: If a trigger display event for the first application interface is detected, and the window mode parameter in the container configuration information of the first application container corresponding to the first application interface is the first parameter, then the first application interface is displayed. The first application interface is an application interface in the application corresponding to the first application container that is different from the at least two application interfaces.
7. The method according to claim 2, wherein, Before updating the window display parameters of at least two windows within each first application container based on the display configuration parameters of each first application container, the method further includes: Obtain the four gap distances corresponding to each of the first application containers. Each gap distance is the gap distance reserved on one edge of a first application container. Obtain the width value of each of the first application containers and the display ratio of at least two windows within each of the first application containers; The step of updating the window display parameters of at least two windows within each of the first application containers based on the display configuration parameters of each first application container includes: Based on the four gap distances corresponding to each first application container, the width value of each first application container, and the display ratio of at least two windows within each first application container, calculate the display coordinate information of at least two windows within each first application container; Update the window display parameters of at least two windows within each of the first application containers based on the display coordinate information of at least two windows within each of the first application containers.
8. The method according to claim 2, wherein, The step of obtaining at least two application interfaces corresponding to each first application container based on the interface configuration information of the application corresponding to each first application container includes: For each application interface corresponding to the first application container, based on the second parameter in the interface configuration information of each application corresponding to the first application container, and the display area and transparency parameters of the application interface, it is determined whether the application interface is a visible application interface. The second parameter is used to indicate whether the application interface is covered by the application interface of an application container that occupies the corresponding display area. Iterate through all application interfaces in each application corresponding to the first application container, and determine whether all application interfaces corresponding to each first application container are visible application interfaces. The visible application interfaces among all application interfaces corresponding to each first application container are determined to be at least two application interfaces corresponding to each first application container.
9. The method according to claim 8, wherein, The second parameter is used to indicate whether the application interface is covered by the application interface of an application container that occupies the full-screen area; The step of determining whether an application interface is a visible application interface based on the second parameter in the interface configuration information of the application corresponding to each first application container, and the display area and transparency parameters of the application interface, includes: If the value of the second parameter in the interface configuration information of each application corresponding to the first application container is a first value, then the application interface is marked as an invisible application interface. When the value of the second parameter in the interface configuration information of each application corresponding to the first application container is a second value, it is determined whether the application interface is a visible application interface based on the display area and transparency parameters of the application interface.
10. The method according to claim 9, wherein, Determining whether an application interface is visible based on its display area and transparency parameters includes: When an application interface is a full-screen and opaque application interface, the application interface is marked as a visible application interface, and the value of the second parameter in the interface configuration information of each application corresponding to the first application container is updated to the first value.
11. The method according to claim 9, wherein, Determining whether an application interface is visible based on its display area and transparency parameters includes: If an application interface is a left-side application interface and is not a top application interface, and the value of the third parameter in the interface configuration information of each first application container is a first value, the application interface is marked as an invisible application interface. The third parameter is used to indicate whether the application interface is covered by the application interface of an application container occupying the left-side area. When an application interface is a left-side application interface, and an application interface is a top application interface, and the value of the third parameter in the interface configuration information of each first application container corresponding to the application is a second value, and the application interface is an opaque application interface, the application interface is marked as a visible application interface, and the value of the third parameter in the interface configuration information of each first application container corresponding to the application is updated to a first value. When an application interface is a left-side application interface, and an application interface is a top application interface, and the value of the third parameter in the interface configuration information of each application corresponding to the first application container is a second value, and the application interface is a transparent application interface, the application interface is marked as a visible application interface.
12. The method according to claim 9, wherein, Determining whether an application interface is visible based on its display area and transparency parameters includes: If the application interface is a right-side application interface and the application interface is not a top application interface and the value of the fourth parameter in the interface configuration information of each first application container is a first value, the application interface is marked as an invisible application interface. The fourth parameter is used to indicate whether the application interface is covered by the application interface of an application container that occupies the right-side area. When an application interface is a right-side application interface, and an application interface is a top application interface, and the value of the fourth parameter in the interface configuration information of each first application container corresponding to the application is a second value, and the application interface is an opaque application interface, the application interface is marked as a visible application interface, and the value of the fourth parameter in the interface configuration information of each first application container corresponding to the application is updated to a first value. When an application interface is a right-side application interface, and an application interface is a top application interface with the fourth parameter in the interface configuration information of each application corresponding to the first application container being a second value, and the application interface is a transparent application interface, the application interface is marked as a visible application interface.
13. A multi-window display device, comprising: Acquisition module and display module; The acquisition module is used to acquire at least one first application container when a split-screen operation on the screen of the application multi-window display device is detected. The application interface of the application corresponding to the first application container supports multi-window display, and each first application container corresponds to a split-screen container. The display module is used to display at least two application interfaces corresponding to each first application container in the screen after splitting the screen, based on the display configuration parameters of each first application container, the interface configuration information of the corresponding application, and the corresponding split-screen container obtained by the acquisition module.
14. The apparatus according to claim 13, wherein, The device further includes: a processing module; The processing module is used to update the window display parameters of at least two windows in each first application container based on the display configuration parameters of each first application container obtained by the acquisition module, wherein each window is used to display an application interface. The acquisition module is further configured to acquire at least two application interfaces corresponding to each first application container based on the interface configuration information of the application corresponding to each first application container. The display module is specifically used to display at least two application interfaces corresponding to each of the first application containers obtained by the acquisition module in the screen after splitting the screen, based on the split-screen container corresponding to each of the first application containers obtained by the acquisition module and the window display parameters updated by the processing module.
15. The apparatus according to claim 13, wherein, The device further includes: a determining module; The determining module is used to determine whether the configuration information of the at least one container meets the multi-window display conditions if the configuration information of the at least one container changes before the obtaining module obtains the at least one first application container. The determining module is further configured to determine the container corresponding to the container configuration information that satisfies the multi-window display condition from the at least one container configuration information as the at least one first application container.
16. An electronic device comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the application multi-window display method as described in any one of claims 1-12.
17. A computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the application multi-window display method as described in any one of claims 1-12.
18. A chip comprising a processor and a communication interface coupled to the processor, the processor being configured to run a program or instructions to implement the steps of the application multi-window display method as described in any one of claims 1-12.
19. A computer program product stored in a non-transient storage medium, the program product being executed by at least one processor to implement the steps of the application multi-window display method as claimed in any one of claims 1-12.