Split-screen display method, electronic equipment and computer readable storage medium
By automatically adjusting the position of the split-screen window in electronic devices, the problem of users needing to manually adjust the position of the window in split-screen mode is solved, simplifying the operation process and improving the user experience.
Patent Information
- Application Number
- CN202311163748.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-09
- Publication Date
- 2025-03-18
AI Technical Summary
In split screen mode, users need to manually adjust the position of the split screen window, resulting in low intelligence and poor user experience.
By implementing the method of automatically adjusting the position of the split-screen window in the electronic device, the specific steps include receiving a user operation, switching the split-screen mode in response to the operation, and rotating the window according to the adaptability of the display method and the split-screen mode.
It simplifies the operation process, improves the user experience, and enhances the intelligence of electronic devices.
Smart Images

Figure CN119645265A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal display, and in particular to a split-screen display method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development of terminal technology, users' functional requirements for electronic devices are becoming more and more diverse. For example, in order to meet users' needs to use multiple applications in the same time period, more electronic devices can support split-screen mode. In this split-screen mode, the screen of the electronic device can display two or more application windows so that users can view the content displayed in multiple windows. At present, when an electronic device displays multiple application windows in split screen, users are usually required to manually adjust the position of the split-screen windows, which has a low degree of intelligence and a poor user experience. Summary of the invention
[0003] The present application provides a split-screen display method, an electronic device and a computer-readable storage medium. The electronic device can automatically adjust the position of the split-screen window in the split-screen mode, which simplifies the operation process and helps to improve the user experience.
[0004] In order to achieve the above objectives, this application adopts the following technical solutions:
[0005] In a first aspect, a split-screen display method is provided, which is applied to an electronic device, wherein the electronic device includes a display screen, and the method includes:
[0006] The electronic device displays a first interface, wherein the first interface displays a first split-screen window of a first application and a second split-screen window of a launch bar of the application, wherein the first split-screen window and the second split-screen window are arranged in a first split-screen mode;
[0007] Receiving a first operation of a user on a first icon in the first split-screen window, wherein the first operation is used to open a second application corresponding to the first icon;
[0008] In response to the first operation, the electronic device displays a second interface, wherein the second interface displays the first split-screen window and a third split-screen window of the second application, and the first split-screen window and the third split-screen window are arranged in a second split-screen mode.
[0009] The first operation may be a click, a touch, or the like.
[0010] In an embodiment of the present application, the first split-screen mode is left-right split-screen, and the second split-screen mode is top-bottom split-screen; or, the first split-screen mode is top-bottom split-screen, and the second split-screen mode is left-right split-screen.
[0011] Exemplarily, in the case where the first split-screen mode is left-right split-screen and the second split-screen mode is top-bottom split-screen, in response to the first operation, the electronic device switches from the first split-screen window and the second split-screen window of the left-right split-screen to the first split-screen window and the third split-screen window of the top-bottom split-screen. In the case where the first split-screen mode is top-bottom split-screen and the second split-screen mode is left-right split-screen, in response to the first operation, the electronic device switches from the first split-screen window and the second split-screen window of the top-bottom split-screen to the first split-screen window and the third split-screen window of the left-right split-screen.
[0012] As can be seen from the above, in the embodiment of the present application, after the electronic device opens multiple applications in the split-screen mode, it can automatically adjust the position of the split-screen windows, which simplifies the operation process and helps to improve the user experience.
[0013] In an implementation of the first aspect, the method further includes:
[0014] In response to the first operation, if the first application and the third application are both displayed in the first display mode, the electronic device displays the second interface;
[0015] Among them, the first display mode is adapted to the second split-screen mode.
[0016] In the embodiment of the present application, the first display mode includes horizontal screen display and vertical screen display.
[0017] It is understandable that when the application is displayed in horizontal screen, the split-screen mode of upper and lower screens is adopted, and the application window is more easily adapted to the size of the display area, which is more conducive to improving the user viewing experience; while when the application is displayed in vertical screen, the split-screen mode of left and right screens is adopted, and the application window is more easily adapted to the size of the display area, which is more conducive to improving the user viewing experience. In other words, in the embodiment of the present application, the display mode of horizontal screen display is adapted to the split-screen mode of upper and lower screens, and the display mode of vertical screen display is adapted to the split-screen mode of left and right screens.
[0018] Exemplarily, when the first display mode is horizontal screen display and the second split screen mode is top-bottom split screen, in response to the first operation, if the first application and the third application are both displayed in horizontal screen, the electronic device displays the second interface. When the first display mode is vertical screen display and the second split screen mode is left-right split screen, in response to the first operation, if the first application and the third application are both displayed in vertical screen, the electronic device displays the second interface.
[0019] Through the above method, when the display mode of the split-screen application is compatible with the second split-screen mode, the electronic device rotates the split-screen window, that is, switches from the first split-screen mode to the second split-screen mode. This method can effectively reduce the occurrence of abnormal display images due to the incompatibility of the display mode and the split-screen mode, thereby improving the intelligence level of the electronic device and helping to enhance the user viewing experience.
[0020] In an implementation of the first aspect, the method further includes:
[0021] When both the first application and the third application support the second split-screen mode, in response to the first operation, the electronic device displays the second interface.
[0022] Exemplarily, when the second split-screen mode is top-bottom split-screen, if both the first application and the third application support top-bottom split-screen, in response to the first operation, the electronic device switches from left-right split-screen to top-bottom split-screen, and displays the second interface. When the second split-screen mode is left-right split-screen, if both the first application and the third application support left-right split-screen, in response to the first operation, the electronic device switches from top-bottom split-screen to left-right split-screen, and displays the second interface.
[0023] In an embodiment of the present application, under the premise of ensuring that all split-screen applications support the second split-screen mode, the electronic device switches from the first allocation mode to the second split-screen mode. This method can effectively reduce the occurrence of abnormal display after rotating the split-screen window due to the application not supporting the split-screen mode, thereby improving the intelligence level of the electronic device and helping to enhance the user viewing experience.
[0024] In an implementation of the first aspect, the method further includes:
[0025] In response to the first operation, the electronic device starts the second application;
[0026] The electronic device determines whether the application window of the second application replaces the second split-screen window;
[0027] If the application window of the second application replaces the second split-screen window, the electronic device replaces the second split-screen window with the third split-screen window and displays the second interface.
[0028] Each application corresponds to an Activity. When an application is opened and an Activity is started, a task needs to be added accordingly and the task needs to be moved to the foreground. In some implementations, the step of determining whether the application window of the second application replaces the second split-screen window can be performed after the task corresponding to the application is moved to the foreground. In this implementation, if it is determined that the split-screen window is not to be replaced, the task of the started application needs to be moved to the background again. The interaction process is cumbersome and affects the response speed of the electronic device. In the embodiment of the present application, it is equivalent to performing the step of determining whether the application window of the second application replaces the second split-screen window after the application is started and before the task is moved to the foreground. Through the method in the embodiment of the present application, the judgment process is optimized, that is, the step of determining whether to replace the existing split-screen window is advanced, and the corresponding task is moved to the foreground after it is determined to replace the existing split-screen window, which effectively reduces the interaction process and helps to improve the response speed of the electronic device.
[0029] In an implementation of the first aspect, the electronic device determines whether the application window of the second application replaces the second split-screen window, including:
[0030] The electronic device traverses the established split-screen pairs, wherein each split-screen pair includes at least two split-screen windows;
[0031] If there is a split-screen pair in the foreground, the electronic device determines to replace the second split-screen window.
[0032] In an implementation of the first aspect, after the electronic device replaces the second split screen window with the third split screen window, the method further includes:
[0033] The electronic device determines whether the third split-screen window conforms to a preset mode, wherein the preset mode indicates that a size of the split-screen window conforms to a size of a display area to which the split-screen window belongs;
[0034] If the third split-screen window complies with a preset mode, the electronic device displays the second interface.
[0035] In the embodiment of the present application, the preset mode is also called the compatible mode, which means that the size of the split-screen window matches the size of the display area to which the split-screen window belongs. In some cases, the split-screen window can adaptively match the size of the display area so that the content in the split-screen window can be displayed normally.
[0036] Through the above method, it is equivalent to the electronic device executing split-screen mode switching under the premise of ensuring that the size of the third split-screen window can adaptively match the size of the display area. This method can effectively reduce the occurrence of abnormal display images after the split-screen window is rotated due to the incompatibility of the split-screen window and the display area size, thereby improving the intelligence level of the electronic device and helping to enhance the user viewing experience.
[0037] In an implementation of the first aspect, the electronic device determines whether the third split-screen window conforms to a preset mode, including:
[0038] When the first split-screen mode is left-right split-screen, determining whether the third split-screen window satisfies a first condition or a second condition, wherein the first condition includes that the height of the split-screen window is greater than the width and the split-screen window is in a horizontal orientation, and the second condition includes that the height of the split-screen window is less than or equal to the width and the size of the split-screen window conforms to the size of the display area to which the split-screen window belongs;
[0039] If the third split-screen window satisfies the first condition or the second condition, the electronic device determines that the third split-screen window complies with a preset mode.
[0040] In an implementation of the first aspect, the electronic device determines whether the third split-screen window conforms to a preset mode, including:
[0041] When the first split-screen mode is top-bottom split-screen, determining whether the third split-screen window satisfies a third condition or a fourth condition, wherein the third condition includes that the height of the split-screen window is less than or equal to the width and the split-screen window is in a vertical orientation, and the fourth condition includes that the height of the split-screen window is greater than the width and the size of the split-screen window conforms to the size of the display area to which the split-screen window belongs;
[0042] If the third split-screen window satisfies the first condition or the second condition, the electronic device determines that the third split-screen window complies with a preset mode.
[0043] In the embodiment of the present application, in the split-screen mode, the entire display area of the display screen is divided into at least two display areas by the split-screen bar. The size of the split-screen window conforms to the size of the display area, which means that the width of the split-screen window is smaller than the width of the display area.
[0044] In the embodiment of the present application, since the first split screen window has been displayed in the foreground, it means that the first split screen window supports the compatible mode. Therefore, it is only necessary to determine whether the third split screen window supports the compatible mode. This can reduce the determination steps and improve the response speed of the electronic device.
[0045] Of course, in other implementations, it is also possible to re-determine whether the first split-screen window supports the compatible mode, that is, the electronic device determines whether the first split-screen window and the third split-screen window both support the preset mode.
[0046] In an implementation of the first aspect, after the electronic device replaces the second split screen window with the third split screen window, the method further includes:
[0047] The electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode;
[0048] If the first split-screen window and the second split-screen window support the second split-screen mode, the electronic device displays the second interface.
[0049] The embodiment of the present application is equivalent to the electronic device executing split-screen mode switching under the premise of ensuring that all split-screen windows currently displayed in the foreground support the second split-screen mode. This method can effectively reduce the occurrence of abnormal display images after the split-screen window is rotated due to the split-screen window not supporting the split-screen mode, thereby improving the intelligence level of the electronic device and helping to enhance the user viewing experience.
[0050] In an implementation of the first aspect, the electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode, including:
[0051] The electronic device determines whether the first application and the second application support split-screen display;
[0052] If the first application and the second application support split-screen display, the electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode.
[0053] In an implementation of the first aspect, the electronic device determines whether the first application and the second application support split-screen display, including:
[0054] The electronic device acquires a preset database, wherein the preset database includes application package names of application programs supporting split-screen display;
[0055] The electronic device searches the preset database for an application package name of a target application, wherein the target application is the first application or the second application;
[0056] If the application package name of the target application exists in the preset database, the electronic device determines that the target application supports split-screen display.
[0057] In an embodiment of the present application, whether an application supports split-screen display is determined through a preset database. Since the data in the preset database is pre-stored, this method can improve the judgment efficiency and at the same time help improve the reliability of the judgment result.
[0058] In another implementation, the application carries a second flag, which is used to declare whether the window size is variable. The task module obtains the second flag of the currently determined application, and determines whether the application supports the split-screen window mode according to the second flag.
[0059] In an implementation of the first aspect, the electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode, including:
[0060] The electronic device obtains a preset file, wherein the preset file includes application package names and a first flag bit of each of a plurality of application programs, and the first flag bit is used to indicate whether the second split-screen mode is supported;
[0061] The electronic device determines whether the target application supports the second split-screen mode according to a first flag bit corresponding to an application package name of the target application in the preset file, wherein the target application is the first application or the third application.
[0062] In the embodiment of the present application, the preset file may be a component configuration management (CCM) file, and the CCM file may be a file in XML format.
[0063] In the embodiment of the present application, a preset file is used to determine whether the split-screen pair supports upper and lower split-screen. Since the preset file is pre-stored, this method can improve the judgment efficiency and help improve the reliability of the judgment result.
[0064] In an implementation of the first aspect, after the electronic device replaces the second split screen window with the third split screen window, the method further includes:
[0065] Determining, by the electronic device, whether it is currently in the first split-screen mode;
[0066] If the first split-screen mode is currently in place, the electronic device displays the second interface.
[0067] In an implementation of the first aspect, the electronic device determines whether it is currently in the first split-screen mode, including:
[0068] If the position of the main split screen is the first preset position, and the position of the secondary split screen is the second preset position, the electronic device determines that it is currently in the first split screen mode;
[0069] Among them, the main split screen is any one of the split screen windows currently displayed, the secondary split screen is a split screen window other than the main split screen in the currently displayed split screen window, and the first preset position and the second preset position are arranged in the first split screen mode.
[0070] The electronic device switches to the split screen mode, generates a split screen bar, and accordingly generates a position configuration matching the split screen bar. The position configuration can be understood as the position of the display area relative to the split screen bar.
[0071] For example, in the left-right split screen mode, the display area on the left side of the split screen bar can be defined as the position of the left split screen, and the display area on the right side of the split screen bar can be defined as the position of the right split screen. In the process of generating a split screen pair, the main split screen and the secondary split screen in the split screen pair can be defined. When the position of the main split screen is equal to the position of the left split screen, and the position of the secondary split screen is equal to the position of the right split screen, it is determined that the current screen is left-right split screen.
[0072] It should be noted that in the scenario where the top and bottom split screen automatically rotates to the left and right split screen, one way to determine whether the current split screen mode is the top and bottom split screen is that if the position of the main split screen is equal to the position of the upper split screen (the first preset position), and the position of the secondary split screen is equal to the position of the lower split screen (the second preset position), then the current split screen mode is determined to be the top and bottom split screen.
[0073] For example, in the split-screen mode of top-bottom split screen, the display area above the split-screen bar can be defined as the position of the top split screen, and the display area below the split-screen bar can be defined as the position of the bottom split screen. In the process of generating a split-screen pair, the primary split screen and the secondary split screen in the split-screen pair can be defined. When the position of the primary split screen is equal to the position of the top split screen, and the position of the secondary split screen is equal to the position of the bottom split screen, the current split-screen mode is determined to be top-bottom split screen.
[0074] It should be noted that the above-mentioned judgment step of whether the preset mode is supported, the judgment step of whether the second split-screen mode is supported, and the judgment step of whether the current mode is the first split-screen mode, these three judgment steps can be processed in parallel or in series. Exemplary, the situation where the three steps are processed in series, that is, when the judgment result of whether the preset mode is supported is yes, the judgment step of whether the second split-screen mode is supported is executed; when the judgment result of whether the second split-screen mode is supported is yes, the judgment step of whether the current mode is the first split-screen mode is executed; when the judgment result of whether the current mode is the first split-screen mode is yes, the split-screen window rotation is executed. In another implementation method, the three steps can be processed in parallel. In the parallel processing method, as long as the judgment results of the three steps are all yes, the split-screen window rotation is executed.
[0075] In an implementation of the first aspect, the method further includes:
[0076] In response to the first operation, the electronic device rotates a first split screen pair from the first split screen mode to the second split screen mode, wherein the first split screen pair includes the first split screen window and the third split screen window.
[0077] In an embodiment of the present application, after the electronic device opens multiple applications in the split-screen mode, the positions of the split-screen windows are automatically adjusted by switching the split-screen mode, thereby simplifying the operation process and improving the user experience.
[0078] In an implementation of the first aspect, the electronic device rotates the first split-screen pair from the first split-screen mode to the second split-screen mode, including:
[0079] The electronic device acquires a rotation parameter, wherein the rotation parameter includes a size and a position of each of the first split-screen window and the third split-screen window in the first split-screen mode, and a size and a position of each of the first split-screen window and the third split-screen window in the second split-screen mode;
[0080] The electronic device rotates the first split-screen pair from the first split-screen mode to the second split-screen mode according to the rotation parameter.
[0081] In an implementation of the first aspect, during the process in which the electronic device rotates the first split-screen pair from the first split-screen mode to the second split-screen mode, the method further includes:
[0082] The electronic device performs a rotation action according to the rotation animation effect.
[0083] In an embodiment of the present application, the rotation action and the rotation animation can be executed by different modules. For example, the rotation action is executed by the multi-window split screen bar module (HnMultiWindowSplitUI), and the rotation animation is executed by the split screen rotation animation module (HnSplitRotateAnimationScene). HnSplitRotateAnimationScene executes the rotation animation through rotation monitoring. Specifically, after HnSplitRotateAnimationScene monitors the start of the rotation animation, it starts the animation and sends the real-time animation status to HnMultiWindowSplitUI. At the same time, HnSplitRotateAnimationScene adjusts the rotation animation according to the rotation monitoring to synchronize the rotation action and animation of HnMultiWindowSplitUI.
[0084] With the above split-screen rotation method, the rotation can only start when the animation effect starts, and stop when the animation effect ends, so that the split-screen rotation animation effect viewed by the user is synchronized with the split-screen rotation action, reducing the situation of image delay or advance, which is conducive to improving the user experience.
[0085] In an implementation of the first aspect, the first split-screen mode is left-right split-screen, the second split-screen mode is top-bottom split-screen, and the first display mode is horizontal screen;
[0086] Alternatively, the first split-screen mode is top-bottom split-screen, the second split-screen mode is left-right split-screen, and the first display mode is vertical split-screen.
[0087] In a second aspect, an electronic device is provided, comprising a processor, wherein the processor is used to run a computer program stored in a memory to implement any method of the first aspect of the present application.
[0088] In a third aspect, a chip system is provided, including a processor, wherein the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any method of the first aspect of the present application.
[0089] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method of any one of the first aspects of the present application is implemented.
[0090] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any one of the methods in the first aspect of the present application.
[0091] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 is a schematic diagram of an application scenario of split-screen display provided in an embodiment of the present application;
[0093] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0094] Figure 3 It is a schematic diagram of the external structure of a folding screen mobile phone provided in an embodiment of the present application;
[0095] Figure 4 is a schematic block diagram of the software architecture of the electronic device 100 provided in an embodiment of the present application;
[0096] Figure 5 It is a schematic diagram of an application scenario of the split-screen display method provided in an embodiment of the present application;
[0097] Figure 6 It is a schematic diagram of an application scenario of the split-screen display method provided in an embodiment of the present application;
[0098] Figure 7 It is a schematic diagram of the interaction process of the split-screen display method provided in an embodiment of the present application;
[0099] Figure 8 is a schematic diagram of a split-screen window provided in an embodiment of the present application;
[0100] Fig. 9 It is a schematic diagram of an interactive flow of a method for determining whether a split screen pair supports top-bottom split screen provided in an embodiment of the present application;
[0101] Fig.10 It is a schematic diagram of the interactive process of executing the rotation effect provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.
[0103] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0104] It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0105] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0106] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0107] With the development of terminal technology, users' functional requirements for electronic devices are becoming more and more diverse. For example, in order to meet users' needs to use multiple applications in the same time period, many electronic devices can support split-screen mode, in which the screen of the electronic device can display two or more windows so that users can view the contents displayed in multiple windows.
[0108] In some application scenarios, see Figure 1 , is a schematic diagram of an application scenario of split-screen display provided in an embodiment of the present application. Figure 1 The application scenario shown in FIG. 1 shows a situation where the display screen of an electronic device can display two application windows at the same time. Figure 1 As shown in (a) in the figure, it is a split screen display interface 10. In the split screen display interface 10, the display screen is divided into two display areas on the left and right by a split screen bar 103. Among them, the application window 101 of the video application occupies the left display area, and the application window 102 of the launch bar (Dockbar) occupies the right display area. Correspondingly, the application window 101 of the video application displays a video screen in a horizontal screen, and the application window 102 of the launch bar (Dockbar) displays icons of multiple applications. Among them, the video application is an application that supports top-bottom split screen.
[0109] like Figure 1 As shown in (a) of FIG. 1 , when a user clicks / touches the icon 1021 of the game application in the application window 102 of the launch bar (Dockbar), in response to the user operation, the electronic device displays Figure 1 The split screen display interface 11 shown in (b) in FIG. Figure 1 As shown in (b), the video application window 101 of the video application still displays the video screen of the video application in horizontal mode, and the application window 102 of the launch bar is replaced with the application window 104 of the game application, and the game screen is displayed in horizontal mode in the application window 104 of the game application. The game application is an application that supports top-bottom split screen.
[0110] It can be seen from the above application scenarios that when an electronic device opens two applications in a split screen, and both applications are declared in landscape mode, the electronic device defaults to a split screen and displays the application windows of the two applications in landscape mode.
[0111] like Figure 1 As shown in (b) of FIG. 1 , a split screen rotation button 105 is displayed in the split screen display interface 11. When the user clicks / touches the split screen rotation button 105, in response to the user operation, the electronic device displays Figure 1 The split screen display interface 12 shown in (c) in FIG. Figure 1 As shown in (c) in the figure, the display screen is divided into two upper and lower display areas. The application window 101 of the video application occupies the upper display area, and the application window 104 of the game application occupies the lower display area, that is, the application window of the video application and the application window of the game application are split into upper and lower screens and displayed horizontally.
[0112] like Figure 1 In the application scenario shown, after opening two applications in split-screen mode, a rotary button for upper and lower split screens is displayed to prompt the user to use the upper and lower split screens. The user operates the rotary button, and the electronic device responds to the user operation to realize the upper and lower split screens of the two split-screen windows. In this split-screen mode, the user needs to manually adjust the position of the split-screen window, which has a low degree of intelligence and a poor user experience.
[0113] Based on this, an embodiment of the present application provides a split-screen display method. Through the method in the embodiment of the present application, after the electronic device opens multiple applications in the split-screen mode, the position of the split-screen window can be automatically adjusted, which simplifies the operation process and helps improve the user experience.
[0114] The method provided in the embodiment of the present application can be applied to an electronic device with a screen and a display function. The electronic device in the embodiment of the present application may also be referred to as a terminal device, a terminal, a user equipment (UE) or a user terminal, etc. For example, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a wearable device (such as a smart watch, a smart bracelet, etc.), a laptop computer, a PDA, a personal computer, a smart home device (such as a TV, etc.), a smart screen, a game console, a mobile Internet device (MID), a smart sales terminal (POS), an augmented reality (AR) device, and a virtual reality (VR) device, etc. The embodiment of the present application does not specifically limit the specific form of the electronic device. For ease of explanation, the following embodiments are introduced by taking a mobile phone as an example.
[0115] For example, see Figure 2, is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0116] like Figure 2 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 140A, a battery 140B, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0117] The processor 110 may include one or more processing units, wherein different processing units may be independent devices or may be integrated into one or more processors.
[0118] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0119] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge an electronic device, and can also be used to transfer data between an electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0120] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0121] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 140B, it may also power the electronic device through the power management module 140A.
[0122] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0123] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
[0124] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0125] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0126] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In some embodiments, the electronic device 100 displays a user interface through the display screen 194.
[0127] When the electronic device 100 includes multiple display screens, it can be a folding screen device. The display screen of the electronic device 100 can be set to a foldable display screen, referred to as a folding screen. Among them, the folding screen can use an integrally formed flexible display screen, or a spliced display screen composed of multiple flexible display screens and hinges between each two flexible display screens, or a spliced display screen composed of multiple rigid screens and hinges between each two rigid screens. This embodiment of the application is not limited to this.
[0128] For example, the electronic device 100 may be a foldable screen mobile phone. Figure 3 , is a schematic diagram of the external structure of a folding screen mobile phone provided in an embodiment of the present application. The display screen of a folding screen mobile phone may include an inner screen and an outer screen. The inner screen is a folding screen, and the size of the inner screen is larger than the size of the outer screen. Figure 3 (a) in the figure shows the outer side of the foldable screen mobile phone when the inner screen is unfolded. Figure 3 As shown in (a), the first part 301 on the outside of the foldable screen mobile phone can be set as the outer screen of the foldable screen mobile phone, and the second part 302 can be set as the shell of the mobile phone. The first part 301 and the second part 302 on the outside of the foldable screen mobile phone can both be set as cameras. In other foldable screen mobile phone examples, the first part 301 and the second part 302 on the outside of the foldable screen mobile phone can both be set as the outer screen of the foldable screen mobile phone, or can both be set as the shell of the foldable screen mobile phone. Figure 3 (b) in the figure shows the inner side of the foldable screen mobile phone when the inner screen is unfolded. Figure 3As shown in (b), the inner screen (i.e., folding screen) of the folding screen mobile phone includes a first display unit 303 and a second display unit 304. The first display unit 303 and the second display unit 304 can display different display interfaces respectively, or they can display a display interface together. The posture or form of the folding screen can be determined according to the angle between the first display unit 303 and the second display unit 304. For example, when the angle between the first display unit 303 and the second display unit 304 is 0 degrees, the folding screen is in a fully folded state; when the angle between the first display unit 303 and the second display unit 304 is 180 degrees, the folding screen is in a fully unfolded state; when the angle between the first display unit 303 and the second display unit 304 is greater than 0 degrees and less than 180 degrees, the folding screen is in a semi-folded state. It should be noted that in the above example, the description of the size of the angle between the first display unit 303 and the second display unit 304 of the folding screen mobile phone in the fully folded state, the semi-folded state, and the fully unfolded state is only an example, and the embodiment of the present application does not limit this. In addition, the folding screen is in a fully unfolded state, a fully folded state or a half-folded state, which can also be referred to as the folding screen mobile phone being in a fully unfolded state, a fully folded state or a half-folded state.
[0129] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0130] The camera 193 is used to capture still images or videos. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0131] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, the electronic device 100 saves the user's punch-in data in the external memory card.
[0132] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function, etc. The data storage area may store data created during the use of the electronic device 100 (such as interface information corresponding to the user interface, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0133] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0134] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0135] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0136] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0137] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0138] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0139] Understandably, Figure 2 It is only an example of the structure of the electronic device 100, and some modules related to the split-screen display method described in the embodiment of the present application are shown. The structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0140] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-server architecture or a cloud architecture. The software architecture of the electronic device 100 is exemplarily described below.
[0141] See also Figure 4 , is a schematic block diagram of the software architecture of the electronic device 100 provided in the embodiment of the present application. Figure 4 As shown, the software architecture of the electronic device 100 may include an application layer and a system layer.
[0142] The application layer may include the application launcher (Dockbar) and split-screen applications. Among them, the Dockbar is responsible for the split-screen launcher and sidebar, which is used to provide the ability to form a split screen. Split-screen applications are applications that support split-screen display. Split-screen applications include an application drawing module for drawing the interface of the application.
[0143] The system layer can include IBinder, native code repository (Android Open Source Project, AOSP), self-developed code repository and animation unit.
[0144] IBinder is a basic interface for remote objects. It is the core part of a lightweight remote call mechanism designed for high performance. It is used not only for remote calls (cross-process calls) but also for intra-process calls. This interface defines the protocol for interacting with remote objects. IBinder is used for interaction between the application layer and the system layer.
[0145] AOSP can include window management service module (WindowsManagerService, WMS), window state module (WindowState), activity task management service module (ActivityTaskManagerService, ATMS), task module (Task), activity management service module (ActivityManagerService, AMS), activity record module (ActivityRecord), window size change module (Resize), interface property management module and application animation control module (AppTransitionController).
[0146] Usually, one Activity corresponds to one application window (window of the application). The window management service module is the server of IBinder, responsible for managing all windows of applications in the system, displaying the application windows on the screen in an orderly manner, and processing user input events. The window state module is used to describe the state information of the window and communicate with the window management service module. Usually, one window corresponds to one window state.
[0147] The task module is the container of the Activity. The activity task management service module is used to manage the Activity and its container (tasks, stacks, and displays, etc.). The activity task management service module and the task module are used to provide the split screen scene and the recognition capability of whether to use the rotation split screen, and control the left and right split screen to rotate to the top and bottom split screen, or vice versa.
[0148] The Activity Management Service (AMS) module is responsible for the management of Activities, including the life cycle of applications, such as starting applications, switching applications, and managing task stacks. The Activity Record module is used to record the information of each Activity. Usually, each Activity started in an application has an ActivityRecord instance corresponding to it in the AMS module. This ActivityRecord is created when the Activity is started and destroyed when the Activity is terminated. In some operating systems, the Activity Task Management Service (ATMS) module can also be responsible for the management of Activities.
[0149] The window size changing module is used to change the size of the application window (the window of the application program).
[0150] The interface property management module is responsible for allocating surfaces to application windows.
[0151] The self-developed code repository can include the activity task management service extension module (HnActivityTaskManagerService EX), the multi-window management module (HnMultiWindowManager), the split-screen pair module (HnSplitScreenCombination), the multi-window split-screen bar module (HnMultiWindowSplitUI), the multi-window configuration management module (HnMultiWinConfigManager) and the multi-window animation module (HnMultiWindowAnimation).
[0152] The activity task management service extension module is used to manage the implementation and use of self-developed activity task related methods.
[0153] The multi-window management module is used to manage the implementation and use of self-developed multi-window related methods.
[0154] The split-screen pair module is used to manage the creation and use of self-developed split-screen pairs.
[0155] The multi-window split-screen bar module is used to manage the creation and use of self-developed split-screen bars.
[0156] The multi-window configuration management module is used to manage the reading and use of self-developed multi-window configurations.
[0157] The multi-window animation module is used to manage the creation and execution of self-developed multi-window animations.
[0158] The animation unit may include a split-screen rotation animation module (HnSplitRotateAnimationScene) for realizing the split-screen rotation animation display.
[0159] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure and software architecture.
[0160] For the sake of convenience of explanation, the following embodiments of the present application provide a detailed introduction to the split-screen display method provided in the embodiments of the present application in combination with the accompanying drawings and application scenarios.
[0161] First, the application scenario of the split screen display method provided by the embodiment of the present application is introduced. In the embodiment of the present application, the split screen can be started through the Dockbar. Figure 4 As described in the embodiment, the Dockbar may include a split-screen launcher and a sidebar.
[0162] In some application scenarios, split screen can be started through the split screen launcher. For example, see Figure 5 , is a schematic diagram of an application scenario of the split-screen display method provided in an embodiment of the present application. Figure 5 The application scenario shown in FIG. 1 shows a situation where the display screen of an electronic device can display two application windows at the same time. Figure 5 As shown in (a), it is a split-screen display interface 50 (first interface). In the split-screen display interface 50, the display screen is divided into two display areas on the left and right by a split-screen bar 503. Among them, the application window 501 (first split-screen window) of the video application (first application) occupies the left display area, and the application window 502 (second split-screen window) of the split-screen launcher occupies the right display area. Correspondingly, the application window 501 of the video application displays the video screen in horizontal screen, and the application window 502 of the split-screen launcher displays icons of multiple applications. Among them, the video application is an application that supports top and bottom split screen. As shown in FIG. Figure 5 As shown in (a) of FIG. 1 , since the size of the application window 501 of the video application is inconsistent with the size of the left display area, in the horizontal screen mode, the application window 501 of the video application cannot cover the left display area (such as Figure 5 As shown in (a), the unfilled area is filled with black), resulting in a waste of display area.
[0163] When a user clicks / touches the icon of any application that supports top-and-bottom split screen in the application window of the split-screen launcher, the electronic device automatically rotates the left-right split screen to the top-and-bottom split screen in response to the user operation.
[0164] like Figure 5 As shown in (a) of FIG. 1 , when the user clicks / touches the application icon 5021 (first icon) of the game application (second application) in the application window 502 of the split-screen launcher, in response to the user operation (first operation), the electronic device displays Figure 5 The split screen display interface 51 (second interface) shown in (b) of FIG. Figure 5As shown in (b) of FIG. 5 , the display screen is divided into two upper and lower display areas by a split-screen bar 504. Among them, the application window 501 of the video application occupies the upper display area, and the application window 505 (the third split-screen window) of the game application occupies the lower display area, that is, the application window 501 of the video application and the application window 505 of the game application are split up and down and displayed horizontally. Among them, the application window 502 of the split-screen launcher is replaced by the application window 505 of the game application.
[0165] It can be seen that after the window is rotated, the application window 501 of the video application can cover the upper display area, and the application window 505 of the game application can cover the lower display area, thereby reducing the waste of display area and improving the user's viewing experience.
[0166] and Figure 1 The example scenario is different in that Figure 5 In the application scenario shown, when the electronic device splits the screen left and right to open two applications that support top and bottom split screen, and both applications declare landscape mode, in this case, the electronic device automatically splits the screen up and down and displays the application windows of the two applications in landscape mode. Figure 5 The split-screen display method in the application scenario shown can automatically rotate the application windows to the top and bottom split screens when two applications declared to be horizontal screens are opened in the left and right split screens of the electronic device, without the need for user operation, thereby simplifying the operation process and improving the user experience.
[0167] In other application scenarios, split screen can be started through the sidebar. For example, see Figure 6 , is a schematic diagram of an application scenario of the split-screen display method provided in an embodiment of the present application. Figure 6 The application scenario shown in FIG. 1 shows a situation where the display screen of an electronic device can display two application windows at the same time. Figure 6 (a) in the figure shows a split-screen display interface 60. In the split-screen display interface 60, the display screen is divided into two display areas on the left and right by a split-screen bar 603. Among them, the application window 601 of the video application occupies the left display area, and the application window 602 of the calculator occupies the right display area. Correspondingly, the application window 601 of the video application displays a video playback window, and the application window 602 of the calculator displays a calculator interface. In the embodiment of the present application, it is assumed that the video application is an application that supports top-bottom split-screen, and the calculator application is an application that does not support top-bottom split-screen.
[0168] It should be noted that, in the embodiment of the present application, since the calculator application is an application that does not support upper and lower split screens, Figure 6As shown in (a), the application window 601 of the video application and the application window 602 of the calculator are displayed in left-right split screen. It can be understood that when any one of the two split screen windows of the display screen is an application window that does not support top-bottom split screen applications, and the applications of the two split screen windows both declare horizontal screen display, the two split screen windows maintain left-right split screen display.
[0169] like Figure 6 As shown in (a) of FIG. 1 , when the user slides the right edge of the display screen to the left, in response to the user operation, the electronic device displays Figure 6 The split screen display interface 61 shown in (b) in FIG. Figure 6 As shown in (b) in FIG. 6 , a sidebar 604 is displayed on the right side of the split-screen display interface 61 , and application icons of multiple application programs are displayed in the sidebar 604 .
[0170] When the user clicks / touches the icon of any application that supports top-bottom split screen in the sidebar 604, in response to the user operation, the electronic device automatically rotates the left-right split screen to the top-bottom split screen.
[0171] For example, when a user clicks / touches the application icon 6041 of the game application in the sidebar 604, in response to the user operation, the electronic device displays the following Figure 6 The split screen display interface 62 shown in (c) in FIG. Figure 6 As shown in (c) in the figure, the display screen is divided into two upper and lower display areas by a split-screen bar 605. Among them, the application window 601 of the video application occupies the upper display area, and the application window 601 still displays the video screen in the video playback window in a horizontal screen. The application window 606 of the game application occupies the lower display area, and the application window 602 of the calculator is replaced by the application window 606 of the game application, and the game screen is displayed in a horizontal screen in the application window 606. The application window 601 of the video application and the application window 606 of the game application are split up and down. It can be seen that after the window is rotated, the application window 601 of the video application can cover the upper display area, and the application window 606 of the game application can cover the lower display area, which reduces the waste of display area and improves the user's viewing experience.
[0172] It is understandable that the above is just an example of launching a split-screen application through the sidebar. In other application scenarios, the split-screen application launched through the sidebar can be set to replace any split-screen window (such as the first split-screen window or the second split-screen window) by default. The split-screen application launched through the sidebar can also be set to replace the application window on the corresponding side. For example, the split-screen application launched through the right sidebar replaces the application window on the right (such as the second split-screen window), and the split-screen application launched through the left sidebar replaces the application window on the left (such as the first split-screen window). In other application scenarios, the user can drag the icon of the application in the sidebar to any split-screen window, and accordingly, the application window of the application corresponding to the dragged icon replaces the split-screen window at the current position. In the embodiment of the present application, the way to launch the split screen from the sidebar is not specifically limited.
[0173] It should be noted that Figure 5 and Figure 6 In the embodiment, it is shown that when both split-screen applications declare horizontal screen and both support top-bottom split-screen, the electronic device automatically rotates the two left-right split-screen application windows into top-bottom split-screen. In other application scenarios, when both split-screen applications declare vertical screen and both support left-right split-screen, the electronic device can also automatically rotate the two top-bottom split-screen application windows into left-right split-screen. I will not go into details here. It is understandable that when the application is displayed in horizontal screen, the top-bottom split-screen method is adopted, and the application window is more easily adapted to the size of the display area, which is more conducive to improving the user's viewing experience; and when the application is displayed in vertical screen, the left-right split-screen method is adopted, and the application window is more easily adapted to the size of the display area, which is more conducive to improving the user's viewing experience. In other words, in the embodiment of the present application, the display mode of the horizontal screen display is adapted to the split-screen mode of the top-bottom split-screen, and the display mode of the vertical screen display is adapted to the split-screen mode of the left-right split-screen.
[0174] In order to facilitate understanding of the split-screen display method of the embodiment of the present application, the implementation process inside the electronic device is introduced below.
[0175] See also Figure 7 , is a schematic diagram of the interactive process of the split-screen display method provided in an embodiment of the present application. Figure 7 The method shown is Figure 5 and Figure 6 The application scenario shown is used as an example to introduce that when two split-screen applications both declare horizontal screen and both support vertical split-screen, the electronic device automatically rotates the two left and right split-screen application windows to vertical split-screen. Figure 4 According to the software architecture shown, the internal implementation process of the electronic device of the split-screen display method may include the following steps:
[0176] S701, the application transition control module (AppTransitionController) starts the application.
[0177] Among them, AppTransitionController is used to control some related animation classes of the application, such as startup animation and shutdown animation, etc. Therefore, AppTransitionController can be used to monitor the startup of the application.
[0178] S702, the application motion effect control module notifies the multi-window management module (HnmultiWindowManager) to determine whether to replace the existing split-screen window.
[0179] In some implementations, after AppTransitionController monitors the launch of an application, it sends a determination instruction to HnmultiWindowManager through the activity task management service extension module (HnActivityTaskManagerServiceEX), so that HnmultiWindowManager determines whether to replace the existing split-screen window.
[0180] S703, the multi-window management module determines whether the currently launched application replaces the existing split-screen window.
[0181] After receiving the determination instruction from AppTransitionController, HnmultiWindowManager executes the step of determining whether to replace the existing split-screen window.
[0182] Each application corresponds to an Activity. When an application is opened and an Activity is started, a task needs to be added accordingly and the task needs to be moved to the foreground. In some implementations, step S703 can be performed after the task corresponding to the application is moved to the foreground. In this implementation, if it is determined not to replace the split-screen window, the task of the started application needs to be moved to the background again. The interaction process is cumbersome and affects the response speed of the electronic device. In the embodiment of the present application, it is equivalent to performing step S703 after the application is started and before the task is moved to the foreground. Through the method in the embodiment of the present application, the judgment process is optimized, that is, the step of determining whether to replace the existing split-screen window is advanced, and the corresponding task is moved to the foreground after it is determined to replace the existing split-screen window, which effectively reduces the interaction process and helps to improve the response speed of the electronic device.
[0183] As described above, after starting an Activity, a task is added accordingly. In one implementation, the method for adding a task may include a method for determining whether to replace the existing split-screen window. For example, after starting an Activity, the method for adding a task is executed. Specifically, first determine whether to replace the existing split-screen window. If so, add a task to the currently started Activity and move the task to the foreground.
[0184] In one embodiment, the method for determining whether to replace an existing split-screen window may include the following steps:
[0185] When a new task request is received in split-screen mode, all split-screen pairs are traversed; if there is a split-screen pair in the foreground, it is determined to replace the existing split-screen window.
[0186] Each split-screen pair includes at least two split-screen windows.
[0187] S704: If an existing split-screen window is to be replaced, the multi-window management module notifies the split-screen pair module (HnSplitScreenCombination) to replace the window in the existing split-screen pair.
[0188] In one implementation, the split-screen window corresponding to the new task request can replace any split-screen window in the existing split-screen pair. In another implementation, a replacement rule can be set. In one example, when the split-screen application is started through the sidebar, the started split-screen application replaces the application window on one side of the sidebar. For example, the split-screen application started through the right sidebar replaces the application window on the right, and the split-screen application started through the left sidebar replaces the application window on the left. In another example, when the split-screen application is started through the split-screen launcher, the default replacement of the split-screen window corresponding to the split-screen launcher is set. In another example, the priority of the replacement is set, and the application window of the started application is replaced with the application window of the application with a lower priority in the split-screen pair currently displayed in the foreground. For example, the split-screen pair currently displayed in the foreground includes the application window of the video application and the application window of the split-screen launcher, and the newly started application is a game application, and the priority of the game application is higher than the priority of the split-screen launcher, then the application window of the game application replaces the application window of the split-screen launcher. Of course, other replacement rules can also be used, and the embodiments of the present application are not specifically limited to this.
[0189] S705, the split screen pair module determines whether the split screen pairs all support the compatible mode (preset mode).
[0190] In the embodiment of the present application, the compatible mode indicates that the size of the split-screen window matches the size of the display area to which the split-screen window belongs. In some cases, the split-screen window can adaptively match the size of the display area so that the content in the split-screen window can be displayed normally.
[0191] like Figure 5 As shown, when the application window 501 of the video application is displayed in full screen in the display area, the application window 501 adaptively matches the size of the display area, so that the display area can fully display the application window 501.
[0192] In one implementation, the method for determining whether the compatibility mode is supported may include:
[0193] If the split-screen window meets the first condition or the second condition, it is determined that the split-screen window supports the compatible mode. Among them, the first condition includes that the height of the split-screen window is greater than the width, and the requested direction of the split-screen window is the horizontal screen direction. The second condition includes that the height of the split-screen window is less than or equal to the width, and the size of the split-screen window meets the size of the display area.
[0194] In the embodiment of the present application, in the split-screen mode, the entire display area of the display screen is divided into at least two display areas by the split-screen bar. The size of the split-screen window conforms to the size of the display area, which means that the width of the split-screen window is smaller than the width of the display area.
[0195] For example, see Figure 8 , is a schematic diagram of a split screen window provided in an embodiment of the present application. Figure 8 The display interface shown is divided into two display areas on the left and right by a split-screen bar 83, wherein the left display area includes a split-screen window 81, and the right display area includes a split-screen window 82. The aspect ratio of split-screen window 81 is different from that of the left display area, and the aspect ratio of split-screen window 82 is also different from that of the right display area. The height of split-screen window 81 is greater than the width, and the requested direction is horizontal; the height of split-screen window 82 is less than the width, and the split-screen window conforms to the size of the display area (the split-screen window is within the range of the display area). That is, both split-screen window 81 and split-screen window 82 support compatible mode. Figure 8 As shown, in the display area on the left, the split-screen window 81 adaptively adjusts its window size according to the aspect ratio, so that the display area on the left can fully display the split-screen window 81. In the display area on the right, the split-screen window 82 adaptively adjusts its window size according to the aspect ratio, so that the display area on the right can fully display the split-screen window 82.
[0196] It should be noted that in the scenario where the top and bottom split screen automatically rotates to the left and right split screen, the conditions in the above-mentioned method for determining whether to support the compatible mode can be adjusted to the third condition or the fourth condition accordingly, wherein the third condition includes that the height of the split-screen window is less than or equal to the width, and the requested direction of the split-screen window is the vertical screen direction; the fourth condition includes that the height of the split-screen window is greater than the width, and the size of the split-screen window matches the size of the display area.
[0197] In one implementation, it is only necessary to determine whether the currently replaced split-screen window supports the compatible mode. Figure 5 As shown, after the user clicks / touches the icon of the game application, the split-screen window of the game application replaces the application window of the split-screen display. Since the split-screen window of the video application is already displayed in the foreground, it means that the split-screen window of the video application supports the compatible mode. Therefore, it is only necessary to determine whether the split-screen window of the game application supports the compatible mode.
[0198] S706: If both split screen pairs support the compatible mode, the split screen pair module notifies the task module (Task) to determine whether both split screen pairs support top-bottom split screen.
[0199] HnSplitScreenCombination sends a determination instruction to Task. Accordingly, Task receives the determination instruction and executes the step of determining whether the split screen pair supports top-bottom split screen.
[0200] In one embodiment, see Fig. 9 , is a schematic diagram of an interactive flow of a method for determining whether a split screen pair supports top-bottom split screen provided in an embodiment of the present application. Fig. 9 As shown, the method for determining whether top-bottom split screen is supported may include:
[0201] S901, the task module determines whether the split screen supports the split screen display for the corresponding application programs.
[0202] In one implementation, the task module obtains a third-party feature library (preset database), which defines applications that support split-screen; the task module searches the feature library to see whether the currently judged application exists; if so, it is determined that the currently judged application supports split-screen window mode.
[0203] In another implementation, the application carries a flag (second flag) which is used to declare whether the window size is variable. The task module obtains the flag of the currently determined application and determines whether the application supports the split-screen window mode according to the flag.
[0204] S902: If the applications corresponding to the split-screen pair support split-screen display, the task module notifies the multi-window configuration management module (HnMultiWinConfigManager) to determine whether the split-screen pair supports top-bottom split-screen.
[0205] The task module sends a judgment instruction to HnMultiWinConfigManager. Accordingly, after receiving the judgment instruction, HnMultiWinConfigManager executes a method for judging whether the split-screen pair supports upper and lower split-screen.
[0206] S903, the multi-window configuration management module obtains a component configuration management (CCM) file (preset file), and determines whether the split-screen pair supports top-bottom split-screen according to the CCM file.
[0207] The CCM file may be a file in XML format, which may include the application package names, Activity names, and a flag (first flag) for indicating whether upper and lower split screens are supported for each of the multiple applications.
[0208] HnMultiWinConfigManager searches the CCM file for the application package name of the current application, and then determines whether the split-screen window of the current application supports top-bottom split-screen according to the flag corresponding to the found application package name. HnMultiWinConfigManager returns the judgment result to Task. For example, if top-bottom split-screen is supported, HnMultiWinConfigManager replies true to Task; if top-bottom split-screen is not supported, HnMultiWinConfigManager replies false to Task.
[0209] In the embodiment of the present application, CCM is used to determine whether the split-screen pair supports upper and lower split-screen. Since CCM is pre-stored, this method can improve the judgment efficiency and at the same time help improve the reliability of the judgment result.
[0210] S707, if both split-screen pairs support top-bottom split-screen, the split-screen pair module (HnSplitScreenCombination) notifies the multi-window split-screen bar module (HnMultiWindowSplitUI) to determine whether the current split-screen mode is left-right split-screen.
[0211] After Task receives the judgment result from HnMultiWinConfigManager, it will give feedback to HnSplitScreenCombination based on the judgment result. After HnSplitScreenCombination receives the feedback, if the split screen pair supports top-bottom split screen, HnSplitScreenCombination will send a judgment instruction to HnMultiWindowSplitUI; accordingly, after HnMultiWindowSplitUI receives the judgment instruction, it will execute the method to determine whether the current split screen mode is left-right split screen.
[0212] In one embodiment, the determination method in S707 may include:
[0213] If the position of the main split screen is equal to the position of the left split screen (the first preset position), and the position of the secondary split screen is equal to the position of the right split screen (the second preset position), it is determined that the current split screen is left and right.
[0214] The electronic device switches to the split screen mode, generates a split screen bar, and accordingly generates a position configuration matching the split screen bar. The position configuration can be understood as the position of the display area relative to the split screen bar.
[0215] For example, in the left-right split screen mode, the display area on the left side of the split screen bar can be defined as the position of the left split screen, and the display area on the right side of the split screen bar can be defined as the position of the right split screen. In the process of generating a split screen pair, the main split screen and the secondary split screen in the split screen pair can be defined. When the position of the main split screen is equal to the position of the left split screen, and the position of the secondary split screen is equal to the position of the right split screen, it is determined that the current screen is left-right split screen.
[0216] It should be noted that, in the scenario where the top-bottom split screen is automatically rotated to the left-right split screen, S707 is executed to determine whether the current split screen mode is the top-bottom split screen. One implementation method is that if the position of the primary split screen is equal to the position of the upper split screen (the first preset position), and the position of the secondary split screen is equal to the position of the lower split screen (the second preset position), then the current split screen mode is determined to be the top-bottom split screen.
[0217] For example, in the split-screen mode of top-bottom split screen, the display area above the split-screen bar can be defined as the position of the top split screen, and the display area below the split-screen bar can be defined as the position of the bottom split screen. In the process of generating a split-screen pair, the primary split screen and the secondary split screen in the split-screen pair can be defined. When the position of the primary split screen is equal to the position of the top split screen, and the position of the secondary split screen is equal to the position of the bottom split screen, the current split-screen mode is determined to be top-bottom split screen.
[0218] S708, if the current split-screen mode is left-right split-screen, the split-screen pair module (HnSplitScreenCombination) notifies the multi-window split-screen bar module (HnMultiWindowSplitUI) to execute a rotation effect to rotate the split-screen pair from left-right split-screen to left-right split-screen.
[0219] If the current split-screen mode is left-right split-screen, HnMultiWindowSplitUI gives feedback to HnSplitScreenCombination; correspondingly, after receiving the feedback information from HnMultiWindowSplitUI, HnSplitScreenCombination sends an execution instruction to HnMultiWindowSplitUI to make HnMultiWindowSplitUI perform the rotation effect.
[0220] In one embodiment, see Fig.10 , is a schematic diagram of the interactive process of executing the rotation effect provided in the embodiment of the present application. Fig.10 As shown, the process of executing the rotation effect may include the following steps:
[0221] S1001, the multi-window split screen bar module (HnMultiWindowSplitUI) notifies the multi-window management module (HnMultiWindowManager) to prepare the size of the split screen rotation effect.
[0222] The size of the split-screen rotation effect includes the size of the rotation start position and the size of the rotation end position. The size of the rotation start position is equivalent to the size of the split-screen window before the rotation, and the size of the rotation end position is equivalent to the size of the split-screen window after the rotation.
[0223] HnMultiWindowManager returns the size of the prepared split-screen rotation effect to HnMultiWindowSplitUI.
[0224] S1002, after receiving the size of the split-screen rotation effect, the multi-window split screen bar module (HnMultiWindowSplitUI) notifies the multi-window animation module (HnMultiWindowAnimation) to start the rotation effect.
[0225] S1003, after receiving the notification of starting the rotation animation, the multi-window animation module (HnMultiWindowAnimation) creates a rotation monitor.
[0226] The rotation monitoring is used to monitor the execution process of the rotation. The rotation action is executed by HnMultiWindowSplitUI, and HnMultiWindowAnimation sends the monitored instructions for starting the rotation animation and the process of the rotation action executed by HnMultiWindowSplitUI to HnSplitRotateAnimationScene.
[0227] S1004, the split-screen rotation animation module (HnSplitRotateAnimationScene) executes the rotation animation according to the rotation monitoring.
[0228] In the embodiment of the present application, the rotation action is performed by HnMultiWindowSplitUI, and the rotation animation is performed by HnSplitRotateAnimationScene.
[0229] S1005, the split-screen rotation animation module (HnSplitRotateAnimationScene) sends the animation status to the multi-window split-screen bar module (HnMultiWindowSplitUI).
[0230] HnSplitRotateAnimationScene executes the rotation animation through rotation monitoring. Specifically, after HnSplitRotateAnimationScene monitors the start of the rotation animation, it starts the animation and sends the real-time animation state to HnMultiWindowSplitUI. At the same time, HnSplitRotateAnimationScene adjusts the rotation animation according to the rotation monitoring to keep the rotation action of HnMultiWindowSplitUI synchronized with the animation.
[0231] With the above split-screen rotation method, the rotation can only start when the animation effect starts, and stop when the animation effect ends, so that the split-screen rotation animation effect viewed by the user is synchronized with the split-screen rotation action, reducing the situation of image delay or advance, which is conducive to improving the user experience.
[0232] It should be noted that the above example shows the situation where the three steps S705-S707 are processed in series, that is, when the judgment result of S705 is yes, S706 is executed; when the judgment result of S706 is yes, S707 is executed; when the judgment result of S707 is yes, S708 is executed. In another implementation, the three steps S705-S707 can be processed in parallel. In the parallel processing mode, as long as the judgment results of the three steps are all yes, step S708 is executed.
[0233] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0234] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0235] The embodiment of the present application also provides a computer program product. When the computer program product is executed on a first device, the first device can implement the steps in the above-mentioned method embodiments.
[0236] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0237] The embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0238] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0239] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Finally, it should be noted that the above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.
Claims
1. A split-screen display method, characterized in that: Applied to an electronic device, the electronic device includes a display screen, and the method includes: The electronic device displays a first interface, wherein the first interface displays a first split-screen window of a first application and a second split-screen window of a launch bar of the application, wherein the first split-screen window and the second split-screen window are arranged in a first split-screen mode; Receiving a first operation of a user on a first icon in the first split-screen window, wherein the first operation is used to open a second application corresponding to the first icon; In response to the first operation, the electronic device displays a second interface, wherein the second interface displays the first split-screen window and a third split-screen window of the second application, and the first split-screen window and the third split-screen window are arranged in a second split-screen mode.
2. The method according to claim 1, characterized in that The method further comprises: In response to the first operation, if the first application and the third application are both displayed in the first display mode, the electronic device displays the second interface; Among them, the first display mode is adapted to the second split-screen mode.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: When both the first application and the third application support the second split-screen mode, in response to the first operation, the electronic device displays the second interface.
4. The method according to claim 3, characterized in that The method further comprises: In response to the first operation, the electronic device starts the second application; The electronic device determines whether the application window of the second application replaces the second split-screen window; If the application window of the second application replaces the second split-screen window, the electronic device replaces the second split-screen window with the third split-screen window and displays the second interface.
5. The method according to claim 4, characterized in that The electronic device determines whether the application window of the second application replaces the second split-screen window, including: The electronic device traverses the established split-screen pairs, wherein each split-screen pair includes at least two split-screen windows; If there is a split-screen pair in the foreground, the electronic device determines to replace the second split-screen window.
6. The method according to claim 4, characterized in that After the electronic device replaces the second split screen window with the third split screen window, the method further includes: The electronic device determines whether the third split-screen window conforms to a preset mode, wherein the preset mode indicates that a size of the split-screen window conforms to a size of a display area to which the split-screen window belongs; If the third split-screen window complies with a preset mode, the electronic device displays the second interface.
7. The method according to claim 6, characterized in that The electronic device determines whether the third split-screen window conforms to a preset mode, including: When the first split-screen mode is left-right split-screen, determining whether the third split-screen window satisfies a first condition or a second condition, wherein the first condition includes that the height of the split-screen window is greater than the width and the split-screen window is in a horizontal orientation, and the second condition includes that the height of the split-screen window is less than or equal to the width and the size of the split-screen window conforms to the size of the display area to which the split-screen window belongs; If the third split-screen window satisfies the first condition or the second condition, the electronic device determines that the third split-screen window complies with a preset mode.
8. The method according to claim 6, characterized in that The electronic device determines whether the third split-screen window conforms to a preset mode, including: When the first split-screen mode is top-bottom split-screen, determining whether the third split-screen window satisfies a third condition or a fourth condition, wherein the third condition includes that the height of the split-screen window is less than or equal to the width and the split-screen window is in a vertical orientation, and the fourth condition includes that the height of the split-screen window is greater than the width and the size of the split-screen window conforms to the size of the display area to which the split-screen window belongs; If the third split-screen window satisfies the first condition or the second condition, the electronic device determines that the third split-screen window complies with a preset mode.
9. The method according to any one of claims 4 to 8, characterized in that: After the electronic device replaces the second split screen window with the third split screen window, the method further includes: The electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode; If the first split-screen window and the second split-screen window support the second split-screen mode, the electronic device displays the second interface.
10. The method according to claim 9, characterized in that The electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode, including: The electronic device determines whether the first application and the second application support split-screen display; If the first application and the second application support split-screen display, the electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode.
11. The method according to claim 10, characterized in that The electronic device determines whether the first application and the second application support split-screen display, including: The electronic device acquires a preset database, wherein the preset database includes application package names of application programs supporting split-screen display; The electronic device searches the preset database for an application package name of a target application, wherein the target application is the first application or the second application; If the application package name of the target application exists in the preset database, the electronic device determines that the target application supports split-screen display.
12. The method according to claim 10, characterized in that The electronic device determines whether the first split-screen window and the third split-screen window support the second split-screen mode, including: The electronic device obtains a preset file, wherein the preset file includes application package names and a first flag bit of each of a plurality of application programs, and the first flag bit is used to indicate whether the second split-screen mode is supported; The electronic device determines whether the target application supports the second split-screen mode according to a first flag bit corresponding to an application package name of the target application in the preset file, wherein the target application is the first application or the third application.
13. The method according to any one of claims 4 to 12, characterized in that: After the electronic device replaces the second split screen window with the third split screen window, the method further includes: Determining, by the electronic device, whether it is currently in the first split-screen mode; If the first split-screen mode is currently in place, the electronic device displays the second interface.
14. The method according to claim 13, characterized in that The electronic device determining whether it is currently in the first split-screen mode includes: If the position of the main split screen is the first preset position, and the position of the secondary split screen is the second preset position, the electronic device determines that it is currently in the first split screen mode; Among them, the main split screen is any one of the split screen windows currently displayed, the secondary split screen is a split screen window other than the main split screen in the currently displayed split screen window, and the first preset position and the second preset position are arranged in the first split screen mode.
15. The method according to any one of claims 1 to 14, characterized in that The method further comprises: In response to the first operation, the electronic device rotates a first split screen pair from the first split screen mode to the second split screen mode, wherein the first split screen pair includes the first split screen window and the third split screen window.
16. The method according to claim 15, characterized in that The electronic device rotates the first split screen pair from the first split screen mode to the second split screen mode, including: The electronic device acquires a rotation parameter, wherein the rotation parameter includes a size and a position of each of the first split-screen window and the third split-screen window in the first split-screen mode, and a size and a position of each of the first split-screen window and the third split-screen window in the second split-screen mode; The electronic device rotates the first split-screen pair from the first split-screen mode to the second split-screen mode according to the rotation parameter.
17. The method according to claim 15, characterized in that In the process in which the electronic device rotates the first split-screen pair from the first split-screen mode to the second split-screen mode, the method further includes: The electronic device performs a rotation action according to the rotation animation effect.
18. The method according to any one of claims 4 to 17, characterized in that The first split screen mode is left-right split screen, the second split screen mode is top-bottom split screen, and the first display mode is horizontal screen; Alternatively, the first split-screen mode is top-bottom split-screen, the second split-screen mode is left-right split-screen, and the first display mode is vertical split-screen.
19. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to run a computer program stored in a memory, so that the electronic device implements the method according to any one of claims 1 to 18.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method according to any one of claims 1 to 18 is implemented.
Citation Information
Patent Citations
Information processing method and electronic equipment
CN103970417A
Split-screen display method and device, storage medium, and electronic device
CN108958606A
Electronic device and method for controlling multi-windows in the electronic device
CN109871166A
Application interface display method, electronic equipment and storage medium
CN116466849A
Multi-window control method and electronic device supporting the same
US20150186024A1