WO2024017145A1 - 显示方法和电子设备 - Google Patents
显示方法和电子设备 Download PDFInfo
- Publication number
- WO2024017145A1 WO2024017145A1 PCT/CN2023/107349 CN2023107349W WO2024017145A1 WO 2024017145 A1 WO2024017145 A1 WO 2024017145A1 CN 2023107349 W CN2023107349 W CN 2023107349W WO 2024017145 A1 WO2024017145 A1 WO 2024017145A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- color
- area
- application
- status bar
- window
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04817—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04886—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04803—Split screen, i.e. subdividing the display area or the window area into separate subareas
Definitions
- the embodiments of the present application relate to the field of computer application technology, and more specifically, to a display method and electronic device.
- Electronic devices meet consumers' multi-window processing needs through split-screen and other methods.
- one application can be displayed through different windows of the electronic device or different applications can be displayed through different windows of the electronic device, so that users can view multiple windows at the same time through one electronic device.
- Tasks are processed to improve the user experience.
- Embodiments of the present application provide a display method and electronic device, which can clearly display an immersive status bar in a multi-window scenario.
- a display method executed by an electronic device, including: responding to a user's split-screen operation, dividing the screen of the electronic device into at least two windows, the at least two windows including a first window and a third window.
- Two windows, at least one of the first application running in the first window and the second application running in the second window uses an immersive status bar; a first color is determined according to the first application, and a first color is determined according to the first application.
- the second application determines a second color; displays the status bar icon within the range of the first area according to the first color, displays the status bar icon within the range of the second area according to the second color, and displays the status bar icon within the range of the second area according to the first color.
- One area is an area on the first window where the status bar is displayed, and the second area is an area on the second window where the status bar is displayed.
- the electronic device divides the screen of the electronic device into at least two windows in response to the user's operation, wherein at least one application corresponding to the first window and the second window in the at least two windows uses an immersive status bar,
- the electronic device determines the first color and the second color according to the applications in the two windows, and then displays the status bar icon within the range of the first area and the status bar within the range of the second area based on the determined first color and second color.
- the first area and the second area are areas corresponding to the status bar on the first window and the second window respectively. Therefore, the electronic device can adjust the color of the status bar icon in each window according to the display interface of the immersive status bar in each window in the split-screen mode, so that the status bar icon is clearly visible and the user experience is improved.
- determining the first color according to the first application includes: determining the first color according to the background color of the first application in the first area. A color, wherein the difference between the background color of the first application in the first area and the first color is greater than a first preset threshold; or, the color of the status bar icon preset according to the first application , determining the first color; and determining the second color according to the second application includes: determining the second color according to the background color of the second application in the second area, wherein The difference between the background color of the second application in the second area and the second color is greater than the first preset threshold; or, it is determined according to the color of the status bar icon preset by the second application. The second color.
- the electronic device may determine the first color and the second color according to application presets in the two windows or according to the background color of the application. Specifically, when both the first application and the second application preset the color of the status bar icon, the first color and the second color may be determined according to the preset color of the status bar icon. When neither the first application nor the second application presets the color of the status bar icon, and when both windows preset or are forced to set the immersive status bar by the operating system of the electronic device, the color of the status bar icon can be set based on the applications of the two windows.
- the background color of the status bar area determines the first color and the second color; only one of the two windows is preset by the application or is determined by the operating system of the electronic device.
- the first color can be determined based on the background color of the status bar area of the application corresponding to the first window.
- a second color can be determined by the system.
- the method further includes: determining whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color are greater than a second grayscale. Preset threshold; wherein, according to the first color, the color of the status bar icon within the range of the first area is displayed, and according to the second color, the color of the status bar icon within the range of the second area is displayed,
- the method includes: when the first grayscale or the second grayscale is greater than the second preset threshold, changing the status bar icon within the first area or the status bar icon within the second area. The color is displayed as white; when the first grayscale or the second grayscale is less than the second preset threshold, the status bar icon within the first area or the second area is The color of the status bar icon is black.
- the electronic device after determining the first color and the second color, the electronic device further determines whether the grayscale corresponding to the first color and the second color is greater than a second preset threshold.
- the grayscale corresponding to the first color and the second color is greater than the second preset threshold, the color of the status bar icon in the first area and the second area is displayed as white; when the grayscale corresponding to the first color and the second color
- the value is less than the second preset threshold
- the color of the status bar icons in the first area and the second area is displayed as black.
- the method further includes: determining a range of the first area and a range of the second area.
- the electronic device can determine the range of the first area and the second area based on the first window and the second window formed by the user's split-screen operation, so as to facilitate displaying the status bar into areas.
- the first area can be displayed
- the four variables of the range of the area, the range of the second area, the color of the status bar icon within the range of the first area, and the color of the status bar icon within the range of the second area are stored in four corresponding fields, and based on Four fields display the status bar.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the content displayed in the first window is related to the content displayed in the second window.
- the interface displayed in the second window is generated according to the user's operation on the interface of the first window.
- the second window can be the first window.
- the window's subordinate window is the subordinate window.
- the operating system of the electronic device is any one of an Android system, a Windows system, and a Linux system.
- a display method executed by an electronic device, including: determining whether a first color and a second color are consistent, the first color corresponds to the status bar area of the first window, and the second color corresponds to The status bar area of the second window corresponds to the first window and the second window.
- the first window and the second window are two windows of the split-screen interface on the electronic device; determine whether to determine the range of the first area and the second area based on the judgment result.
- the first area is the area where the status bar is displayed on the first window
- the second area is the area where the status bar is displayed on the second window
- the first application running in the first window and the At least one of the second applications running in the second window has an immersive status bar; the status bar is displayed according to the first color and the second color.
- the electronic device determines whether the first color corresponding to the status bar area on the first window is consistent with the second color corresponding to the status bar area on the second window, and determines whether to determine the first color based on the result of the determination.
- the range of the area is the range of the second area, thereby displaying the status bar according to the first color and the second color.
- the determining whether to determine the range of the first area and the range of the second area based on the determination result includes: between the first color and the second color If they are inconsistent, determine the range of the first area and the range of the second area; wherein displaying the status bar according to the first color and the second color includes: according to the first color, The status bar icon in the first area is displayed in a first color; according to the second color, the status bar icon in the second area is displayed in a second color.
- the electronic device determines the range of the first area and the second area, and determines the range of the first area and the second area according to the determined range of the first area and the range of the second area.
- One color and a second color the status bar icon of the first area is displayed in the first color
- the status bar icon of the second area is displayed in the second color.
- the determining whether to determine the range of the first area and the range of the second area based on the determination result includes: between the first color and the second color If they are consistent, the range of the first region and the range of the second region are uncertain.
- the first application and/or the second application presets the color of the status bar icon
- the method further includes: obtaining the first application and/or the color of the status bar icon preset by the second application; change the The color of the status bar icon preset by the first application is determined as the first color, and/or the color of the status bar icon preset by the second application is determined as the second color.
- the first application or the second application respectively presets the color of the status bar icon
- the electronic device can determine the first color and the second color respectively, and the electronic device can obtain the preset color of the first application or the second application.
- the color of the status bar icon and determine it as the first color and the second color.
- the first application and/or the second application does not preset the color of the status bar icon
- the method further includes: obtaining the first application The background color of the first area and/or the background color of the second application in the second area; the background color of the first area and/or the second application according to the first application
- the background color of the second area determines the first color and/or the second color, wherein the difference between the background color of the first application in the first area and the first color is greater than the first color.
- a preset threshold the difference between the background color of the second application in the second area and the second color is greater than the first preset threshold.
- the first application or the second application does not preset the color of the status bar icon.
- the electronic device will obtain the background color of the first application in the first area and the background color of the second application in the second area, and use The obtained background color determines the first color and the second color, thereby displaying the status bar.
- the electronic device may obtain the identification of the background color set by the application in the first area and/or the second area, and determine the first color and/or the second color according to the background color identification.
- the method further includes: determining whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color are greater than a second grayscale. Preset threshold; wherein, displaying the status bar according to the first color and the second color includes: when the first grayscale or the second grayscale is greater than the second preset threshold, changing the first grayscale to the second grayscale.
- the status bar icon of a region or the status bar icon of the second region is displayed in white; when the first grayscale or the second grayscale is less than a second preset threshold, the status of the first region is changed to white.
- the bar icon or the status bar icon of the second area is displayed in black.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the operating system of the electronic device is any one of Android system, Windows system and Linux system.
- an electronic device including: one or more processors; a memory including instructions; when the instructions are executed by the one or more processors, the electronic device Execute the following steps: in response to the user's split-screen operation, divide the screen of the electronic device into at least two windows, the at least two windows include a first window and a second window, the first application running in the first window and At least one of the second applications running in the second window uses an immersive status bar; a first color is determined according to the first application, and a second color is determined according to the second application; according to the first application Color, display the color of the status bar icon within the range of the first area, according to the second color, display the color of the status bar icon within the range of the second area, the first area is the status bar displayed on the first window area, and the second area is an area on the second window where the status bar is displayed.
- the electronic device when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps: in the first application according to the first application
- the background color of the area determines the first color, wherein the difference between the background color of the first application in the first area and the first color is greater than a first preset threshold; or, according to the first application preset
- the color of the status bar icon is determined to determine the first color
- the second color is determined according to the background color of the second application in the second area, wherein the second application is in the background of the second area.
- the difference between the color and the second color is greater than the first preset threshold; or, the second color is determined according to the color of the status bar icon preset by the second application;
- the electronic device when the instructions are executed by the one or more processors, performs the following steps: determine the first color corresponding to the first color. Whether the grayscale and the second grayscale corresponding to the second color are greater than a second preset threshold; when the first grayscale or the second grayscale is greater than the second preset threshold, the third grayscale is The color of the status bar icon within a region or the status bar icon within the second region is displayed as white; when the first grayscale or the second grayscale is less than the second preset threshold, Display the color of the status bar icon within the first area or the status bar icon within the second area as black.
- the electronic device when the instructions are executed by the one or more processors, the electronic device performs the following steps: determine the range of the first area and the Describe the scope of the second region.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the operating system of the electronic device is any one of Android system, Windows system and Linux system.
- an electronic device including: one or more processors; a memory including instructions; when the instructions are executed by the one or more processors, the electronic device Perform the following steps: determine whether the first color and the second color are consistent, the first color corresponds to the status bar area of the first window, the second color corresponds to the status bar area of the second window, the first window and the second window is the two windows of the split-screen interface on the electronic device; determine whether to determine the range of the first area and the range of the second area based on the judgment result, and the first area is the first window on the first window.
- the area where the status bar is displayed, the second area is the area where the status bar is displayed on the second window, and at least one of the first application running in the first window and the second application running in the second window uses Immersive status bar; display the status bar according to a first color and a second color.
- the electronic device when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps: in the first color and the If the second colors are inconsistent, determine the range of the first area and the range of the second area; display the status bar icon of the first area as the first color according to the first color; The second color is used to display the status bar icon in the second area as the second color.
- the first application and/or the second application presets the color of the status bar icon.
- the electronic device is caused to perform the following steps: obtain the color of the status bar icon preset by the first application and/or the second application, and set the color of the status bar icon preset by the first application. Determine it as the first color, and/or determine the color of the status bar icon preset by the second application as the second color.
- the first application and/or the second application does not preset the color of the status bar icon.
- the electronic device is caused to perform the following steps: obtain the background color of the first application in the first area and/or the background color of the second application in the second area; according to the first A background color applied in the first area and/or a background color applied in the second area determines the first color and/or the second color, wherein the first The difference between the background color applied in the first area and the first color is greater than the first preset threshold, and the difference between the background color applied in the second area and the second color is greater than the first preset threshold. threshold.
- the electronic device when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps: determine a third color corresponding to the first color. Whether a grayscale and a second grayscale corresponding to the second color are greater than a second preset threshold; when the first grayscale or the second grayscale is greater than a second preset threshold, the first grayscale is The status bar icon of the region or the status bar icon of the second region is displayed in white; when the first grayscale or the second grayscale is greater than the second preset threshold, the status of the first region is changed to white. The bar icon or the icon of the status bar of the second area is displayed in black.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the operating system of the electronic device is any one of Android system, Windows system and Linux system.
- an electronic device including: a processing unit configured to respond to a user's screen splitting operation and divide the screen of the electronic device into at least two windows, where the at least two windows include a first window and a third window. Two windows, at least one of the first application running in the first window and the second application running in the second window uses the immersive status bar; the determining unit is also configured to determine the third application according to the first application. A color, a second color is determined according to the second application; a display unit, configured to display the status bar icon within the first area according to the first color, and display the second area according to the second color The first area is the area on the first window where the status bar is displayed, and the second area is the area on the second window where the status bar is displayed.
- the electronic device includes a processing unit, a determining unit and a display unit.
- the processing unit is configured to divide the screen of the electronic device into at least two windows in response to a split-screen operation.
- the determining unit is configured to divide the screen of the electronic device into at least two windows according to the screen splitting operation of the electronic device.
- the application of the first window and the second window determines the first color and the second color;
- the display unit is used to display the color of the status bar icon within the first area according to the first color, and display the second color according to the second color. The color of the status bar icon within the area.
- the determining unit is specifically configured to determine the first color according to the background color of the first application in the first area, wherein the first The difference between the background color applied in the first area and the first color is greater than the first preset threshold; or, the first color is determined according to the color of the status bar icon preset by the first application; and, Determine the second color according to the background color of the second application in the second area, wherein the difference between the background color of the second application in the second area and the second color is greater than a first preset threshold; Or, determine according to the color of the status bar icon preset by the second application The second color.
- the determining unit is further configured to: determine whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color Greater than the second preset threshold; wherein, the display unit is specifically configured to: when the first grayscale or the second grayscale is greater than the second preset threshold, display the The status bar icon or the status bar icon within the second area is displayed in white; when the first grayscale or the second grayscale is less than the second preset threshold, the first area is The status bar icons within the range or the status bar icons within the second area are displayed in black.
- the determining unit is further configured to determine the range of the first area and the range of the second area.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the operating system of the electronic device is any one of Android system, Windows system and Linux system.
- an electronic device including: a determining unit configured to determine whether a first color corresponds to a first window and a second color correspond to a second window.
- the first window and the second window are two windows of a split-screen interface on the electronic device; the determination unit is also used to determine whether to determine the range of the first area and the second area based on the determination result. range, the first area is the area where the status bar is displayed on the first window, the second area is the area where the status bar is displayed on the second window, the first window runs the first application, and the The second window runs a second application, and at least one of the first application and the second application uses an immersive status bar; and a display unit configured to display the status bar according to the first color and the second color.
- the determining unit is specifically configured to: determine the range of the first area when the first color and the second color are inconsistent. and the range of the second area; wherein the display unit is specifically configured to: display the status bar icon of the first area as a first color according to the first color; according to the second color, Display the status bar icon in the second area as a second color
- the first application and/or the second application presets the color of the status bar icon
- the electronic device further includes an acquisition unit for obtaining the first color and/or the second color preset by the first application and/or the second application; the determining unit is further configured to set the status bar icon preset by the first application
- the color of the status bar icon preset by the second application is determined as the first color
- the color of the status bar icon preset by the second application is determined as the second color.
- the first application and/or the second application does not preset the color of the status bar icon
- the obtaining unit is further configured to obtain the third a background color applied in the first area and/or a background color applied in the second area
- the determining unit is also configured to apply the background color in the first area according to the first application
- the background color and/or the background color of the second application in the second area determines the first color and/or the second color, wherein the background color of the first application in the first area and The difference between the first color is greater than the first preset threshold, and the difference between the background color of the second application in the second area and the second color is greater than the first preset threshold.
- the determining unit is further configured to determine whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color are greater than a second preset threshold; the display unit is specifically configured to: when the first grayscale or the second grayscale is greater than the second preset threshold, change the status bar icon of the first area or the The status bar icon of the second area is displayed in white; when the first grayscale or the second grayscale is greater than the second preset threshold, the status bar icon of the first area or the second area is displayed as white. The status bar icon appears black.
- the first application and the second application are the same application, and the interface displayed by the second window is based on the user's control of the first window. generated by the operation of the interface.
- the operating system of the electronic device is any one of Android system, Windows system and Linux system.
- a computer storage medium which is characterized in that it includes computer instructions.
- the electronic device causes the electronic device to execute the first aspect or any implementation of the first aspect.
- method and the display method of the second aspect or any implementation method of the second aspect are provided, which is characterized in that it includes computer instructions.
- An eighth aspect provides a computer program product, which is characterized in that when the computer program product is run on a computer, the computer is caused to execute the first aspect or any implementation of the first aspect and the second aspect Or any implementation of the second aspect display method.
- Figure 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
- Figure 2 is a software structure block diagram of an electronic device provided by an embodiment of the present application.
- Figure 3 is a schematic diagram of an immersive status bar and a non-immersive status bar.
- Figure 4 shows the status bar display when the electronic device is in multi-window mode.
- Figure 5 is a schematic flow chart of a display method provided by an embodiment of the present application.
- Figure 6 is a scene diagram of an electronic device in multi-window mode to which the display method provided by the embodiment of the present application is applicable.
- Figure 7 is a schematic diagram of new variables in the display method provided by the embodiment of the present application.
- Figure 8 is a status bar display effect diagram using the display method provided by the embodiment of the present application.
- Figure 9 shows a timing diagram of the display method provided by the embodiment of the present application.
- Figure 10 is a schematic flow chart of a display method provided by an embodiment of the present application.
- Figure 11 is a schematic flowchart of scene judgment of the display method provided by the embodiment of the present application.
- Figure 12 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
- Figure 13 is a schematic block diagram of another electronic device provided by an embodiment of the present application.
- first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
- the embodiment of the present application provides a display method, which can be applied to an electronic device or a separate application program.
- the application program can implement the application window display method in the present application.
- the display method provided by this application can switch a window displayed in a split-screen state to be displayed in a floating window or floating icon state, or lock the window to the edge of the screen. In this way, when the user needs to use the application again, the user can quickly operate the floating window or floating icon or locked window without interrupting the current application task, improving the user experience.
- the application window display method provided by the embodiment of the present application can be applied to mobile phones (such as ordinary screen mobile phones, curved screen mobile phones, folding screen mobile phones, full-screen mobile phones, etc.), tablet computers, vehicle-mounted equipment, and wearable devices (such as smart watches, smart phones, etc.). rings, smart glasses, smart jewelry, etc.), augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital Assistants (personal digital assistants, PDAs), televisions, monitors, and other electronic devices with display functions.
- AR augmented reality
- VR virtual reality
- laptops laptops
- netbooks personal digital Assistants (personal digital assistants, PDAs)
- FIG. 1 shows a schematic structural diagram of an electronic device 100 .
- 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, Power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191 , indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
- the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
- the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- baseband processor baseband processor
- NPU neural-network processing unit
- different processing units can be independent devices or integrated in one or more processors.
- the controller may be the nerve center and command center of the electronic device 100 .
- the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
- processor 110 may include one or more interfaces.
- Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- UART universal asynchronous receiver and transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
- processor 110 may include multiple sets of I2C buses.
- the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
- the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100 .
- the I2S interface can be used for audio communication.
- the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
- MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
- the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the electronic device 100 .
- the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100 .
- the GPIO interface can be configured through software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
- the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 .
- the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the charging management module 140 is used to receive charging input from the charger.
- the power management module 141 is used to connect the battery 142 . While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
- the power management module 141 also It can be used to monitor battery capacity, battery cycle times, battery health status and other parameters.
- 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.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- the mobile communication module 150 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 .
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
- the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites. Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
- WLAN wireless local area networks
- BT Bluetooth
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication
- IR infrared technology
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like.
- the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
- the display screen 194 is used to display images, videos, etc.
- Display 194 includes a display panel.
- the display panel can use 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 (active-matrix organic light emitting diode).
- LCD liquid crystal display
- OLED organic light-emitting diode
- AMOLED organic light-emitting diode
- FLED flexible light-emitting diode
- Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
- the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
- the ISP is used to process the data fed back by the camera 193.
- Camera 193 is used to capture still images or video.
- the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
- the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
- 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 the data storage function. Such as saving music, videos, etc. files in external memory card.
- Internal memory 121 may be used to store computer executable program code, which includes instructions.
- the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 .
- the internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
- the storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.).
- the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
- the electronic device 100 also includes a plurality of sensors.
- the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
- pressure sensor 180A may be disposed on display screen 194 .
- a capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance.
- the electronic device 100 detects the strength of the touch operation according to the pressure sensor 180A.
- the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
- touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation intensity greater than or equal to the first pressure threshold is applied to the short circuit When the message application icon is displayed, execute the command to create a new short message.
- the gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .
- Air pressure sensor 180C is used to measure air pressure.
- the magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover or the flip cover.
- the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
- Distance sensor 180F for measuring distance. Electronic device 100 can measure distance via infrared or laser.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode, and may detect whether there is an object near the electronic device.
- the ambient light sensor 180L is used to sense ambient light brightness.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness, automatically adjust the white balance when taking pictures, etc.
- Fingerprint sensor 180H is used to collect fingerprints.
- Temperature sensor 180J is used to detect temperature.
- Bone conduction sensor 180M can acquire vibration signals.
- Touch sensor 180K also called "touch panel”.
- the touch sensor 180K can be disposed on the display screen 194.
- the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
- the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
- the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
- Visual output related to the touch operation may be provided through display screen 194 .
- the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a location different from that of the display screen 194 .
- the buttons 190 on the electronic device include power buttons, volume buttons, etc.
- Key 190 may be a mechanical key. It can also be a touch button.
- the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
- the motor 191 can generate vibration prompts.
- the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
- touch operations for different applications can correspond to different vibration feedback effects.
- the motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 . Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects.
- the touch vibration feedback effect can also be customized.
- the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
- the SIM card interface 195 is used to connect a SIM card.
- the above introduces a possible hardware structure diagram of the electronic device 100 .
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of this application uses a layered architecture
- the system is taken as an example to illustrate the software structure of the electronic device 100 .
- FIG. 2 is a software structure block diagram of the electronic device 100 according to the embodiment of the present application.
- the layered architecture divides the software of electronic devices into several layers, and each layer has clear roles and division of labor.
- the layers communicate through software interfaces.
- the Android system is divided into four layers, from top to bottom: application (APP) layer, application framework (framework) layer, and system runtime library layer (including system libraries and Android runtime ( Android runtime)), and the kernel layer.
- APP application
- API application framework
- system runtime library layer including system libraries and Android runtime ( Android runtime)
- the application layer can include a series of application packages. As shown in Figure 2, the application package can include camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, short message and other applications. Applications are mainly about user interface (UI), and are usually written using JAVA language to call the interface of the application framework layer.
- UI user interface
- the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
- the application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
- a window manager is used to manage window programs.
- the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
- the window manager can obtain the size of the window to be displayed on the electronic device 100, determine the content of the window to be displayed, and so on.
- the window to be displayed of the electronic device 100 may include a window being displayed on the interface of the electronic device 100 , and may also include windows of one or more applications running in the background of the electronic device 100 .
- the window manager is a service that is global, unique in the system, and independent of Android applications.
- the window manager is common to all Android applications.
- Android's window management system is based on the client/service (C/S) mode.
- the entire window system is divided into two parts: the server (service) and the client (client).
- the client is the application program, which is responsible for requesting the creation of windows and using windows;
- the server is the window management service (window manager service or WindowManagerService, WMS), which is responsible for completing window maintenance, window display, etc.
- the client does not directly interact with the window management service, but directly interacts with the local object window manager (window manager or WindowManager), and then the window manager (WindowManager) completes the interaction with the window management service (WindowManagerService). This interaction is transparent to the application, and the application cannot be aware of the existence of the window management service.
- a window can be understood as a rectangular area on the screen, in which a user interface (UI) is displayed for interacting with the user.
- the window can also hide the user interface (i.e., the operation interface of the software), and quickly display the application navigation and functional operations to the user when the user needs to operate, or expand the application operation interface again according to the triggered instructions.
- the window is actually a canvas (surface).
- a screen can have multiple windows, and the layout, order and window animation of these multiple windows are managed by the window management service WMS. The mixing and display of multiple canvas contents is implemented by the SurfaceFlinger service. Windows are hierarchical, and windows with a larger hierarchy will be overlaid on windows with a smaller hierarchy.
- the system runtime library layer (libraries) can be divided into two parts, namely the system library and the Android runtime.
- Android runtime is the Android operating environment, including core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
- the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
- the application layer and application framework layer run in virtual machines.
- the virtual machine executes the java files of the application layer and application framework layer into binary files.
- the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
- the system library is the support of the application framework and an important link between the application framework layer and the kernel layer. It can include multiple functional modules, such as surface manager (surface manager), media libraries (media libraries), and three-dimensional graphics processing libraries ( For example: open graphics library for embedded systems (open graphics library for embedded systems, OpenGL ES)), 2D graphics engine (for example: Skia database (skia graphics library, SGL)), etc.
- surface manager surface manager
- media libraries media libraries
- three-dimensional graphics processing libraries For example: open graphics library for embedded systems (open graphics library for embedded systems, OpenGL ES)
- 2D graphics engine for example: Skia database (skia graphics library, SGL)
- the kernel layer is the layer between hardware and software and is used to provide essential functions of the operating system such as file management, memory management, process management, network protocol stack, etc.
- the kernel layer at least includes display driver, camera driver, audio driver, sensor driver, Bluetooth driver, etc.
- the interfaces of the application in the two windows can not affect each other, that is, the interfaces displayed in the two windows can be the same interface or different interfaces; or different interfaces of the application can also be displayed in the two windows.
- the content displayed in one window can be generated by the user's operation in the other window, that is, the content displayed in the two windows has a certain relationship.
- the electronic device can also be in a working mode of multi-screen collaboration with other electronic devices, that is, two windows of the electronic device are displayed on the screen of the other electronic device.
- the electronic device can implement multi-window mode through an application.
- Electronic devices generally have a status bar at the top, which generally displays icons such as power, time, and signal quality.
- the system will provide an immersive mode status bar, which expands the application of each window to the entire screen of the electronic device, so that users will not be disturbed by the system's status bar when using the application.
- FIG. 3 shows examples showing an immersive status bar and a non-immersive status bar, respectively.
- Figure 3 (a) is an example of an immersive status bar.
- the background color of the status bar area is consistent with the application, which provides a better user experience.
- the application can set the color of the status bar icon according to the interface style, making the application interface and system interface unified. .
- the color of the status bar area is black, and the style color of the application is gray.
- the styles of the application and the status bar are quite different.
- the background color of the status bar layer will be set to transparent through the flag FLAG_TRANSLUCENT_STATUS, and the interface applied on the window will extend to the status bar area, and the status bar area will display the color applied on the window interface. , so that the style on the entire window is consistent, and the icons on the status bar will be set according to the background color of the status bar area.
- the background color of the status bar area or the color of the status bar area is the background color of the corresponding status bar area on the window that the user can directly see when using the electronic device, and the background color of the status bar layer Is the color of the status bar layer in a layered window on an electronic device system. In some cases, the background color of the status bar area is the background color of the status bar layer.
- the background color of the status bar area is the color of the status bar layer; in other cases, the background color of the status bar area is not the background color of the status bar layer.
- the application on the window uses the immersive status bar , at this time, the background color of the upper status bar layer is transparent, and the application interface Extended to the status bar area, the background color of the status bar area is actually the background color of the application below the status bar.
- FIG. 4 shows the display situation of the status bar when the electronic device is in dual-window mode.
- the screen interface of the electronic device includes a first window 401 and a second window 402.
- the background color of the status bar area of window 401 is dark, while the background color of the status bar area of window 402 is dark.
- the background color is light.
- the icons on the status bar will be set according to window 402. Since the background color of status bar area 404 of window 402 is light, the color of the icon will be set to black. , therefore the color of the icon in the status bar area 403 of the window 401 follows the color of the icon in the status bar area 404 of the window 402 and is set to black, and the signals of the two SIM cards of the electronic device are displayed on the status bar area 403 of the window 401 The intensity icon, the wireless network icon, the battery power icon, and the time icon displayed in the status bar area 404 of the window 402 are all set to black by the operating system of the electronic device. In this case, the status bar icon of the window 401 can have a certain color difference from the background of the status bar area 401 corresponding to the window 401, and the icon can be recognized.
- the icon in the status bar area 405 of the window 402 will follow the color of the icon in the status bar area 406 of the window 401 and is set to white.
- the signal strength icons, wireless network icon and battery power icon of the two SIM cards of the electronic device displayed in the area 405 and the time icon displayed in the status bar area 406 of the window 402 are all set to white by the operating system of the electronic device. At this time, the time icon in the status bar area 406 on the window 402 cannot be clearly displayed because it is consistent with the background color of the status bar area 406 .
- Figure 5 shows a display method provided by an embodiment of the present application.
- the screen of the electronic device In response to the user's split-screen operation, divide the screen of the electronic device into at least two windows.
- the at least two windows include a first window and a second window.
- the first application runs in the first window and the second application runs in the second window.
- At least one app in uses an immersive status bar.
- the electronic device responds to the user's split-screen operation and divides the screen of the electronic device into at least two windows. Taking the electronic device being divided into two windows as an example, the electronic device is in dual-window mode.
- the interfaces in the two windows can be displayed independently.
- the first application and the second application may not be the same application.
- the user can perform a split-screen operation.
- the electronic device enters the split-screen interface.
- the screen of the electronic device is divided into two windows.
- the two windows run two applications independently, and the user can independently operate the application program interfaces displayed in the two windows. As shown in (a) of Figure 6, the screen of the electronic device is divided into a first window 601 and a second window 602 in response to the user's operation.
- the first window 601 can be used for the user to have a conversation with Xiao Wang, and the user can use the second window 601 to communicate with Xiao Wang.
- 602 plays the video, and the user's operations on the first window 601 and the second window 602 are independent of each other and will not affect each other.
- the first application and the second application may not be two independent applications, but independent interfaces of the same application.
- the user wants to use the same application to establish a conversation with two people at the same time, and does not want to frequently conduct conversation interfaces. Exit and enter to switch between two session interfaces.
- the screen of the electronic device can be divided into a first window 603 and a second window 604.
- the user can use the first window 603 has a conversation with Xiao Wang, and uses the second window 604 to have a conversation with Xiao Li.
- the first window 603 and the second window 604 are different interfaces of the same application, and the interfaces of the two windows are independent of each other.
- the first application and the second application are the same application, and the interface displayed in the second window is generated based on the user's operation on the interface of the first window. That is to say, the two window interfaces display different interfaces of the same application, and the second window is displayed according to the user's operation on the first window.
- the first window 605 when the user opens the session application, the first window 605 will display the user's session list.
- the user's available session list includes Xiao Wang, Xiao Zhang, Xiao Li and his family. The user selects the session "Xiao Li". ", the second window 606 will display the specific content of the conversation between the user and "Xiao Li".
- the user can also select other sessions in the first window 605, and then the user's other sessions will also appear in the second window 606 correspondingly. That is, the content displayed in the second window 606 is a next-level window displayed according to the user's operation on the first window 605 .
- a session application is used to schematically illustrate an example in which the second window is displayed according to the user's operation on the first window in a multi-window state. This application is also applicable in other scenarios.
- the first window is a product list
- the second window is product details displayed after the user clicks on a product in the list.
- both windows of the electronic device are located on the display screen of the electronic device.
- electronic devices can It is in the multi-screen collaboration mode, that is, the window of the electronic device is displayed on other electronic devices.
- the screen interface of the mobile phone is displayed on the interface of the laptop, and the screen interface of the mobile phone includes a first window 607 and a second window 608. The user can operate on the computer display screen. The interface displayed on the mobile phone.
- the display method provided by the embodiment of the present application can also be applied to the application of electronic devices.
- an Android emulator is used on a laptop to display a split-screen interface.
- the split-screen interface displayed on the Android emulator includes a first window and a second window.
- the electronic device After the electronic device is divided into at least two windows, the electronic device will determine whether the applications of the two windows use the immersive status bar.
- the application uses the immersive mode by default, and after the application is opened, the electronic device can obtain that the application sets the background color of the status bar layer of its interface to be transparent. Specifically, the application has the STATUS_BAR_TRANSPARENT identifier.
- the operating system of the electronic device determines that there are two windows after the user performs a split-screen operation, and the background color of the interface of one application in the two windows or the status bar layer of the interface of both applications is applied. Set this flag to transparent.
- the electronic device can set the immersive status bar for the two interfaces of the application, so that the application can The interface user experience on electronic devices is better.
- the operating system of the electronic device can add the STATUS_BAR_TRANSPARENT flag and set the background color of the status bar layer to transparent, so that the color of the status bar area changes with the application background, completing the setting of the immersive status bar.
- the electronic device can To make the display interface of the second application more comfortable, set an immersive status bar for the second application; you can also follow the settings of the second application and not set an immersive status bar for the second application.
- the application corresponding to at least one of the two windows of the electronic device has an immersive status bar preset, or the system of the electronic device sets an immersive status bar for the application corresponding to the window.
- the electronic device also determines the range of the first area and the range of the second area.
- the ranges of the first area and the second area can be stored in corresponding variables respectively.
- the ranges of the first area and the second area can be stored in variables stackbounds_1(x1, y1, height1, width1) and stackbounds_2(x2, y2, height2, width2) respectively, where (x, y) is the area vertex of the area. Coordinates, (height, width) are the height and width of the area.
- FIG. 7 there are a first window and a second window on the electronic device. The first window corresponds to the first area of the status bar and the second window corresponds to the second area of the status bar, as shown in FIG. 7 .
- S504 Determine the first color according to the first application; determine the second color according to the second application.
- S506 Display the status bar icon within the range of the first area according to the first color, and display the status bar icon within the range of the second area based on the second color.
- the first area is the area where the status bar is displayed on the first window
- the second area is an area on the second window where the status bar is displayed.
- the electronic device may determine the first color as the color of the status bar icon in the first area, and determine the second color as the color of the status bar icon in the second area.
- the status bar icon in the first area and the status bar icon in the second area are displayed according to the first color and the second color.
- determining the first color according to the first application includes: determining the first color according to the background color of the first application in the first area, where the background color of the first application in the first area is consistent with the first color. The difference in color is greater than the first preset threshold; or, determine the first color according to the color of the status bar icon preset by the first application; and determine the second color according to the second application, including: according to the second application, The background color of the second area determines the second color, where the difference between the background color of the second application in the second area and the second color is greater than the first preset threshold; or, based on the status bar icon preset by the second application Color, determine the second color.
- the electronic device can set the color of the status bar icon corresponding to the first window and the second window according to the application's preset or by itself.
- the immersive status bar is preset or the immersive status bar is set by the electronic device.
- the electronic device can determine the first color and the second color in the following ways:
- Method 1 The first application and the second application have preset the color of the status bar icon. Then, the electronic device determines the first color based on the color of the status bar icon preset by the first application; and determines the second color based on the color of the status bar icon preset by the second application.
- electronic devices can obtain the application's use of a light status bar through the identification: SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, which means that the application's default status bar icon color is black. If there is no such identification, it means that the application uses a dark status bar. , the default icon color is white.
- the dark and light colors can be the gray value corresponding to the background color of the status bar area, and the gray value is greater than the preset threshold.
- the gray value is smaller than the preset threshold, the color is light.
- the gray value is less than the preset threshold, the color is dark.
- the electronic device can obtain different status bar colors preset by the application through different identifiers.
- the application presets corresponding color identifiers.
- the color identifiers are not limited to corresponding to black and white icons, but can also correspond to For other color icons, the electronic device can respectively determine the first color and the second color according to the color identification of the status bar icon set by the application.
- Method 2 The first application and the second application do not preset the color of the status bar icon. Then the electronic device determines the first color according to the background color of the first application in the first area, where the difference between the background color of the first application in the first area and the first color is greater than the first preset threshold; The background color of the two areas determines the second color, wherein the difference between the background color of the second application in the second area and the second color is greater than the second preset threshold.
- the electronic device can obtain the background color of the first application in the first area and the background color of the second application in the second area in two ways.
- the electronic device can obtain the background color of the first application in the first area and the background color of the second application in the second area through the background color identifiers of the first application and the second application.
- the electronic device can obtain the background color corresponding to the top view in the decorView corresponding to the first window, and the background color can be stored in the background field in the resource file of the application activity. If the top-level view does not set a background color or sets a transparent background color, continue to obtain the background color of the next-level view, and finally obtain the background color of the first application in the first area and the background color of the second application in the second area.
- there may be other different background color identifiers and acquisition methods which will not be described again in the embodiment of this application.
- the electronic device can obtain the background color of the first application in the first area and the background color of the second application in the second area by directly collecting the colors of multiple pixels in the first area and the second area.
- the plurality of collected pixels in the first area and the second area may be evenly distributed in the first area and the second area.
- the plurality of pixels collected in the first area and the second area may not be evenly distributed in the first area and the second area. For example, they may only be collected near the position where the status bar icon is displayed in the first area and the second area. More pixels to obtain the background colors of the first and second areas.
- the color of a single pixel can be calculated by the R, G, and B values of the pixel, where R, G, and B are the red, green, and blue values of the pixel.
- the pixel value can be calculated by the weighted average of the values of R, G, and B.
- h1, h2, and h3 can be the same value, and the color of the pixel is the arithmetic mean of RGB; or h1, h2, and h3 can be different values, and the value can be set according to needs or experience.
- the background colors of the first area and the second area can be calculated by weighting or arithmetic averaging the colors of multiple pixels in the first area or the second area.
- the colors of multiple pixels in the first area and the second area can be directly obtained by calculating the weighted average or arithmetic average of the R, G, and B values of the multiple pixels.
- the electronic device can determine the first color and the second color based on the background color of the first area and the background color of the second area. Taking the determination of the first color corresponding to the first application as an example, specifically, for example, the electronic device can determine the R, G, and B values of the primary colors corresponding to the background color, so that the first color can be determined based on the R, G, and B values of the background color.
- the difference between the R value, G value, and B value corresponding to the first color and the R value, G value, and B value corresponding to the background color is greater than the first preset threshold or the R value, G value, and B value corresponding to the first color
- the difference between one of the values and one of the R value, G value, and B value corresponding to the background color is greater than the first preset threshold, where R, G, and B are the red, green, and blue values of the background color.
- the first color and the background color may be complementary colors.
- the first color may be set to green, and the first color may be set to the color of the status bar icon.
- the electronic device can calculate the weighted values corresponding to the R value, G value, and B value of the background color, and set the weighted values of the R value, G value, and B value of the first color and the background color R value, G value, and B value.
- the weighted value is greater than the first preset threshold.
- Method 3 One of the first application and the second application presets the color of the status bar icon. Take the first application presetting the color of the status bar icon as an example. The electronic device may determine the color of the icon preset by the first application as the first color, and determine the second color according to the background color of the second application in the second area (see the above description for the specific determination method).
- the application in the first window uses the immersive status bar
- the application in the second window does not use the immersive status bar.
- the first color can be determined according to the previous method for determining the background color of the immersive status bar and the color of the icon.
- the preset icon color can be directly determined as the second color.
- the operating system of the electronic device by calling getWindow().getDecorView().setSystemUiVisibility() Method, after obtaining that the application has the View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR identifier, it can be determined that the status bar background color preset by the second application is light color, thereby determining that the status bar icon color preset by the second application is dark, that is, the first color is light Color, the second color is dark color, in a specific scene, for example, light color is white and dark color is black.
- the electronic device can obtain the corresponding color identifier through the getWindow().setStatusBarColor() method, and set the corresponding color identifier to The color is determined as the first color, and the electronic device can determine the second color in a similar manner to the immersive status bar mentioned above; or the operating system of the electronic device can select a corresponding color combination, for example, the background color of the status bar is black, and the status bar The color of the icon is white.
- the first color and the second color can be directly determined as the colors of the status bar icons of the first area and the second area, that is, based on the first color and the second color, Display status bar icons within a range of the first area and status bar icons within a range of the second area.
- the electronic device can also determine whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color are greater than the second preset threshold; wherein, according to the first color, the first area is displayed
- the color of the status bar icon within the range, according to the second color displays the color of the status bar icon within the range of the second area, including: when the first grayscale or the second grayscale is greater than the second preset threshold, The status bar icon in the first area or the status bar icon in the second area displays white; when the first grayscale or the second grayscale is greater than the second preset threshold, the status bar icon in the first area or the second area is changed to white.
- the color of the status bar icon is black.
- the electronic device can convert the RGB values corresponding to the first color and the second color into YUV values.
- Y represents grayscale
- U and V represent chroma
- Y 0.299R+ 0.587G+0.114B.
- Y is greater than 192
- Y is less than 192
- the above calculation formula of Y and the black and white icon display threshold 192 are only given schematically. Under different standards, different calculation formulas may be used to calculate the corresponding grayscale value.
- the electronic device displays a display based on the range of the first area, the range of the second area, the color of the status bar icon within the range of the first area, and the color of the status bar icon within the range of the second area.
- Status bar of electronic device displays a display based on the range of the first area, the range of the second area, the color of the status bar icon within the range of the first area, and the color of the status bar icon within the range of the second area.
- the color of the status bar icon within the range of the first area determined by the electronic device may be the first color or black or white further determined according to the first color
- the color of the status bar icon within the range of the second area may be The second color or black or white further determined based on the second color.
- the range of the second area stackbounds_2 divides the status bar into two parts, sets the color of the status bar icon within the range of the first area stored by stackbounds_1 to the color in the variable visibility_1, and sets the status bar within the range of the second area stored by stackbounds_2
- the color of the icon is set to the color in the variable visibility_2, so that the status bar icon is displayed based on the values of the four variables.
- the electronic device can use Android system, Linux system, Windows system, etc.
- Figure 8 shows the display situation of the status bar when the technical solution of the embodiment of the present application is adopted.
- the screen of the electronic device is divided into a first window 801 and a second window 802.
- the background color corresponding to the first area 803 (indicated by the white dotted box) is black, and the background color corresponding to the second area 804 is white. Then you can make the color of the icon and the color of the area complementary, that is, set the status bar icon in the first area to white, and set the status bar icon in the second area to black, so that the status bar icon on each window can be clearly visible. .
- FIG. 9 shows a timing diagram of the display method provided by the embodiment of the present application, including the following steps:
- the window needs to be re-layout.
- the change in the window size of the electronic device is caused by the user's split-screen operation. Therefore, the operating system of the electronic device receives the user's split-screen operation and calls the layout in the Window Management Service (WindowManagerService, WMS).
- the window method (relayoutWindow) starts laying out the window.
- the window management service calls the refresh interface method (performSurfacePlacement) in the window root container (RootWindowContainer) to refresh the interface of the electronic device, cyclically refreshes the size and position of the sub-window, and calculates the size of the sub-window.
- the electronic device refreshes the size and position of the first window and the second window, and calculates Calculate the size of the first window and the second window.
- RootWindowContainer calls the application interface change processing method (applySurfaceChangesTransaction) in the display content (DisplayContent) to complete the window animation.
- the window animation can mainly include the animation of window switching or entry generated through split-screen operation.
- DisplayContent calls the post-layout display method (finishPostLayoutPolicyLw) in the display policy (DisplayPolicy) to control the display and hiding of status bar icons and the specific icons displayed.
- DisplayPolicy calls the update system UI display method (onSystemUiVisivilityChanged) in the status bar (StatusBar) and the update system UI (POLICY_UPDATE_SYSUIVISIBILITY) interface to pass the values of visibility_1, visibility_2, stackbounds_1 and stackbounds_2 to the StatusBar, and divide them in the status bar. stackbounds_1 and stackbounds_2 areas, and set the color of the corresponding areas according to visibility_1, visibility_2, so that the status bar can be updated.
- the update system UI display method onSystemUiVisivilityChanged
- POLICY_UPDATE_SYSUIVISIBILITY POLICY_UPDATE_SYSUIVISIBILITY
- StatusBar calls the update status bar method (updateStatus) in the status bar control (LightBarController) to update the status bar.
- FIG. 10 shows a schematic flow chart of the display method provided by the embodiment of the present application.
- the electronic device will determine the number of windows and whether to use an immersive status bar.
- the scene matching process is shown in Figure 11, including the following steps:
- the electronic device determines that the application device of the first window has used the immersive status bar, it can continue to match the scene of the second window. If the application of the first window does not use the immersive status bar, the immersive status bar can be set for one window according to the user's preset settings for the electronic device.
- step S1130 the electronic device has made a preliminary judgment on the dual-window scenario of the electronic device and determined that the first window uses an immersive status bar or an immersive status bar is set for the first window. At this time, the electronic device still needs to determine whether there are two windows to prevent one of the two windows from being closed by the user before performing the next scene matching.
- the electronic device determines whether the second window uses the immersive status bar. If not, the immersive status bar can be set for the application of the second window based on the user's preset settings or the settings of the electronic device.
- S1150 update the status bar according to the steps from S1020 to S1050.
- the electronic device scene matching is completed, and the status bar can be updated according to the subsequent steps.
- the electronic device will determine that there are two windows, and will make both windows use the immersive status bar according to the presets of the two windows or settings by the electronic device.
- the technical solution adopted in the embodiment of the present application can be used in a scenario where only one window uses an immersive status bar. The details have been introduced previously and will not be described again here.
- S1020 Determine whether the applications in both windows have preset colors for status bar icons.
- S1030 Determine whether the colors of the status bar icons corresponding to the two windows are consistent.
- the colors of the status bar icons corresponding to the two windows may be preset by the application; or the color of the status bar icon corresponding to one window is preset, and the color of the status bar icon corresponding to the other window is the electronic device. Determined based on the background of the application; or the colors of the status bar icons corresponding to the two windows are determined by the electronic device based on the background of the application. The electronic device determines whether the colors of the status bar icons corresponding to the two windows are consistent.
- the status bar area range corresponding to the two windows can be obtained. Specifically, the status bar can be changed according to the display conditions of the two windows. Divided into two areas.
- the electronic device needs to obtain the range of the status bar areas corresponding to the two windows and set the colors of the status bar icons according to the area ranges. Specifically, you can add a variable visibility_1 that describes the color of the status bar icon within the scope of the first region, a variable visibility_2 that describes the color of the status bar icon within the scope of the second region, and the scope variables stackbounds_1 and the second region. The scope variable stackbounds_2 of the area is used, and the status bar is displayed based on the values of the four variables.
- the status bar when the first color and the second color are consistent, the status bar does not display the corresponding status bar icon in the corresponding window sub-regions, which can reduce the problem of displaying the status bar in sub-regions in this case. processing overhead.
- the method of the embodiment in Figure 5 can also be adopted, that is, status bar icons are directly displayed in different regions without considering whether the icon colors are consistent.
- the embodiment of the present application only introduces the technical solution of the embodiment of the present application by taking the electronic device including two windows on the display screen as an example.
- the solution of the embodiment of the present application can also set the color of the status bar icon in the status bar area corresponding to different windows according to the application interface according to the relationship between the window and the status bar.
- the color of the status bar icon can be set for each window in multiple windows.
- variable that stores the window's corresponding status bar area range and the color of the status bar icon can finally be based on the application preset of each window or determined by the electronic device, and the icons on the status bar can be displayed in color in different areas, so that the color of the status bar icon can be displayed on the entire screen.
- the status bar icons can be clearly displayed.
- FIG. 12 shows an electronic device 1200 provided by an embodiment of the present application.
- the electronic device 1200 includes a determining unit 1210.
- the electronic device may also include a display unit 1220.
- the determining unit 1210 and the display unit 1220 may implement corresponding communication functions.
- the electronic device 1200 may include a unit for performing the methods of FIGS. 5, 9 to 11. Moreover, each unit in the electronic device 1200 and the above-mentioned other operations and/or functions are respectively intended to implement the corresponding processes of the method embodiments of FIG. 5, FIG. 9 to FIG. 11.
- the electronic device 1200 includes: a processing unit 1210, configured to respond to the user's split-screen operation and divide the screen of the electronic device into at least two windows.
- the at least two windows include a first window and a second window.
- the first window runs At least one of the first application and the second application running in the second window uses the immersive status bar;
- the determining unit 1220 is also configured to determine the first color according to the first application, and determine the second color according to the second application.
- the display unit 1230 is configured to display the status bar icon within the range of the first area according to the first color, and to display the status bar icon within the range of the second area according to the second color.
- the first area is displayed on the first window.
- the area of the status bar, the second area is the area on the second window where the status bar is displayed.
- the determination unit 1220 is specifically configured to determine the first color according to the background color of the first application in the first area, where the difference between the background color of the first application in the first area and the first color is greater than a first preset threshold; or, determine the first color according to the color of the status bar icon preset by the first application; and determine the second color according to the background color of the second application in the second area, where the second application is in The difference between the background color of the second area and the second color is greater than the first preset threshold; or, the second color is determined according to the color of the status bar icon preset by the second application.
- the determination unit 1220 is also used to: determine whether the first grayscale corresponding to the first color and the second grayscale corresponding to the second color are greater than a second preset threshold; wherein, the display unit 1230, specifically Used for: when the first grayscale or the second grayscale is greater than the second preset threshold, display the color of the status bar icon within the first area or the status bar icon within the second area as white; when the first When the grayscale or the second grayscale is less than the second preset threshold, the status bar icon within the first area or the status bar within the second area is The color of the icon is shown as black.
- the determining unit 1220 is also used to determine the range of the first area and the range of the second area.
- the first application and the second application are the same application, and the interface displayed in the second window is generated based on the user's operation on the interface of the first window.
- the operating system of the electronic device 1200 may be any one of Android system, Windows system, and Linux system.
- Figure 13 shows another electronic device 1300 provided by an embodiment of the present application.
- Electronic device 1300 includes: processor 1320.
- the processor 1320 is used to implement corresponding control management operations.
- the processor 1320 is used to support the electronic device 1300 to perform the methods or operations or functions of the aforementioned embodiments.
- the electronic device 1300 may also include: a memory 1310 and a communication interface 1330; the processor 1320, the communication interface 1330, and the memory 1310 may be connected to each other or connected to each other through a bus 1340.
- the communication interface 1330 is used to support the electronic device 1300 to communicate with other devices, etc.
- the memory 1310 is used to store program codes and data of the electronic device 1300 .
- the processor 1320 calls the code or data stored in the memory 1310 to implement corresponding operations.
- the memory 1310 may or may not be coupled with the processor.
- the coupling in the embodiment of this application is an indirect coupling or communication connection between electronic devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information interaction between electronic devices, units or modules.
- the processor 1320 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
- the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
- Communication interface 1330 may be a transceiver, circuit, bus, module, or other type of communication interface.
- the bus 1340 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 13, but it does not mean that there is only one bus or one type of bus.
- Embodiments of the present application also provide a computer-readable medium.
- the computer-readable medium stores program code.
- the computer program code When the computer program code is run on a computer, it causes the computer to execute the method embodiments of FIG. 5, FIG. 9 to FIG. 11. step.
- An embodiment of the present application also provides a chip, including: at least one processor and a memory. At least one processor is coupled to the memory and is used to read and execute instructions in the memory to execute the above-mentioned steps of FIG. 5, FIG. 9 to FIG. 11. Steps in method embodiments.
- the disclosed systems, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
- the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
- the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which can be a personal computer, server, or network device, etc.) to execute this application All or part of the steps of the methods described in various embodiments.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请实施例提供了一种显示方法和电子设备。该显示方法包括:响应用户的分屏操作,将电子设备的屏幕分成至少两个窗口,至少两个窗口包括第一窗口和第二窗口,第一窗口运行的第一应用和第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;根据第一应用,确定第一颜色,根据第二应用,确定第二颜色;根据第一颜色,显示第一区域的范围内的状态栏图标,根据第二颜色,显示第二区域的范围内的状态栏图标,第一区域是第一窗口上显示状态栏的区域,第二区域是第二窗口上显示状态栏的区域。通过本申请实施例提供的显示方法和电子设备,能够在多窗口场景中使得电子设备的沉浸式状态栏上的图标清晰可见,提高用户的体验感。
Description
本申请要求于2022年07月20日提交中国专利局、申请号为202210858818.1、申请名称为“显示方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及计算机应用技术领域,更具体地,涉及一种显示方法和电子设备。
随着电子设备的发展,手机、平板电脑、个人计算机、车载显示屏等设备广泛应用于家庭娱乐、办公学校等场景,用户对于使用电子设备进行多任务处理,从而提升处理速度的需求也逐渐提升。
电子设备通过分屏等方式满足消费者多窗口处理的需求,例如将一个应用通过电子设备的不同窗口或者将不同应用通过在电子设备的不同窗口显示,使得用户可以通过一个电子设备同时对多个任务进行处理,提升用户的体验感。
但是在使用一个电子设备通过多窗口处理任务时,状态栏图标的颜色会跟随焦点窗口而设置,使用沉浸式状态栏的窗口可能会存在状态栏图标不清晰的问题。
发明内容
本申请实施例提供一种显示方法和电子设备,能够在多窗口场景中使得沉浸式状态栏清晰显示。
第一方面,提供了一种显示方法,由电子设备执行,包括:响应用户的分屏操作,将所述电子设备的屏幕分成至少两个窗口,所述至少两个窗口包括第一窗口和第二窗口,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;根据所述第一应用,确定第一颜色,根据所述第二应用,确定第二颜色;根据所述第一颜色,显示第一区域的范围内的状态栏图标,根据所述第二颜色,显示第二区域的范围内的状态栏图标,所述第一区域是第一窗口上显示状态栏的区域,所述第二区域是第二窗口上显示状态栏的区域。
在该实施例中,电子设备响应用户的操作将电子设备的屏幕分成至少两个窗口,其中,该至少两个窗口中的第一窗口和第二窗口对应的至少一个应用使用沉浸式状态栏,电子设备根据两个窗口中的应用确定第一颜色和第二颜色,再根据确定的第一颜色和第二颜色显示第一区域的范围内的状态栏图标和第二区域的范围内的状态栏图标,第一区域和第二区域分别为第一窗口和第二窗口上对应状态栏的区域。从而电子设备能够在分屏模式下,根据每个窗口中沉浸式状态栏的显示界面,调整每个窗口中状态栏图标的颜色,使得状态栏图标清晰可见,提高用户体验感。
结合第一方面,在第一方面的某些实现方式中,所述根据所述第一应用,确定第一颜色,包括:根据所述第一应用在第一区域的背景色,确定所述第一颜色,其中所述第一应用在所述第一区域的背景色与所述第一颜色的差值大于第一预设阈值;或者,根据所述第一应用预设的状态栏图标的颜色,确定所述第一颜色;以及,所述根据所述第二应用,确定第二颜色,包括:根据所述第二应用在所述第二区域的背景色,确定所述第二颜色,其中所述第二应用在所述第二区域的背景色与所述第二颜色的差值大于所述第一预设阈值;或者,根据所述第二应用预设的状态栏图标的颜色,确定所述第二颜色。
在该实施例中,电子设备可以根据两个窗口中的应用预设或者根据应用的背景色确定第一颜色和第二颜色。具体的,当第一应用和第二应用都预设了状态栏图标的颜色时,可以根据预设的状态栏图标的颜色确定第一颜色和第二颜色。当第一应用和第二应用都未预设状态栏图标的颜色时,在两个窗口都预设或被电子设备的操作系统强制设定沉浸式状态栏时,可以根据两个窗口的应用在状态栏区域的背景色确定第一颜色和第二颜色;在两个窗口中只有一个窗口的应用预设或被电子设备的操作系统
强制设定沉浸式状态栏时,对于使用沉浸式状态栏的第一窗口,可以根据第一窗口对应的应用在状态栏区域的背景色确定第一颜色,对于未使用沉浸式状态栏的第二窗口,可以由系统确定第二颜色。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;其中,所述根据所述第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据所述第二颜色,显示第二区域的范围内的状态栏图标的颜色,包括:当所述第一灰度或所述第二灰度大于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为白色;当所述第一灰度或所述第二灰度小于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为黑色。
在该实施例中,电子设备在确定第一颜色和第二颜色之后,还会进一步确定第一颜色和第二颜色对应的灰度是否大于第二预设阈值。在第一颜色和第二颜色对应的灰度大于第二预设阈值时,将第一区域和第二区域的状态栏图标的颜色显示为白色;在第一颜色和第二颜色对应的灰度小于第二预设阈值时,将第一区域和第二区域的状态栏图标的颜色显示为黑色。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:确定所述第一区域的范围和所述第二区域的范围。
在该实施例中,电子设备可以根据用户的分屏操作形成的第一窗口和第二窗口,确定第一区域和第二区域的范围,从而便于将状态栏分区域显示,例如可以将第一区域的范围、第二区域的范围、第一区域的范围内的状态栏图标的颜色和第二区域的范围内的状态栏图标的颜色者四个变量存储在四个对应的字段中,并根据四个字段显示状态栏。
结合第一方面,在第一方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
在该实施例中,第一窗口显示的内容和第二窗口显示的内容相关,第二窗口显示的界面是根据用户对第一窗口的界面的操作而产生的,例如第二窗口可以为第一窗口的下一级窗口下级窗口。
结合第一方面,在第一方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第二方面,提供了一种显示方法,由电子设备执行,包括:确定第一颜色和第二颜色是否一致,所述第一颜色与第一窗口的状态栏区域对应,所述第二颜色与第二窗口的状态栏区域对应,所述第一窗口和所述第二窗口是所述电子设备上分屏界面的两个窗口;根据判断结果判断是否确定第一区域的范围和第二区域的范围,所述第一区域是所述第一窗口上显示状态栏的区域,所述第二区域是所述第二窗口上显示状态栏的区域,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中至少一个应用沉浸式状态栏;根据第一颜色和第二颜色显示所述状态栏。
在该实施例中,电子设备会确定与第一窗口上状态栏区域对应的第一颜色和与第二窗口上状态栏区域对应的第二颜色是否一致,并根据判断的结果确定是否确定第一区域的范围第二区域的范围,从而根据第一颜色和第二颜色显示状态栏。
结合第二方面,在第二方面的某些实现方式中,所述根据判断结果判断是否确定第一区域的范围和第二区域的范围,包括:在所述第一颜色和所述第二颜色不一致的情况下,确定所述第一区域的范围和所述第二区域的范围;其中,所述根据第一颜色和第二颜色显示所述状态栏,包括:根据所述第一颜色,将所述第一区域的状态栏图标显示为第一颜色;根据所述第二颜色,将所述第二区域的状态栏图标显示为第二颜色。
在该实施例中,在第一颜色和第二颜色不一致的情况下,电子设备会确定第一区域和第二区域的范围,并根据确定的第一区域的范围和第二区域的范围以及第一颜色和第二颜色,显示第一区域的状态栏图标为第一颜色,显示第二区域的状态栏的图标为第二颜色。
结合第二方面,在第二方面的某些实现方式中,所述根据判断结果判断是否确定第一区域的范围和第二区域的范围,包括:在所述第一颜色和所述第二颜色一致的情况下,不确定第一区域的范围和第二区域的范围。
结合第二方面,在第二方面的某些实现方式中,所述第一应用和/或所述第二应用预设了状态栏图标的颜色,所述方法还包括:获取所述第一应用和/或所述第二应用预设的状态栏图标的颜色;将所述
第一应用预设的状态栏图标的颜色确定为第一颜色,和/或,将所述第二应用预设的状态栏图标的颜色确定为第二颜色。
在该实施例中,第一应用或第二应用分别预设了状态栏图标的颜色,则电子设备可以分别确定第一颜色和第二颜色,电子设备可以获取第一应用或第二应用预设的状态栏图标的颜色,并将其确定为第一颜色和第二颜色。
结合第二方面,在第二方面的某些实现方式中,所述第一应用和/或所述第二应用未预设状态栏图标的颜色,所述方法还包括:获取所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色;根据所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色,确定所述第一颜色和/或所述第二颜色,其中,所述第一应用在第一区域的背景色与所述第一颜色的差值大于第一预设阈值,所述第二应用在第二区域的背景色与所述第二颜色的差值大于第一预设阈值。
在该实施例中,第一应用或第二应用未预设状态栏图标的颜色,电子设备会获取第一应用在第一区域的背景色和第二应用在第二区域的背景色,并根据获取的背景色确定第一颜色和第二颜色,从而显示状态栏。具体的,电子设备可以获取应用设置的应用在第一区域和/或第二区域的背景色的标识,并根据背景色标识,确定第一颜色和/或第二颜色。
结合第二方面,在第二方面的某些实现方式中,所述方法还包括:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;其中,所述根据第一颜色和第二颜色显示所述状态栏,包括:当所述第一灰度或所述第二灰度大于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏图标显示为白色;当所述第一灰度或所述第二灰度小于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏图标显示为黑色。
结合第二方面,在第二方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
结合第二方面,在第二方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第三方面,提供了一种电子设备,包括:一个或多个处理器;存储器,所述存储器中包括指令;当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:响应用户的分屏操作,将所述电子设备的屏幕分成至少两个窗口,所述至少两个窗口包括第一窗口和第二窗口,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;根据所述第一应用,确定第一颜色,根据所述第二应用,确定第二颜色;根据所述第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据所述第二颜色,显示第二区域的范围内的状态栏图标的颜色,所述第一区域是第一窗口上显示状态栏的区域,所述第二区域是第二窗口上显示状态栏的区域。
结合第三方面,在第三方面的某些实现方式中,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:根据所述第一应用在第一区域的背景色,确定所述第一颜色,其中所述第一应用在第一区域的背景色与所述第一颜色的差值大于第一预设阈值;或者,根据所述第一应用预设的状态栏图标的颜色,确定所述第一颜色;以及,根据所述第二应用在第二区域的背景色,确定所述第二颜色,其中所述第二应用在第二区域的背景色与所述第二颜色的差值大于第一预设阈值;或者,根据所述第二应用预设的状态栏图标的颜色,确定所述第二颜色;
结合第三方面,在第三方面的某些实现方式中,所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;当所述第一灰度或所述第二灰度大于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为白色;当所述第一灰度或所述第二灰度小于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为黑色。
结合第三方面,在第三方面的某些实现方式中,所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定所述第一区域的范围和所述第二区域的范围。
结合第三方面,在第三方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
结合第三方面,在第三方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第四方面,提供了一种电子设备,包括:一个或多个处理器;存储器,所述存储器中包括指令;当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定第一颜色和第二颜色是否一致,所述第一颜色与第一窗口的状态栏区域对应,所述第二颜色与第二窗口的状态栏区域对应,所述第一窗口和所述第二窗口是所述电子设备上分屏界面的两个窗口;根据判断结果判断是否确定第一区域的范围和第二区域的范围,所述第一区域是所述第一窗口上显示状态栏的区域,所述第二区域是所述第二窗口上显示状态栏的区域,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中至少一个应用使用沉浸式状态栏;根据第一颜色和第二颜色显示所述状态栏。
结合第四方面,在第四方面的某些实现方式中,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:在所述第一颜色和所述第二颜色不一致的情况下,确定所述第一区域的范围和所述第二区域的范围;根据所述第一颜色,将所述第一区域的状态栏图标显示为第一颜色;根据所述第二颜色,将所述第二区域的状态栏图标显示为第二颜色。
结合第四方面,在第四方面的某些实现方式中,所述第一应用和/或所述第二应用预设了状态栏图标的颜色,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:获取所述第一应用和/或所述第二应用预设的状态栏图标的颜色,将所述第一应用预设的状态栏图标的颜色确定为第一颜色,和/或,将所述第二应用预设的状态栏图标的颜色确定为第二颜色。
结合第四方面,在第四方面的某些实现方式中,所述第一应用和/或所述第二应用未预设状态栏图标的颜色,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:获取所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色;根据所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色,确定所述第一颜色和/或所述第二颜色,其中,所述第一应用在第一区域的背景色与所述第一颜色的差值大于第一预设阈值,所述第二应用在第二区域的背景色与所述第二颜色的差值大于第一预设阈值。
结合第四方面,在第四方面的某些实现方式中,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;当所述第一灰度或所述第二灰度大于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏的图标显示为白色;当所述第一灰度或所述第二灰度大于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏的图标显示为黑色。
结合第四方面,在第四方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
结合第四方面,在第四方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第五方面,提供了一种电子设备,包括:处理单元,用于响应用户的分屏操作,将所述电子设备的屏幕分成至少两个窗口,所述至少两个窗口包括第一窗口和第二窗口,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;确定单元,还用于根据所述第一应用,确定第一颜色,根据所述第二应用,确定第二颜色;显示单元,用于根据所述第一颜色,显示第一区域的范围内的状态栏图标,根据所述第二颜色,显示第二区域的范围内的状态栏图标,所述第一区域是第一窗口上显示状态栏的区域,所述第二区域是第二窗口上显示状态栏的区域。
在该实施例中,电子设备包括处理单元、确定单元和显示单元,处理单元用于响应于用于的分屏操作,将电子设备的屏幕分成至少两个窗口,确定单元用于根据电子设备的第一窗口和第二窗口的应用,确定第一颜色和第二颜色;显示单元用于根据第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据第二颜色,显示第二区域的范围内的状态栏图标的颜色。
结合第五方面,在第五方面的某些实现方式中,所述确定单元,具体用于根据所述第一应用在第一区域的背景色,确定所述第一颜色,其中所述第一应用在第一区域的背景色与所述第一颜色的差值大于第一预设阈值;或者,根据所述第一应用预设的状态栏图标的颜色,确定所述第一颜色;以及,根据所述第二应用在第二区域的背景色,确定所述第二颜色,其中所述第二应用在第二区域的背景色与所述第二颜色的差值大于第一预设阈值;或者,根据所述第二应用预设的状态栏图标的颜色,确定
所述第二颜色。
结合第五方面,在第五方面的某些实现方式中,所述确定单元,还用于:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;其中,所述显示单元,具体用于:当所述第一灰度或所述第二灰度大于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标显示为白色;当所述第一灰度或所述第二灰度小于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标显示为黑色。
结合第五方面,在第五方面的某些实现方式中,所述确定单元,还用于确定所述第一区域的范围和所述第二区域的范围。
结合第五方面,在第五方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
结合第五方面,在第五方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第六方面,提供了一种电子设备,包括:确定单元,用于确定第一颜色和第二颜色是否一致,所述第一颜色与第一窗口对应,所述第二颜色与第二窗口对应,所述第一窗口和所述第二窗口是所述电子设备上分屏界面的两个窗口;所述确定单元,还用于根据确定结果判断是否确定第一区域的范围和第二区域的范围,所述第一区域是所述第一窗口上显示状态栏的区域,所述第二区域是所述第二窗口上显示状态栏的区域,所述第一窗口运行第一应用,所述第二窗口运行第二应用,所述第一应用和所述第二应用中至少一个应用使用沉浸式状态栏;显示单元,用于根据第一颜色和第二颜色显示所述状态栏。
结合第六方面,在第六方面的某些实现方式中,所述确定单元,具体用于:在所述第一颜色和所述第二颜色不一致的情况下,确定所述第一区域的范围和所述第二区域的范围;其中,所述显示单元,具体用于:根据所述第一颜色,将所述第一区域的状态栏图标显示为第一颜色;根据所述第二颜色,将所述第二区域的状态栏图标显示为第二颜色
结合第六方面,在第六方面的某些实现方式中,所述第一应用和/或所述第二应用预设了状态栏图标的颜色,所述电子设备还包括获取单元,用于获取所述第一应用和/或所述第二应用预设的所述第一颜色和/或所述第二颜色;所述确定单元还用于,将所述第一应用预设的状态栏图标的颜色确定为第一颜色,和/或,将所述第二应用预设的状态栏图标的颜色确定为第二颜色。
结合第六方面,在第六方面的某些实现方式中,所述第一应用和/或所述第二应用未预设状态栏图标的颜色,所述获取单元,还用于获取所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色;所述确定单元,还用于根据所述第一应用在所述第一区域的背景色和/或所述第二应用在所述第二区域的背景色,确定所述第一颜色和/或所述第二颜色,其中,所述第一应用在第一区域的背景色与所述第一颜色的差值大于第一预设阈值,所述第二应用在第二区域的背景色与所述第二颜色的差值大于第一预设阈值。
结合第六方面,在第六方面的某些实现方式中,所述确定单元,还用于确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;所述显示单元,具体用于:当所述第一灰度或所述第二灰度大于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏的图标显示为白色;当所述第一灰度或所述第二灰度大于第二预设阈值时,将所述第一区域的状态栏图标或所述第二区域的状态栏的图标显示为黑色。
结合第六方面,在第六方面的某些实现方式中,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
结合第六方面,在第六方面的某些实现方式中,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
第七方面,提供了一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如第一方面或第一方面任意一种实现方式以及第二方面或第二方面任意一种实现方式的显示方法。
第八方面,提供了一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面或第一方面任意一种实现方式以及第二方面或第二方面任意一种实现
方式的显示方法。
图1是本申请实施例的电子设备的结构示意图。
图2是本申请实施例提供的电子设备的软件结构框图。
图3是沉浸式状态栏和非沉浸式状态栏的示意图。
图4是电子设备处于多窗口模式时状态栏的显示情况。
图5是本申请实施例提供的显示方法示意性流程图。
图6是本申请实施例提供的显示方法适用的电子设备处于多窗口模式的场景图。
图7是本申请实施例提供的显示方法中新增变量示意图。
图8是应用本申请实施例提供的显示方法的状态栏显示效果图。
图9示出了本申请实施例提供的显示方法的时序图。
图10是本申请实施例提供的显示方法示意性流程图。
图11是本申请实施例提供的显示方法的场景判断的示意性流程图。
图12是本申请实施例提供的一种电子设备的示意性框图。
图13是本申请实施例提供的另一种电子设备的示意性框图。
下面将结合附图,对本申请实施例中的技术方案进行描述。
需要说明的是,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个,“至少一个”、“一个或多个”是指一个、两个或两个以上。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例提供了一种显示方法,可以应用于电子设备,也可以是单独的应用程序,该应用程序可实现本申请中的应用窗口显示方法。具体地,本申请提供的显示方法可以将以分屏状态显示的窗口切换为以悬浮窗或悬浮图标的状态显示,或者将窗口锁定于屏幕边缘。这样当用户需要再次使用该应用时,用户可以在不中断当前应用任务的情况下,快速地对悬浮窗或悬浮图标或被锁定的窗口进行操作,提升用户体验。
本申请实施例提供的应用窗口显示方法可以应用于手机(例如普通屏幕手机、曲面屏手机、折叠屏手机、全面屏手机等)、平板电脑、车载设备、可穿戴设备(如智能手表、智能手环、智能眼镜、智能首饰等)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、电视、显示器以及其他具有显示功能的电子设备上,本申请实施例对电子设备的具体类型不作任何限制。电子设备的示例性实施例包括但不限于搭载或者其它操作系统的电子设备。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,
电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。电源管理模块141还
可以用于监测电池容量,电池循环次数,电池健康状态等参数。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。
电子设备100通过GPU,显示屏194,及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。其中ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
此外,电子设备100还包括多个传感器。例如,图1中示出的多个传感器,其中,压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消
息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器,电子设备100可以利用磁传感器180D检测翻盖皮套或翻盖的开合。加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管,接近光传感器180G可以检测电子设备附近是否有物体。环境光传感器180L用于感知环境光亮度,电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度、在拍照时自动调节白平衡等。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。骨传导传感器180M可以获取振动信号。触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
电子设备上的按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。
以上介绍了电子设备100可能的硬件结构示意图。电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备100的软件结构框图。分层架构将电子设备的软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序(application,APP)层,应用程序框架(framework)层,系统运行库层(包括系统库和安卓运行时(Android runtime)),以及内核层。
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。应用程序主要是用户界面(user interface,UI)方面的,通常使用JAVA语言调用应用程序框架层的接口编写。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。示例性的,窗口管理器可以获取电子设备100上待显示窗口的大小,判断该待显示窗口的内容等。应理解,电子设备100的待显示窗口可以包括电子设备100的界面上正在显示的窗口,还可以包括电子设备100后台运行的一个或多个应用程序的窗口。
窗口管理器是一个服务(service),它是全局的、系统中唯一的、独立于安卓(Android)应用程序的单独的服务,窗口管理器被所有Android应用程序公用。Android的窗口管理系统是基于客户端/服务端(client/service,C/S)模式的,整个窗口系统分为服务端(service)和客户端(client)两大部分。客户端即应用程序,负责请求创建窗口和使用窗口;服务端即窗口管理服务(window manager service或WindowManagerService,WMS),负责完成窗口的维护、窗口显示等。客户端并不是直接和窗口管理服务交互,而是直接和本地对象窗口管理(window manager或WindowManager)交互,然后由窗口管理(WindowManager)完成和窗口管理服务(WindowManagerService)的交互。对于应用来说这个交互是透明的,应用不能感知到窗口管理服务的存在。
窗口可以理解为屏幕上的一块矩形区域,在窗口中显示用户界面(user interface,UI)用于与用户交互。在一些实施例中,窗口也可以将用户界面(即软件的操作界面)隐藏起来,在用户需要操作时再快速为用户展现应用导航和功能操作,或者根据触发的指令再度展开应用的操作界面。从系统的角度看,窗口其实是一个画布(surface)。一个屏幕可以有多个窗口,而这多个窗口的布局和顺序以及窗口动画是由窗口管理服务WMS管理的,多个画布内容混合和显示则是由SurfaceFlinger服务实现的。窗口是分层的,层级大的会覆盖在层级小的窗口上面。
系统运行库层(libraries)可以分成两部分,分别是系统库和Android运行时。
安卓运行时(Android runtime)即Android运行环境,包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库是应用程序框架的支撑,是连接应用程序框架层与内核层的重要纽带,可包括多个功能模块,如表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:面向嵌入式系统的开放式图形库(open graphics library for embedded systems,OpenGL ES)),2D图形引擎(例如:Skia数据库(skia graphics library,SGL))等。
内核层是硬件和软件之间的层,用于提供操作系统的本质功能例如文件管理、内存管理、进程管理、网络协议栈等。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动、蓝牙驱动等。
为方便理解,本申请以下实施例将以具有图1和图2所示结构的电子设备为例,结合附图和应用场景,对本申请实施例提供的显示方法进行具体阐述。
随着电子设备技术的不断发展,电子设备例如手机、平板电脑等的屏幕尺寸越来越大,电子设备上安装的应用(application,App)也越来越多。为了满足用户的个性化需求,越来越多的电子设备支持多窗口模式(也叫多屏模式或分屏功能),即在一个屏幕上能够同时运行并显示多个应用程序。电子设备的多窗口模式打开以后,用户可以将电子设备的屏幕进行分屏。以将电子设备的屏幕分成两个窗口为例,在一些实施例中,每个窗口中独立运行一个应用程序,两个窗口中的应用程序互不影响。在另一些实施例中,两个窗口运行同一个应用程序。此时两个窗口中的该应用程序的界面可以互不影响,即两个窗口中显示的界面可以为同一个界面或者不同的界面;或者两个窗口中也可以显示该应用程序的不同界面,其中一个窗口显示的内容可以由用户在另一个窗口的操作而生成,即两个窗口显示的内容有一定的关系。在另一些实施例中,电子设备还可以处于与其他电子设备多屏协同的工作模式下,即电子设备的两个窗口显示在其他电子设备的屏幕上。在另一些实施例中,电子设备可以通过应用程序实现多窗口模式。
电子设备一般会在顶部设置状态栏,状态栏中一般会显示电量、时间、信号质量等图标。为了给用户提供更好的体验,系统会提供沉浸模式状态栏,即将每个窗口的应用扩展到整个电子设备的屏幕上,从而用户使用应用时不会被系统的状态栏打扰。图3的(a)和(b)示出了分别示出了沉浸式状态栏和非沉浸式状态栏的示例。图3的(a)是沉浸式状态栏的示例,状态栏区域的背景色与应用一致,有较好的用户体验,应用能够根据界面风格设置状态栏图标的颜色,使得应用界面与系统界面统一。图3的(b)中,状态栏区域的颜色是黑色,应用的风格颜色为灰色,应用与状态栏的风格差异较大。在设置沉浸式状态栏时,状态栏层的背景色会通过标识FLAG_TRANSLUCENT_STATUS被设置为透明,而窗口上应用的界面会延伸到状态栏的区域,状态栏区域的会显示出窗口界面上应用的颜色,使得整个窗口上的风格一致,而状态栏上的图标则会根据状态栏区域的背景色对应设置。一般情况下,状态栏图标的颜色与状态栏区域的背景色会具有较大的色差,使得状态栏图标清晰可见。
应理解,在本申请实施例中,状态栏区域的背景色或状态栏区域的颜色是用户使用电子设备时能直接看到的窗口上对应状态栏区域的背景色,而状态栏层的背景色是电子设备系统上分层的窗口中状态栏层的颜色。在一些情况下,状态栏区域的背景色即为状态栏层的背景色,例如窗口上的应用不使用沉浸式状态栏,且状态栏区域没有被其他悬浮窗口等遮盖时,由于状态栏层位于应用界面的上层显示,状态栏区域的背景色为状态栏层的颜色;在另一些情况下,状态栏区域的背景色不是状态栏层的背景色,例如,窗口上的应用使用沉浸式状态栏,此时,上层的状态栏层背景色为透明,则应用界面
延伸至状态栏区域显示,状态栏区域的背景色实际上为状态栏下一层的应用的背景色。
在电子设备处于多窗口模式的情况下,多个窗口显示的内容一般不同。以两个窗口为例,如果两个窗口中存在使用沉浸式状态栏的窗口,那么使用沉浸式状态栏的窗口中的状态栏图标的颜色会跟随焦点窗口的应用而设置,焦点窗口是用户当前点击或者操作的窗口。当两个窗口中对应状态栏区域的背景色不同时,可能会引起使用沉浸式状态栏的窗口中的状态栏图标不清晰。例如,图4示出了电子设备处于双窗口模式下状态栏的显示情况。如图4的(a)和(b)所示,电子设备的屏幕界面包括第一窗口401和第二窗口402,窗口401的状态栏区域的背景色为深色,而窗口402状态栏区域的背景色为浅色。
当焦点窗口为窗口402时,如图4的(a)所示,状态栏上的图标会依据窗口402设置,由于窗口402状态栏区域404的背景色为浅色,图标的颜色会设置成黑色,因此包括窗口401的状态栏区域403里的图标的颜色跟随窗口402的状态栏区域404的图标的颜色设置为黑色,窗口401的状态栏区域403上显示的电子设备的两个SIM卡的信号强度图标、无线网图标和电池电量图标以及窗口402的状态栏区域404显示的时间图标都被电子设备的操作系统设置为黑色。在这种情况下,窗口401的状态栏图标能够与该窗口401对应的状态栏区域401的背景有一定的色差,图标可以辨识。
但是当焦点窗口为窗口401时,如图4的(b)所示,窗口402的状态栏区域405的图标会跟随窗口401的状态栏区域406的图标的颜色设置为白色,窗口401的状态栏区域405上显示的电子设备的两个SIM卡的信号强度图标、无线网图标和电池电量图标以及窗口402的状态栏区域406显示的时间图标都被电子设备的操作系统设置为白色。此时,对于窗口402上的状态栏区域406的时间图标,由于与状态栏区域406的背景色一致,无法清晰显示。
图5示出了本申请实施例提供的一种显示方法。
S502,响应用户的分屏操作,将电子设备的屏幕分成至少两个窗口,至少两个窗口包括第一窗口和第二窗口,第一窗口运行的第一应用和第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏。
在S502中,电子设备会响应用户的分屏操作,将电子设备的屏幕分成至少两个窗口,以电子设备被分成两个窗口为例,电子设备处于双窗口模式。
在一些实施例中,两个窗口中的界面可以独立显示。第一应用和第二应用可以不是同一个应用,例如,要一边进行视频播放,一边进行会话聊天,并且在聊天过程中不会遮挡视频的播放,则用户可以执行分屏操作。响应于用户的分屏操作,电子设备进入分屏界面。此时电子设备的屏幕被分为两个窗口,两个窗口分别独立运行两个应用程序,且用户可以分别对两个窗口中显示的应用程序界面进行独立操作。如图6的(a)所示,电子设备的屏幕响应于用户的操作分成第一窗口601和第二窗口602,第一窗口601可以用于用户与小王进行会话,用户可以用第二窗口602播放视频,且用户对于第一窗口601和第二窗口602的操作相互独立,不会互相影响。再如,第一应用和第二应用可以不是两个独立的应用,而是同一个应用的独立界面,例如用户想要使用同一个应用同时与两个人建立会话,且不希望频繁的进行会话界面的退出与进入从而切换两个会话界面。如图6的(b)所示,用户想要使用一个应用同时与小王和小李建立会话,则可以将电子设备的屏幕分成第一窗口603和第二窗口604,用户可以使用第一窗口603与小王进行会话,使用第二窗口604与小李进行会话,第一窗口603和第二窗口604中是同一个应用的不同界面,且两个窗口的界面互相独立。
在另一些实施例中,第一应用和第二应用是同一个应用,第二窗口显示的界面是根据用户对第一窗口的界面的操作而产生的。也就是说,两个窗口界面显示的是同一个应用的不同界面,且第二窗口是根据用户对第一窗口的操作而显示的。例如图6的(c)中,用户打开会话应用,第一窗口605会显示用户的会话列表,用户可以的会话列表中有小王、小张、小李和一家人,用户选择会话“小李”,则第二窗口606会显示用户与“小李”会话的具体内容。用户还可以在第一窗口605选择其他会话,则第二窗口606也会对应出现用户的其他会话。即第二窗口606显示的内容是根据用户对第一窗口605的操作显示的下一级窗口。应理解,本申请中只用会话应用示意性说明了多窗口状态下,第二窗口是根据用户对第一窗口的操作而显示的实例,在其他场景中也适用。例如,购物APP中,第一窗口为商品列表,第二窗口是根据用户点击列表中某一商品之后显示的商品详情。
在上述场景中,电子设备两个窗口均位于该电子设备的显示屏上。在另一些场景中,电子设备可
以处于多屏协同模式,即电子设备的窗口显示在其他电子设备上。例如,如图6的(d)所示,手机的屏幕界面显示在笔记本电脑的界面上,且手机的屏幕界面上包括第一窗口607和第二窗口608,用户可以在电脑的显示屏上操作手机上显示的界面。
本申请实施例提供的显示方法也可以应用于电子设备的应用上,例如笔记本电脑上使用安卓模拟器显示分屏界面,安卓模拟器上显示的分屏界面上包括第一窗口和第二窗口。
电子设备被分成至少两个窗口之后,电子设备会判断两个窗口的应用是否使用沉浸式状态栏。
在一些实施例中,应用默认使用沉浸模式,电子设备在应用打开后能够获取到应用设置其界面的状态栏层的背景色为透明。具体的,应用具有STATUS_BAR_TRANSPARENT标识,电子设备的操作系统确定用户进行分屏操作后存在两个窗口,且两个窗口中的一个应用的界面或者两个应用的界面状态栏层的背景色都被应用通过该标识设置为透明。
在另一些实施例中,用户分屏的两个窗口上第一应用和第二应用未预设沉浸式状态栏,则电子设备可以为应用的两个界面设置沉浸式状态栏,从而使得应用在电子设备上的界面用户体验感更好。具体的,电子设备的操作系统可以添加STATUS_BAR_TRANSPARENT标识,将状态栏层的背景色设置为透明,使得状态栏区域的颜色跟随应用背景变化,完成沉浸式状态栏的设置。
在另一些实施例中,用户分屏的两个窗口中的第一窗口中的第一应用预设了沉浸式状态栏,第二窗口的第二应用未设置沉浸式状态栏,则电子设备可以为了第二应用显示界面更加舒适,为第二应用设置沉浸式状态栏;也可以跟随第二应用的设置,不为第二应用设置沉浸式状态栏。
在S502之后,电子设备的两个窗口中至少一个窗口对应的应用预设了沉浸式状态栏或者由电子设备的系统为该窗口对应的应用设置了沉浸式状态栏。
在本申请实施例中,电子设备还会确定第一区域的范围和第二区域的范围。
具体的,例如可以分别将第一区域和第二区域的范围存储在对应的变量中。例如,可以将第一区域和第二区域的范围分别存储在变量stackbounds_1(x1,y1,height1,width1)、stackbounds_2(x2,y2,height2,width2)中,其中(x,y)为区域顶点的坐标,(height,width)为区域的高度和宽度。如图7所示,电子设备上有第一窗口和第二窗口,其中第一窗口对应状态栏的第一区域以及第二窗口对应状态栏的第二区域已经在图7中示意。对于第一区域,可以用其左上角的O点作为参照,stackbounds_1=(0,0,h,w1),对于第二区域,可以用其左上角的A点作为参照,stackbounds_2=(0,0,h,w2)。
S504,根据第一应用,确定第一颜色;根据第二应用,确定第二颜色。
S506,根据第一颜色,显示第一区域的范围内的状态栏图标,根据第二颜色,显示第二区域的范围内的状态栏图标,第一区域是第一窗口上显示状态栏的区域,第二区域是第二窗口上显示状态栏的区域。
电子设备可以将第一颜色确定为第一区域内的状态栏图标的颜色,将第二颜色确定为第二区域内的状态栏图标的颜色。从而根据第一颜色和第二颜色,显示第一区域内的状态栏图标和第二区域内的状态栏图标。
在本申请实施例中,根据第一应用,确定第一颜色,包括:根据第一应用在第一区域的背景色,确定第一颜色,其中第一应用在第一区域的背景色与第一颜色的差值大于第一预设阈值;或者,根据第一应用预设的状态栏图标的颜色,确定第一颜色;以及,根据第二应用,确定第二颜色,包括:根据第二应用在第二区域的背景色,确定第二颜色,其中第二应用在第二区域的背景色与第二颜色的差值大于第一预设阈值;或者,根据第二应用预设的状态栏图标的颜色,确定第二颜色。
也就是说,电子设备可以根据应用的预设或者自行设置第一窗口和第二窗口对应的状态栏图标的颜色。针对电子设备的两个窗口对应的应用都预设了沉浸式状态栏或者都由电子设备设置了沉浸式状态栏,电子设备可以通过以下几种方式确定第一颜色和第二颜色:
方法1,第一应用和第二应用已经预设了状态栏图标的颜色。则电子设备根据第一应用预设的状态栏图标的颜色,确定第一颜色;根据第二应用预设的状态栏图标的颜色,确定第二颜色。例如,在安卓系统中,电子设备可以通过标识:SYSTEM_UI_FLAG_LIGHT_STATUS_BAR获取应用使用浅色状态栏,这意味着应用预设的状态栏图标的颜色为黑色,如果没有此标识,则说明应用使用深色状态栏,预设的图标的颜色为白色。深色和浅色可以是状态栏区域的背景色对应的灰度值,灰度值大于预设阈
值时,为浅色,灰度值小于预设阈值时,为深色,灰度的具体计算方式参见后文的说明。或者,电子设备可以通过不同的标识获取应用预设的不同状态栏颜色,例如针对不同的状态栏图标的颜色,应用预设对应的颜色标识,颜色标识不限于对应黑色和白色图标,还可以对应其他颜色图标,电子设备可以分别根据应用设置的状态栏图标的颜色标识,确定第一颜色和第二颜色。
方法2,第一应用和第二应用未预设状态栏图标的颜色。则电子设备根据第一应用在第一区域的背景色,确定第一颜色,其中第一应用在第一区域的背景色与第一颜色差值大于第一预设阈值;根据第二应用在第二区域的背景色,确定第二颜色,其中第二应用在第二区域的背景色与第二颜色差值大于第二预设阈值。
电子设备可以两种方式获取第一应用在第一区域的背景色和第二应用在第二区域的背景色。
例如,电子设备可以通过第一应用和第二应用的背景色标识,获取第一应用在第一区域的背景色和第二应用在第二区域的背景色。示例性的,针对安卓系统,电子设备可以获取第一窗口对应的decorView中最上层view对应的背景色,背景色可以存储在应用activity的资源文件中的background字段中。如果最上层view未设置背景色或设置透明背景色,则继续获取下一层view的背景色,最终可以获取第一应用在第一区域的背景色和第二应用在第二区域的背景色。针对其他操作系统,可以有其他不同的背景色标识以及获取方式,本申请实施例不再赘述。
再如,电子设备可以通过直接采集第一区域和第二区域的多个像素点的颜色获取第一应用在第一区域的背景色和第二应用在第二区域的背景色。其中,采集的第一区域和第二区域的多个像素点可以平均分布在第一区域和第二区域。采集的第一区域和第二区域的多个像素点也可以不是均匀分布在第一区域和第二区域的,例如,仅在靠近第一区域和第二区域内状态栏图标显示的位置附近采集更多的像素点,从而获取第一区域和第二区域的背景色。单个像素点的颜色可以通过该像素点的R、G、B值计算,其中R、G、B为该像素点的红色、绿色和蓝色的值。示例性的,其像素值可以通过R、G、B的值的加权平均数等方式计算,单个像素点的颜色Y=h1*R+h2*G+h3*B,h1、h2和h3为权重。例如h1、h2和h3可以为同样的值,则像素点的颜色为RGB的算数平均数;或者h1、h2和h3可以为不同的值,该值可以根据需要或者经验设置。第一区域和第二区域的背景色可以通过对第一区域或第二区域的多个像素点的颜色再进行加权或算数平均数计算。或者,第一区域和第二区域的多个像素点的颜色可以直接通过对该多个像素点的R、G、B值通过计算加权平均数或算数平均数获得。
获取到第一区域和第二区域的背景色之后,电子设备可以根据第一区域的背景色和第二区域的背景色,确定第一颜色和第二颜色。以确定第一应用对应的第一颜色为例,具体的,例如,电子设备可以确定背景色对应的原色R、G、B值,从而可以根据背景色的R、G、B值确定第一颜色,第一颜色对应的R值、G值、B值都与背景色对应的R值、G值、B值的差值大于第一预设阈值或者第一颜色对应的R值、G值、B值之一与背景色对应的R值、G值、B值之一的差值大于第一预设阈值,其中R、G、B为背景色的红色、绿色和蓝色的值。
在一些实施例中,例如第一颜色和背景色可以为互补色,背景色为红色时,可以将第一颜色设置为绿色,并将第一颜色设置为状态栏图标的颜色。
或者电子设备可以直接对背景色取反确定第一颜色。例如,可以通过将背景色对应的R值、G值、B值减255,获取第一颜色。或者电子设备可以通过背景色的R、G、B值确定背景色对应的YUV值,例如Y=0.299R+0.587G+0.114B,电子设备可以使得第一颜色对应的Y值与背景色对应的Y值大于第一预设阈值。或者电子设备可以计算背景色对应的R值、G值、B值对应的加权值,并设置第一颜色的R值、G值、B值的加权值与背景色R值、G值、B值加权值大于第一预设阈值。
方法3,第一应用和第二应用之一预设了状态栏图标的颜色,以第一应用预设了状态栏图标的颜色为例。电子设备可以将第一应用预设的图标的颜色确定为第一颜色,根据第二应用在第二区域的背景色确定第二颜色(具体确定方式参见前文说明)。
针对两个窗口之中只有一个窗口的应用使用沉浸式状态栏的场景,例如第一窗口的应用使用沉浸式状态栏,第二窗口的应用不使用沉浸式状态栏。对于第一窗口,可以按照前文对于沉浸式状态栏的背景色以及图标的颜色确定方式,确定第一颜色。
对于第二窗口如果第二窗口的应用预设了状态栏的图标的颜色,可以直接将预设的图标的颜色确定为第二颜色。例如,电子设备的操作系统通过调用getWindow().getDecorView().setSystemUiVisibility()
方法,获取到应用具有View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR标识,则可以确定第二应用预设的状态栏背景色为浅色,从而确定第二应用预设的状态栏图标颜色为深色,即第一颜色为浅色,第二颜色为深色,在具体场景中,例如,浅色为白色,深色为黑色。
如果第二窗口的应用未预设状态栏的图标的颜色,则在一种实施例中,可以由电子设备通过getWindow().setStatusBarColor()方法获取到对应的颜色标识,并将颜色标识对应的颜色确定为第一颜色,电子设备可以按照前文对于沉浸式状态栏类似的方式确定第二颜色;或者可以由电子设备的操作系统选择对应的颜色组合,例如状态栏背景色为黑色,而状态栏图标的颜色为白色。
在电子设备获取到第一颜色和第二颜色之后,可以直接将第一颜色和第二颜色确定为第一区域和第二区域的状态栏图标的颜色,即根据第一颜色和第二颜色,显示第一区域的范围内的状态栏图标和第二区域的范围内的状态栏图标。
在本申请实施例中,电子设备还可以确定第一颜色对应的第一灰度和第二颜色对应的第二灰度是否大于第二预设阈值;其中,根据第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据第二颜色,显示第二区域的范围内的状态栏图标的颜色,包括:当第一灰度或第二灰度大于第二预设阈值时,将第一区域的状态栏图标或第二区域的状态栏图标的颜色显示白色;当第一灰度或第二灰度大于第二预设阈值时,将第一区域的状态栏图标或第二区域的状态栏图标的颜色显示为黑色。
例如,电子设备可以在获得第一颜色和第二颜色后,将第一颜色和第二颜色对应的RGB值换算成YUV值,Y表示灰度,U和V表示色度,Y=0.299R+0.587G+0.114B,当Y大于192时,将第一区域或第二区域的状态栏图标显示为白色;当Y小于192时,将第一区域或第二区域的状态栏图标显示为黑色。上述Y的计算公式以及黑色和白色图标显示门限192只是示意性给出,在不同的标准下,可能使用不同的计算公式计算对应的灰度值。
在本申请实施例中,电子设备会根据第一区域的范围、第二区域的范围、第一区域的范围内的状态栏图标的颜色和第二区域的范围内的状态栏图标的颜色,显示电子设备的状态栏。
具体的,电子设备确定的第一区域的范围内的状态栏图标的颜色可以为第一颜色或者根据第一颜色进一步确定的黑色或白色,第二区域的范围内的状态栏图标的颜色可以为第二颜色或者根据第二颜色进一步确定的黑色或白色。之后可以将第一区域的范围内的状态栏图标的颜色存储在变量visibility_1中;将第二区域的范围内的状态栏图标的颜色存储在变量visibility_2中,再根据第一区域的范围stackbounds_1和第二区域的范围stackbounds_2将状态栏分为两部分,将stackbounds_1存储的第一区域的范围内的状态栏图标的颜色设置为变量visibility_1中的颜色,将stackbounds_2存储的第二区域的范围内的状态栏图标的颜色设置为变量visibility_2中的颜色,从而根据四个变量的取值显示状态栏图标。通过将状态栏图标分区域设置对应的颜色,可以使得电子设备上分屏界面上的多个窗口都能够根据当前窗口的显示情况,设置状态栏图标的颜色,使得整个状态栏区域的状态栏图标都能够清晰可见,提升用户体验感。
在本申请实施例中,电子设备可以使用安卓系统、Linux系统,windows系统等。
图8示出了采用本申请实施例的技术方案时状态栏的显示情况。在图8中,电子设备的屏幕被分为第一窗口801和第二窗口802,第一区域803(白色虚线框示意)对应的背景色为黑色,第二区域804对应的背景色为白色,则可以使得图标的颜色和区域的颜色均值互补,即将第一区域的状态栏图标设置为白色,将第二区域的状态栏图标设置为黑色,从而每个窗口上的状态栏图标都能够清晰可见。
图9示出了本申请实施例提供的显示方法时序图,包括以下步骤:
S901,布局窗口。
在S901中,由于电子设备的窗口属性发生变化,例如可见性或者窗口大小发生变化时,需要对窗口重新布局。在本申请实施例中,电子设备的窗口大小发生变化是由于用户进行分屏操作而产生的,从而电子设备的操作系统接收用户的分屏操作,调用窗口管理服务(WindowManagerService,WMS)中的布局窗口方法(relayoutWindow)开始布局窗口。
S902,刷新界面。
在S902中,窗口管理服务调用窗口根容器(RootWindowContainer)中的刷新界面方法(performSurfacePlacement)进行电子设备的界面刷新,循环刷新子窗口的大小和位置,并计算子窗口的大小。对应于本申请实施例,在该步骤中,电子设备刷新第一窗口和第二窗口的大小和位置,并计
算第一窗口和第二窗口的大小。
S903,应用界面变化处理。
在S903中,RootWindowContainer调用显示内容(DisplayContent)中的应用界面变化处理方法(applySurfaceChangesTransaction)完成窗口动画,窗口动画主要可以包括通过分屏操作产生的窗口切换或进入的动画。
S904,控制状态栏图标显示和隐藏。
在S904中,DisplayContent调用显示策略(DisplayPolicy)中的布局后显示方法(finishPostLayoutPolicyLw)控制状态栏图标显示和隐藏以及具体显示的图标。
S905,更新系统UI显示。
在S905中,DisplayPolicy调用状态栏(StatusBar)中的更新系统UI显示方法(onSystemUiVisivilityChanged)中的更新系统UI(POLICY_UPDATE_SYSUIVISIBILITY)接口将visibility_1,visibility_2,stackbounds_1和stackbounds_2的值传递给StatusBar,在状态栏中划分出stackbounds_1和stackbounds_2区域,并根据visibility_1,visibility_2设置对应区域的颜色,从而能够更新状态栏。
S906,更新状态栏。
在S906中,StatusBar调用状态栏控制(LightBarController)中的更新状态栏方法(updateStatus)更新状态栏。
以两个窗口为例,图10示出了本申请实施例提供的显示方法的示意性流程图。
S1010,电子设备场景匹配。
在S1010中,电子设备会对窗口数量和是否采用沉浸式状态栏进行判断。如图11所示,场景匹配过程如图11所示,包括以下步骤:
S1110,确定电子设备是否存在两个窗口。
如果电子设备只有一个窗口,则只需按照S1115的步骤保持第一窗口状态栏设置即可,无需采用本申请的技术方案设置状态栏的颜色。
S1120,确定第一窗口是否使用沉浸式状态栏。
在S1120中,电子设备如果确定第一窗口的应用设备已经使用沉浸式状态栏,则可以继续进行对第二窗口场景的匹配。如果第一窗口的应用未使用沉浸式状态栏,可以根据用户对电子设备的预先设置,为一窗口设置沉浸式状态栏。
S1130,确定电子设备是否存在两个窗口。
在S1130步骤进行之前,电子设备已经对电子设备的双窗口场景进行了初步判断,并确定第一窗口使用了沉浸式状态栏或者为第一窗口设置了沉浸式状态栏。电子设备此时仍然要判断是否存在两个窗口,防止在进行接下来的场景匹配之前,两个窗口中的其中一个被用户关闭。
S1140,确定第二窗口是否使用沉浸式状态栏。
在S1140中,电子设备判断第二窗口是否使用沉浸式状态栏,如果未使用,可以依据用户的预先设置或电子设备的设置,为第二窗口的应用设置沉浸式状态栏。
S1150,按照S1020至S1050的步骤更新状态栏。
电子设备场景匹配完成,可以按照后续的步骤更新状态栏。图11所示的场景匹配的过程中,电子设备会确定存在两个窗口,且会根据两个窗口的预设或者由电子设备设置使得两个窗口都使用沉浸式状态栏。如前文描述,本申请实施例采用的技术方案可以用于只有一个窗口使用沉浸式状态栏的场景,详细内容前文已经介绍,在此不再赘述。
S1020,确定两个窗口的应用是否都预设了状态栏图标的颜色。
在S1020中,一些应用为了界面美观,会预设状态栏图标的颜色,而一些应用不会预设状态栏图标的颜色,在该步骤中电子设备需要进行判断两个窗口的应用是否都预设了状态栏图标的颜色。
S1022,在确定两个窗口的应用不是都预设了状态栏图标的颜色的情况下,确定未预设状态栏图标的颜色的窗口的状态栏图标的颜色。
在S1022中,可能两个窗口的应用中的一个应用或两个应用未预设状态栏图标的颜色,则电子设备可以根据该一个应用或两个应用的背景色,确定其状态栏图标的颜色。
S1030,确定两个窗口对应的状态栏图标的颜色是否一致。
在S1030中,两个窗口对应的状态栏图标的颜色可能都是应用预设的;或者一个窗口对应的状态栏图标的颜色是预设的,另一个窗口对应的状态栏图标的颜色是电子设备根据应用的背景确定的;或者两个窗口对应的状态栏图标的颜色都是电子设备根据应用的背景确定的。电子设备会确定两个窗口对应的状态栏图标的颜色是否一致。
S1034,在确定两个窗口对应的状态栏图标的颜色一致的情况下,根据状态栏图标的颜色更新状态栏。
由于状态栏图标的颜色一致,所以在更新状态栏之前增加该判断过程,可以无需将状态栏分为两个区域分别设置状态栏图标的颜色,直接为整个状态栏图标设置一样的颜色即可。
S1040,在确定两个窗口对应的状态栏图标的颜色不一致的情况下,获取两个窗口对应的状态栏区域的范围。
当对于S1030的判断,电子设备确定两个窗口预设的状态栏图标的颜色不一致时,可以获取两个窗口对应的状态栏区域范围,具体的,可以根据两个窗口的显示情况,将状态栏分成两个区域。
S1050,根据区域的范围以及状态栏图标的颜色更新状态栏。
在S1050中,由于两个窗口对应的状态栏图标的颜色不一致,电子设备需要获取两个窗口对应的状态栏区域的范围,并根据区域范围分别为其设置状态栏图标的颜色。具体的,可以增加描述第一区域的范围内的状态栏图标的颜色的变量visibility_1,描述第二区域的范围内的状态栏图标的颜色的变量visibility_2,以及第一区域的范围变量stackbounds_1和第二区域的范围变量stackbounds_2,并根据者四个变量的值显示状态栏。
图10所示的技术方案中,在第一颜色和第二颜色一致时,不将状态栏按照对应的窗口分区域显示对应的状态栏图标,可以减少此情况下,分区域显示状态栏带来的处理开销。在具体场景下,也可以采用图5的实施例的方式,即不考虑图标颜色是否一致,直接分区域显示状态栏图标。
应理解,本申请实施例仅以电子设备的显示屏幕上包括两个窗口为例介绍本申请实施例的技术方案,但是,当电子设备包括更多的窗口时,例如三个窗口,四个窗口等,本申请实施例的方案也能够按照窗口与状态栏的关系,将对应不同窗口的状态栏区域按照应用的界面设置状态栏图标的颜色,例如,可以为多个窗口中的每个窗口设置存储窗口对应状态栏区域范围的变量以及状态栏图标的颜色的变量,最终可以根据每个窗口的应用预设或者由电子设备确定,将状态栏上的图标分区域显示颜色,从而使得整个屏幕上的状态栏图标都能够清晰显示。
图12示出了本申请实施例提供的一种电子设备1200,该电子设备1200包括确定单元1210,电子设备还可以包括显示单元1220,确定单元1210和显示单元1220可以实现相应的通信功能。
该电子设备1200可以包括用于执行图5、图9至图11的方法的单元。并且,该电子设备1200中的各单元和上述其他操作和/或功能分别为了实现图5、图9至图11的方法实施例的相应流程。
具体的,该电子设备1200包括:处理单元1210,用于响应用户的分屏操作,将电子设备的屏幕分成至少两个窗口,至少两个窗口包括第一窗口和第二窗口,第一窗口运行的第一应用和第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;确定单元1220,还用于根据第一应用,确定第一颜色,根据第二应用,确定第二颜色;显示单元1230,用于根据第一颜色,显示第一区域的范围内的状态栏图标,根据第二颜色,显示第二区域的范围内的状态栏图标,第一区域是第一窗口上显示状态栏的区域,第二区域是第二窗口上显示状态栏的区域。
在本申请实施例中,确定单元1220,具体用于根据第一应用在第一区域的背景色,确定第一颜色,其中第一应用在第一区域的背景色与第一颜色的差值大于第一预设阈值;或者,根据第一应用预设的状态栏图标的颜色,确定第一颜色;以及,根据第二应用在第二区域的背景色,确定第二颜色,其中第二应用在第二区域的背景色与第二颜色的差值大于第一预设阈值;或者,根据第二应用预设的状态栏图标的颜色,确定第二颜色。
在本申请实施例中,确定单元1220,还用于:确定第一颜色对应的第一灰度和第二颜色对应的第二灰度是否大于第二预设阈值;其中,显示单元1230,具体用于:当第一灰度或第二灰度大于第二预设阈值时,将第一区域范围内的状态栏图标或第二区域范围内的状态栏图标的颜色显示为白色;当第一灰度或第二灰度小于第二预设阈值时,将第一区域范围内的状态栏图标或第二区域范围内的状态栏
图标的颜色显示为黑色。
在本申请实施例中,确定单元1220,还用于确定第一区域的范围和第二区域的范围。
在本申请实施例中,第一应用和第二应用是同一个应用,第二窗口显示的界面是根据用户对第一窗口的界面的操作而产生的。
在本申请实施例中,电子设备1200的操作系统可以为安卓系统、Windows系统和Linux系统中任一项。
图13示出了本申请实施例提供的另一种电子设备1300。电子设备1300包括:处理器1320。在本申请的实施例中,处理器1320用于实现相应的控制管理操作,例如,处理器1320用于支持电子设备1300执行前述实施例的方法或操作或功能。可选的,电子设备1300还可以包括:存储器1310和通信接口1330;处理器1320、通信接口1330以及存储器1310可以相互连接或者通过总线1340相互连接。其中,通信接口1330用于支持该电子设备1300与其他设备等进行通信,存储器1310用于存储电子设备1300的程序代码和数据。处理器1320调用存储器1310中存储的代码或者数据实现相应的操作。该存储器1310可以跟处理器耦合在一起,也可以不耦合在一起。本申请实施例中的耦合是电子设备、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于电子设备、单元或模块之间的信息交互。
其中,处理器1320可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。通信接口1330可以是收发器、电路、总线、模块或其它类型的通信接口。总线1340可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本申请实施例还提供一种计算机可读介质,计算机可读介质存储有程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述图5、图9至图11的方法实施例中的步骤。
本申请实施例还提供一种芯片,包括:至少一个处理器和存储器,至少一个处理器与存储器耦合,用于读取并执行存储器中的指令,以执行上述图5、图9至图11的方法实施例中的步骤。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请
各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (14)
- 一种显示方法,应用于电子设备,其特征在于,包括:响应用户的分屏操作,将所述电子设备的屏幕分成至少两个窗口,所述至少两个窗口包括第一窗口和第二窗口,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;根据所述第一应用,确定第一颜色,根据所述第二应用,确定第二颜色;根据所述第一颜色,显示第一区域的范围内的状态栏图标,根据所述第二颜色,显示第二区域的范围内的状态栏图标,所述第一区域是所述第一窗口上显示状态栏的区域,所述第二区域是所述第二窗口上显示状态栏的区域。
- 根据权利要求1所述的方法,其特征在于,所述根据所述第一应用,确定第一颜色,包括:根据所述第一应用在所述第一区域的背景色,确定所述第一颜色,其中所述第一应用在所述第一区域的背景色与所述第一颜色的差值大于第一预设阈值;或者,根据所述第一应用预设的状态栏图标的颜色,确定所述第一颜色;以及,所述根据所述第二应用,确定第二颜色,包括:根据所述第二应用在所述第二区域的背景色,确定所述第二颜色,其中所述第二应用在所述第二区域的背景色与所述第二颜色的差值大于所述第一预设阈值;或者,根据所述第二应用预设的状态栏图标的颜色,确定所述第二颜色。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;其中,所述根据所述第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据所述第二颜色,显示第二区域的范围内的状态栏图标的颜色,包括:当所述第一灰度或所述第二灰度大于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为白色;当所述第一灰度或所述第二灰度小于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为黑色。
- 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:确定所述第一区域的范围和所述第二区域的范围。
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
- 一种电子设备,其特征在于,包括:一个或多个处理器;存储器,所述存储器中包括指令;当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:响应用户的分屏操作,将所述电子设备的屏幕分成至少两个窗口,所述至少两个窗口包括第一窗口和第二窗口,所述第一窗口运行的第一应用和所述第二窗口运行的第二应用中的至少一个应用使用沉浸式状态栏;根据所述第一应用,确定第一颜色,根据所述第二应用,确定第二颜色;根据所述第一颜色,显示第一区域的范围内的状态栏图标的颜色,根据所述第二颜色,显示第二区域的范围内的状态栏图标的颜色,所述第一区域是所述第一窗口上显示状态栏的区域,所述第二区域是所述第二窗口上显示状态栏的区域。
- 根据权利要求7所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:根据所述第一应用在所述第一区域的背景色,确定所述第一颜色,其中所述第一应用在所述第一 区域的背景色与所述第一颜色的差值大于第一预设阈值;或者,根据所述第一应用预设的状态栏图标的颜色,确定所述第一颜色;以及,根据所述第二应用在所述第二区域的背景色,确定所述第二颜色,其中所述第二应用在所述第二区域的背景色与所述第二颜色的差值大于所述第一预设阈值;或者,根据所述第二应用预设的状态栏图标的颜色,确定所述第二颜色。
- 根据权利要求7或8所述的电子设备,其特征在于,所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定所述第一颜色对应的第一灰度和所述第二颜色对应的第二灰度是否大于第二预设阈值;当所述第一灰度或所述第二灰度大于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为白色;当所述第一灰度或所述第二灰度小于所述第二预设阈值时,将所述第一区域范围内的状态栏图标或所述第二区域范围内的状态栏图标的颜色显示为黑色。
- 根据权利要求7至9中任一项所述的电子设备,其特征在于,所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:确定所述第一区域的范围和所述第二区域的范围。
- 根据权利要求7至10中任一项所述的电子设备,其特征在于,所述第一应用和所述第二应用是同一个应用,所述第二窗口显示的界面是根据用户对所述第一窗口的界面的操作而产生的。
- 根据权利要求7至11中任一项所述的电子设备,其特征在于,所述电子设备的操作系统为安卓系统、Windows系统和Linux系统中任一项。
- 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至6中任一项所述的显示方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至6中任一项所述的显示方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23842208.3A EP4502789A4 (en) | 2022-07-20 | 2023-07-14 | DISPLAY METHOD AND ELECTRONIC DEVICE |
| US18/940,624 US20250060982A1 (en) | 2022-07-20 | 2024-11-07 | Display method and electronic device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210858818.1 | 2022-07-20 | ||
| CN202210858818.1A CN117472479A (zh) | 2022-07-20 | 2022-07-20 | 显示方法和电子设备 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/940,624 Continuation US20250060982A1 (en) | 2022-07-20 | 2024-11-07 | Display method and electronic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024017145A1 true WO2024017145A1 (zh) | 2024-01-25 |
Family
ID=89617103
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/107349 Ceased WO2024017145A1 (zh) | 2022-07-20 | 2023-07-14 | 显示方法和电子设备 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20250060982A1 (zh) |
| EP (1) | EP4502789A4 (zh) |
| CN (1) | CN117472479A (zh) |
| WO (1) | WO2024017145A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121605470A (zh) * | 2024-03-27 | 2026-03-03 | 荣耀终端股份有限公司 | 屏幕分区显示方法、图形界面及电子设备 |
| WO2025255751A1 (zh) * | 2024-06-12 | 2025-12-18 | 荣耀终端股份有限公司 | 屏幕分区显示方法、图形界面及电子设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6031529A (en) * | 1997-04-11 | 2000-02-29 | Avid Technology Inc. | Graphics design software user interface |
| CN108037956A (zh) * | 2017-12-27 | 2018-05-15 | 南昌黑鲨科技有限公司 | 一种显示界面显示方法、显示装置及计算机可读存储介质 |
| CN109460272A (zh) * | 2018-09-11 | 2019-03-12 | 广州优视网络科技有限公司 | 针对安卓系统的应用显示方法和装置 |
| CN110618849A (zh) * | 2018-12-25 | 2019-12-27 | 北京时光荏苒科技有限公司 | 一种通知栏的设置方法、装置、设备及存储介质 |
| CN112346804A (zh) * | 2020-10-28 | 2021-02-09 | 武汉蓝星科技股份有限公司 | 一种linux-android双系统终端的状态栏显示系统及方法 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105867730B (zh) * | 2016-03-24 | 2019-03-01 | Oppo广东移动通信有限公司 | 状态栏的显示方法及装置 |
| CN107479793A (zh) * | 2017-09-07 | 2017-12-15 | 青岛海信移动通信技术股份有限公司 | 导航栏显示方法、装置和计算机可读存储介质 |
| CN110830645B (zh) * | 2019-09-24 | 2021-05-18 | 华为技术有限公司 | 一种操作方法和电子设备及计算机存储介质 |
| CN114064179A (zh) * | 2021-11-16 | 2022-02-18 | 努比亚技术有限公司 | 一种显示模式适配方法、终端及存储介质 |
-
2022
- 2022-07-20 CN CN202210858818.1A patent/CN117472479A/zh active Pending
-
2023
- 2023-07-14 EP EP23842208.3A patent/EP4502789A4/en active Pending
- 2023-07-14 WO PCT/CN2023/107349 patent/WO2024017145A1/zh not_active Ceased
-
2024
- 2024-11-07 US US18/940,624 patent/US20250060982A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6031529A (en) * | 1997-04-11 | 2000-02-29 | Avid Technology Inc. | Graphics design software user interface |
| CN108037956A (zh) * | 2017-12-27 | 2018-05-15 | 南昌黑鲨科技有限公司 | 一种显示界面显示方法、显示装置及计算机可读存储介质 |
| CN109460272A (zh) * | 2018-09-11 | 2019-03-12 | 广州优视网络科技有限公司 | 针对安卓系统的应用显示方法和装置 |
| CN110618849A (zh) * | 2018-12-25 | 2019-12-27 | 北京时光荏苒科技有限公司 | 一种通知栏的设置方法、装置、设备及存储介质 |
| CN112346804A (zh) * | 2020-10-28 | 2021-02-09 | 武汉蓝星科技股份有限公司 | 一种linux-android双系统终端的状态栏显示系统及方法 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4502789A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4502789A4 (en) | 2025-07-02 |
| US20250060982A1 (en) | 2025-02-20 |
| EP4502789A1 (en) | 2025-02-05 |
| CN117472479A (zh) | 2024-01-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021227770A1 (zh) | 应用窗口显示方法和电子设备 | |
| US20240179237A1 (en) | Screenshot Generating Method, Control Method, and Electronic Device | |
| US11861382B2 (en) | Application starting method and apparatus, and electronic device | |
| EP4040277A1 (en) | Method for displaying multiple windows, and electronic device and system | |
| CN113254120B (zh) | 数据处理方法和相关装置 | |
| US20220066725A1 (en) | Message processing method, related apparatus, and system | |
| WO2021023021A1 (zh) | 一种显示方法及电子设备 | |
| US20230236714A1 (en) | Cross-Device Desktop Management Method, First Electronic Device, and Second Electronic Device | |
| US20230269324A1 (en) | Display method applied to electronic device, graphical user interface, and electronic device | |
| US20250060982A1 (en) | Display method and electronic device | |
| US20240264882A1 (en) | Application running method and related device | |
| EP4130955B1 (en) | Method for managing application window, and terminal device and computer-readable storage medium | |
| CN113986408A (zh) | 应用页面显示方法和电子设备 | |
| US12436781B2 (en) | Method and apparatus for processing interaction event | |
| EP4498215A1 (en) | Widget management method, electronic device, and computer-readable storage medium | |
| CN115016628B (zh) | 一种电子设备的控制方法及电子设备 | |
| WO2022052662A1 (zh) | 显示方法及电子设备 | |
| EP4177722A1 (en) | Keyboard display method, foldable screen device, and computer-readable storage medium | |
| EP4589977A1 (en) | Gesture sensing method, device and storage medium | |
| WO2023088093A1 (zh) | 显示方法和电子设备 | |
| EP4564148A1 (en) | Multi-window presentation method for application programs, and electronic device | |
| CN116048350A (zh) | 一种截屏方法及电子设备 | |
| WO2024152747A1 (zh) | 屏幕显示方法、电子设备及可读存储介质 | |
| WO2024109198A1 (zh) | 窗口调整方法及相关装置 | |
| CN116719587A (zh) | 屏幕显示方法、电子设备及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23842208 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023842208 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023842208 Country of ref document: EP Effective date: 20241025 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |