WO2025255751A1 - 屏幕分区显示方法、图形界面及电子设备 - Google Patents
屏幕分区显示方法、图形界面及电子设备Info
- Publication number
- WO2025255751A1 WO2025255751A1 PCT/CN2024/098784 CN2024098784W WO2025255751A1 WO 2025255751 A1 WO2025255751 A1 WO 2025255751A1 CN 2024098784 W CN2024098784 W CN 2024098784W WO 2025255751 A1 WO2025255751 A1 WO 2025255751A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- partition
- background
- color
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
Definitions
- This application relates to the field of terminals, and more particularly to a screen partitioning display method, a graphical interface, and an electronic device.
- This application provides a screen partitioning display method, a graphical interface, and an electronic device.
- the method is applied to an electronic device including sensors and a screen.
- the screen includes a first partition and a second partition disposed on the same side.
- the first partition does not include a punch-hole area
- the second partition includes a punch-hole area for mounting sensors.
- the background color displayed in the second partition can be any of the following: configured by the developer of the application in the first partition; pre-configured by the electronic device for the application; obtained by combining a background base color extracted in real-time from the application window in the first partition with a pre-configured background overlay color; or a background base color extracted in real-time from the application window in the first partition, etc.
- a first aspect is a screen partitioning display method, applied to an electronic device including a first screen, the first screen including a first partition and a second partition, the first partition not including a punch-hole area, the second partition including a punch-hole area, the method comprising: when running a first application, displaying a first window provided by the first application in the first partition, and displaying a first background in the second partition, the color value of the first background being the same as or similar to the color value of a first view in the first window; wherein the first view satisfies one or more of the following conditions: the first view having more than N layers in the first window, the first view being visible, the area of the first view being greater than a first value, or the background of the first view being non-empty; receiving a first operation and running a second application; when running the second application, displaying a second window of the second application in the first partition, and displaying a second background in the second partition, the color value of the second background being the same as or similar to the color value of
- the method described in the first aspect provides near-full-screen display capabilities by fully utilizing the design area of the electronic device. It minimizes the impact of punch-hole areas on the display effect. Specifically, the screen is divided into a second partition containing the punch-hole area and a first partition without the punch-hole area. Different content is then displayed in each partition, and the background color of the second partition is matched to the application window in the first partition, thus reducing the sense of separation between screen partitions and creating a unified full-screen display effect.
- the first background contains only color elements and no pattern elements.
- this first window is used to display one of the following: the homepage of a social application, social...
- the chat page of a social networking app the settings page of a music app, the home page of a music app, the playback interface of a music app, the settings interface of a music app, the home page of a video app, the playback interface of a video app, the settings interface of a video app, the home page of a shopping app, the playback interface of a shopping app, or the settings interface of a shopping app.
- the background color of the second partition can be adapted to the application in the first partition, thus expanding the application scenarios of this solution.
- the color value of the first background is a first preset value configured for the first application.
- electronic devices can provide third-party applications with an interface to configure the background color of the second partition, allowing third-party application developers to customize the background color in the second partition, thereby bringing the effect of full-screen joint display of application windows and improving the user's visual experience.
- the color value of the first background is the first preset value.
- the object of the first window is obtained by drawing the first window; before the first background is displayed in the second partition, the color value of the first background is determined to be the first preset value configured by the first application based on the first attribute value contained in the object of the first window.
- the developers of the first application can configure the background color of the corresponding second partition for the application's window.
- the color value of the first background is a second preset value configured for the electronic device.
- developers of electronic devices can pre-configure the background color of the second partition corresponding to the application, ensuring that even if the developers of the first application do not configure the background color of the second partition themselves, the background color of the second partition can still be displayed in the second partition to match the background color of the first application in the first partition, thus improving the user's visual experience.
- the color value of the first background is the second preset value.
- the electronic device presets a first whitelist and presets the second preset value corresponding to applications in the first whitelist.
- the method further includes: before displaying the first window provided by the first application in the first partition, obtaining the object of the first window by drawing the first window; before displaying the first background in the second partition, determining that the object of the first window does not contain a first attribute value, the first attribute value corresponding to the color value of the first background, and determining that the first application belongs to the first whitelist, then determining that the color value of the first background is the second preset value.
- the background color of the second partition configured by the first application can be used first, thus ensuring the overall display effect provided by the first application.
- the background color of the second partition pre-configured by the electronic device can be used, thus ensuring that the background color of the second partition is compatible with the display effect of the first application in the first partition.
- the second preset value is obtained by superimposing a fourth color value on top of a third color value, wherein the third color value is a pure color and the fourth color value is a white with a brightness gradient.
- the display effects of the first and second zones are slightly differentiated, which avoids giving users a sense of visual disjointedness while ensuring a certain degree of visual integration.
- the color value of the first background is determined based on a third preset value configured for the electronic device and the color value of the first view in the first window.
- the first application is not configured with a first preset value
- the electronic device is not configured with a second preset value. If the electronic device is configured with a third preset value, the color value of the first background is determined based on the third preset value configured on the electronic device and the color value of the first window.
- the electronic device presets a first whitelist and a second whitelist, and presets the second preset value corresponding to applications in the first whitelist and the third preset value corresponding to applications in the second whitelist.
- the method further includes: before displaying the first window provided by the first application in the first partition, obtaining an object of the first window by drawing the first window; before displaying the first background in the second partition, determining that the object of the first window does not contain a first attribute value, the first attribute value corresponding to the color value of the first background, and determining that the first application does not belong to the first whitelist but belongs to the second whitelist, then determining that the color value of the first background is determined based on the third preset value and the color value of the first view in the first window.
- the background color of the second partition configured by the first application is used first. If the first application does not configure it, the background color of the second partition pre-configured by the electronic device is used. If the electronic device only pre-configures the background overlay color of the second partition (i.e., the third preset value), then the background base color needs to be intelligently extracted from the first window of the first application. This can ensure that the background color of the second partition can be dynamically adapted to the application in the first partition in all aspects.
- the color value of the first background is obtained by superimposing the third preset value on the third color value
- the third color value is a pure color determined according to the color value of the first view in the first window
- the third preset value is a white with a brightness gradient
- the display effects of the first and second zones are slightly differentiated, which avoids giving users a sense of visual disjointedness while ensuring a certain degree of visual integration.
- the first view in the first window is the fourth color value; the third color value is determined by adjusting the brightness of the fourth color value.
- the brightness of the fourth color value is greater than the second value (e.g., 0%) and less than the third value (e.g., 50%)
- the brightness of the third color value is the third value.
- the brightness of the fourth color value is greater than or equal to the third value and less than the fourth value (e.g., 100%)
- the brightness of the third color value is the fourth value.
- a color value that is similar to the color value of the first view can be selected as the background base color.
- the color value of the first background is determined based on the color value of the first view in the first window.
- the color value of the first background is determined based on the color value of the first view in the first window.
- the electronic device presets a first whitelist and a second whitelist, and presets the second preset value corresponding to applications in the first whitelist and the third preset value corresponding to applications in the second whitelist.
- the method further includes: before displaying the first window provided by the first application in the first partition, obtaining the object of the first window by drawing the first window; before displaying the first background in the second partition, determining that the object of the first window does not contain a first attribute value, the first attribute value corresponding to the color value of the first background, and determining that the first application does not belong to either the first whitelist or the second whitelist, then determining the color value of the first background based on the color value of the first view in the first window.
- the first view in the first window is the fourth color value; the color of the first background...
- the color value is determined by adjusting the brightness of the fourth color value.
- the brightness of the fourth color value is greater than the second value and less than the third value
- the brightness of the color value of the first background is the third value.
- the brightness of the fourth color value is greater than or equal to the third value and less than the fourth value
- the brightness of the color value of the first background is the fourth value.
- a color value that is similar to the color value of the first view can be selected as the background base color.
- the method before displaying the first background in the second partition, the method further includes: determining that the display mode of the first application is set to a light color mode.
- the interface of the first application in the first partition is displayed in dark mode, there is no need to make any extra processing on the background color of the second partition. It can be displayed in dark mode along with the first partition.
- the aforementioned display method is only used to control the background color of the second partition when the display mode of the first application is light mode.
- the method when the first background is displayed in the second partition, the method further includes: displaying the status information of the electronic device in the second partition.
- the method before running the first application, the method further includes: displaying a desktop background in the first partition and the second partition, displaying application icons of the desktop in the first partition, and displaying status information of the electronic device in the second partition.
- the desktop background can be displayed jointly through the first partition and the second partition.
- the method before obtaining the first color value in the second partition corresponding to the first application, the method further includes: detecting that the first window has switched to the focus window.
- the window in the first partition that is about to switch applications can be detected in time, so as to adjust the background color of the second partition in time, ensuring the real-time and effective display effect of the screen partition.
- the first screen is the outer screen of the electronic device.
- this application provides an electronic device including one or more memories, one or more processors, and a computer program stored on the memory, a display screen, the processor executing the computer program to perform the steps described in any of the first aspects.
- this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps described in any of the first aspects.
- this application provides a computer program product including a computer program/instructions that, when executed by a processor, implement the steps described in any of the first aspects.
- Figure 1 is a schematic diagram of a screen structure provided in an embodiment of this application.
- FIG. 2 is a schematic diagram of another screen structure provided in an embodiment of this application.
- Figures 3A-3D are schematic diagrams of the screen partition display effects corresponding to several display strategies provided in the embodiments of this application;
- FIGS 4A-4D are schematic diagrams of another screen partition display effect provided by the embodiments of this application.
- Figure 5 is a schematic flowchart of a screen partitioning display method provided in an embodiment of this application.
- Figure 6 is a schematic diagram of the OS interaction flow of a screen partitioning display method provided in an embodiment of this application.
- FIG. 7 is a schematic diagram of the hardware architecture of the electronic device provided in the embodiment of this application.
- Figure 8 is a schematic diagram of the software architecture of the electronic device provided in the embodiments of this application.
- first and second are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features.
- a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, “multiple” means two or more.
- GUI graphical user interface
- Figure 1 illustrates an exemplary screen structure.
- Figure 1 shows a foldable electronic device.
- the screen of this device includes an inner screen and an outer screen.
- the inner screen is the screen that operates when the electronic device is in its unfolded state
- the outer screen is the screen that operates when the electronic device is folded.
- a regular and complete area outside the camera's location is used as the design area of the outer screen.
- a regular area specifically refers to areas such as rectangles or circles
- a complete area refers to a single, interconnected area without holes. This ensures the integrity and regularity of the display effect.
- Figure 1 illustrates this screen design method using only one exemplary scenario. Similarly, in scenarios where other types of sensors and screens are used in electronic devices, if the sensors and screens need to be designed on the same side of the electronic device, the screen design method shown in Figure 1 may be adopted. Examples will not be given here.
- the screen design shown in Figure 1 when there is a conflict between the sensor of the electronic device and the design area of the screen, although the screen design shown in Figure 1 can provide a regular display area, the screen design fails to make full use of the design area of the electronic device, that is, it does not make full use of the surrounding area of the camera.
- the screen designed in this way is small and provides a poor interactive experience for users.
- Figure 2 illustrates another screen structure.
- the display method provided in this application is applied to an electronic device 100.
- the screen of the electronic device 100 includes an inner screen and an outer screen (also referred to as the first screen).
- the inner screen refers to the screen that operates when the electronic device 100 is in an unfolded state
- the outer screen refers to the screen that operates when the electronic device 100 is in a folded state. Comparing the screen designs in Figures 1 and 2, it can be seen that the screen design in Figure 2 makes full use of the available design space, extending the design area of the outer screen to the perimeter of the sensor. While providing a larger outer screen, this also brings challenges to the display effect of the outer screen. That is, although the area of the outer screen is larger, the outer screen is not a complete area; it contains holes/perforations. The presence of holes/perforations in the outer screen will affect the complete and regular display of the content on the screen.
- this application further divides the outer screen into multiple areas and then displays different types of content in each area, thereby minimizing the impact of holes/holes in the outer screen on the integrity of the displayed content.
- the outer screen can be divided into a first zone and a second zone.
- the first zone is a single-connected area (i.e., a hole-free area)
- the second zone is a multi-connected area (i.e., an area with holes/holes).
- the holes/holes in the second zone are used to place sensors.
- the first zone is used to display content with high requirements for screen regularity and integrity, such as the application interface, while the second zone is used to display content with low requirements for screen regularity and integrity, such as the status information of the electronic device (see the description of Figures 3A-3D below for details).
- This screen partitioning display method can avoid the impact of sensors in the punched area on the screen display content.
- the screen partitioning display method please refer to the description of Figures 5-6 below.
- the user interface for the screen partitioning display please refer to the UI embodiments in Figures 3A-4D below.
- FIG. 2 is merely an illustrative example of a screen design provided by this application and should not be construed as limiting the scope of this application.
- the screen partitioning display method provided by this application can also be applied to other screen designs, as follows:
- the division direction of the second partition and the first partition can be either vertical or horizontal.
- the specific division direction of the screen partition depends on the arrangement direction of the punch area of the sensor. If the punch area is arranged vertically, the second partition and the first partition can be divided vertically; if the punch area is arranged horizontally, the second partition and the first partition can be divided horizontally.
- the number of punch-hole areas in the screen can be one or more.
- the number of punch-hole areas depends on the design of the sensor. If there is one punch-hole area, it can be used to set one sensor or to set multiple sensors integrated into one unit. If there are multiple punch-hole areas, each punch-hole area can be used to set one or more sensors.
- the screen using a partitioned design can be an inner screen in addition to an outer screen, or it can be the screen of an electronic device 100 without a distinction between inner and outer screens (such as the screen of a non-foldable electronic device 100).
- the number and area of sensors on the inner screen surface of the electronic device 100 are relatively small, meaning that the sensors on the inner screen surface of the electronic device 100 hardly affect the display effect of the inner screen, therefore, it is unnecessary to use the screen partitioning display method provided in this application for the inner screen.
- the screen partitioning display method provided in this application can be used.
- the screen partitioning design and screen partitioning display method provided in this application can be used for situations where there is a conflict between the design areas of sensors and the screen.
- the partitioning may create a visual disconnect due to the different types of content displayed, or confuse the user about the content they are interested in. Therefore, to further improve the screen partitioning display effect, the display effect of the second partition (e.g., background color) needs further improvement.
- the aim is to provide users with a full-screen unified display visual experience, enhancing visual aesthetics and reducing the disconnect between the second and first partitions; simultaneously, it allows users to focus on the main task displayed in the first partition, minimizing the impact of the second partition on the first.
- this application provides a screen partitioning display method, a graphical interface, and an electronic device.
- This method is applied to an electronic device including sensors and a screen.
- the screen includes a first partition and a second partition disposed on the same side.
- the first partition does not include a punch-hole area
- the second partition includes a punch-hole area for mounting sensors.
- the background color displayed in the second partition can be any of the following: configured by the developer of the application in the first partition; pre-configured by the electronic device for the application; obtained by combining a background base color extracted in real-time from the application window in the first partition with a pre-configured background overlay color; or a background base color extracted in real-time from the application window in the first partition, etc.
- Sensors can include one or more image sensors (i.e., cameras), ambient light sensors, or proximity sensors, etc.
- the electronic device may be configured with only one screen; or, when the electronic device is a foldable device, it may be configured with two screens, for example, an electronic device that folds up and down may be configured with two screens, an inner and an outer screen; or, when the electronic device is a foldable device, it may be configured with three screens, for example, an electronic device that folds left and right may be configured with an outer screen and an inner screen, the inner screen comprising two screens, left and right.
- the embodiments of this application do not limit the number of screens, whether the screens are foldable, or the folding method of the electronic device.
- the first partition and the first sub-partition refer to two interconnected and non-overlapping sub-regions contained in a screen. For details on the structure of these two regions, please refer to the description of the outer screen partition structure shown in Figure 2 below, which will not be repeated here.
- the punch-hole area refers to the hole/hole in the second section of the screen.
- the second section is equivalent to a multi-connected area in mathematical terms
- the punch-hole area in the second section is equivalent to the hole/hole in the multi-connected area in mathematical terms.
- Application window This refers to the window that constitutes the application interface in the first partition when an electronic device is running an application. This window is displayed in the first partition to form the application interface visible to the user.
- the application interface includes, but is not limited to: the main interface (also known as the first-level interface), the second-level interface, the third-level interface, etc.
- the electronic device needs to switch the focus window (i.e., setting the window corresponding to the old application interface to an invisible state and setting the window corresponding to the new application interface to a visible state) to switch the display of the new user interface.
- Background color refers to the color used as the bottom layer in the interface elements displayed in the first partition. It can be a single color (i.e., the background base color described in the embodiments of this application) or a color composed of multiple colors (i.e., the background base color combined with the background overlay color described in the embodiments of this application).
- Status information of electronic devices refers to information such as time and date displayed in the second partition.
- Figure 3A exemplarily illustrates a set of user interfaces that apply a self-configured background color in the second partition.
- Figure 3A a shows user interface 31, which is the main interface displayed on the external screen of electronic device 100.
- the main interface includes a first section and a second section, which jointly display the background of the system theme.
- the first section displays application icons
- the second section displays the status information of the electronic device (for now, only the time is shown as an example).
- electronic device 100 receives an operation applied to the icon of application A shown in Figure 3A(a), in response to the operation, the electronic device displays the interface of application A in the first partition. If application A has also configured a background color for the second partition, the electronic device 100 will also display the background color configured by application A in the second partition, specifically the user interface 32 shown in Figure 3A(b) as described below.
- application A self-configures the background color of the second partition
- application A means that the developer/developer of application A configures the corresponding background color of the second partition in the application's installation package during the development or update of application A.
- the background color corresponding to application A is displayed in the second partition.
- Application A can be a third-party application or a system application; this application does not impose any restrictions on this.
- Figure 3Ab shows user interface 32, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application A, and most controls in the interface of application A have a white background.
- the second section displays white as the background color (also known as the first background color) configured by application A.
- the electronic device may display status information that has a certain contrast with the background color, such as the time for displaying black (the corresponding color value is also known as the first preset value, which could be a saturation of 42, a brightness of 26%, and a hue of FFFFFF), thereby ensuring that the user can accurately read the status information of the electronic device.
- the background color of the second partition shown in Figure 3A is merely an example; different applications may configure different background colors for their second partitions.
- the background of the second partition is similar in style to that of the first partition.
- application A can also configure the format of the text in the second partition, etc. This application embodiment does not impose any limitations on this, and will not be elaborated on here.
- Figure 3B exemplarily illustrates a user interface for a set of electronic devices pre-configured with a background color in a second partition.
- Figure 3Ba shows the user interface 33, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 32 shown in Figure 3Ab above.
- electronic device 100 receives an operation to switch from application A to application B (also known as the first operation), in response to the operation, the electronic device switches to the interface displaying application B in the first partition. If application B has not configured the background color of the second partition, and electronic device 100 has pre-configured the background color of the second partition corresponding to application B, then electronic device 100 will also display the background color of application B pre-configured by electronic device 100 in the second partition, specifically the user interface 34 shown in b of Figure 3B as described below.
- the background color of the second partition corresponding to application B pre-configured on the electronic device refers to the background color of the second partition configured for application B by the developers of electronic device 100 when developing/updating the electronic device system.
- an XML configuration file can be used to configure application B, storing the background color of the second partition corresponding to application B in the XML file. Subsequently, the developers of electronic device 100 can remotely update the XML file of application B to update the background color of the second partition corresponding to application B.
- Figure 3Bb shows user interface 34, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application B, and the background color value of the larger controls in this interface is A.
- the background color displayed in the second section (also called the second background color) is the color value formed by superimposing color value a on top of color value A.
- the various controls in the interface of application B can be implemented by drawing corresponding views.
- the electronic device will display status information that has a certain contrast with the background color, such as displaying black for a certain period of time, thereby ensuring that the user can accurately read the status information of the electronic device.
- the background color pre-configured by the electronic device 100 may include: a base background color, i.e., color value A (also known as the third color value), and a background overlay color, i.e., color value a (also known as the fourth color value); or, the background color preset by the electronic device 100 is the final color value formed by overlaying color value a on top of color value A (also known as the second preset value).
- Color value A can be a single solid color, represented in Figure 3B by a pattern of evenly spaced diagonal lines, and this color value A is the same as the color value in the interface of the corresponding application B.
- Color value a can be a color value with a brightness gradient effect, as shown in Figure 3B.
- the color value 'a' is represented by a pattern of horizontal lines with varying density, where 'a' is, for example, a white with a gradual change in brightness.
- 'a' is, for example, a white with a gradual change in brightness.
- the background color display effect of the pre-configured second partition of the electronic device shown in Figure 3B is only an example.
- the electronic device 100 can switch from displaying a user interface other than user interface 33 to displaying user interface 34.
- the electronic device 100 can also pre-configure the same background color for different applications, or pre-configure different background colors, or pre-configure the same background overlay color combined with different background base colors, etc.
- pre-configuring color A overlay color a for application B we only use the example of pre-configuring color A overlay color a for application B, and it should not constitute a limitation of this application.
- the electronic device 100 in addition to pre-configuring the background color of the second partition corresponding to application B, the electronic device 100 can also pre-configure the format of the text in the second partition corresponding to application B, etc. This application embodiment does not limit this, and will not be described in detail here.
- Figure 3C exemplarily illustrates a user interface for a set of electronic devices pre-configured with a background color in a second partition extracted intelligently.
- FIG 3Ca shows a user interface 35, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 34 shown in Figure 3Bb above.
- the electronic device 100 receives an operation to switch from application B to application C (also known as the first operation), in response to the operation, the electronic device switches to displaying the interface of application C in the first partition. If application C has not configured the background color of the second partition, and the electronic device 100 has only pre-configured the background overlay color of application C in the second partition (also known as the third preset value), the electronic device 100 will also extract the corresponding background base color of the second partition from the interface of application C displayed in the first partition, and then combine the extracted background base color with the pre-configured background overlay color as the background color displayed in the second partition, as shown in the user interface 36 of Figure 3Cb below.
- Figure 3Cb shows user interface 36, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application C, and the background color value of the larger controls in this interface is B.
- the background color displayed in the second section is the color value formed by superimposing color value b on top of color value B'.
- the electronic device may display status information that has a certain contrast with the background color, such as displaying black for a certain period of time, thereby ensuring that the user can accurately read the status information of the electronic device.
- color value B' is extracted by the electronic device from color B in the interface of application C in the first partition.
- Color value B' can be a single solid color.
- color value B is represented by a pattern of evenly spaced and sparsely spaced vertical lines, while color value B' is represented by a pattern of evenly spaced and closely spaced vertical lines. This color value B' is similar to color value B.
- the method by which the electronic device extracts color value B' from color value B in application C can be referred to the description of the method embodiment below, and will not be repeated here.
- Color value b can be a color value with a brightness gradient effect. This color value b can be the same as or different from the aforementioned color value a.
- color value b is represented by a pattern of horizontal lines with a spacing from dense to sparse.
- Color value b is, for example, a white with a brightness gradient.
- the information can also be displayed in a way that subtly differentiates the second and first sections through a gradient brightness effect, which can avoid the sense of separation between the two sections and help users focus on the key tasks in the first section.
- the display effect of the background color of the second partition pre-configured by the electronic device and intelligently extracted shown in Figure 3C is only an example.
- the electronic device 100 can switch from displaying a user interface other than user interface 35 to displaying user interface 36.
- the electronic device 100 can pre-configure the same background overlay color or different background overlay colors for different applications.
- the electronic device in addition to pre-configuring the background overlay color of the second partition corresponding to application C, the electronic device can also pre-configure the format of the text in the second partition corresponding to application C, etc. This application embodiment does not limit this, and will not be described in detail here.
- Figure 3D exemplarily illustrates a user interface with background color intelligently extracted from a second partition by a set of electronic devices.
- FIG 3D a shows the user interface 37, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 36 shown in Figure 3C b above.
- the electronic device 100 receives an operation to switch from application C to application D, in response to the operation, the electronic device switches to displaying the interface of application D in the first partition. If application D has not configured the background color of the second partition, and the electronic device 100 has not pre-configured the background color of the second partition corresponding to application D, the electronic device 100 will extract the corresponding background base color of the second partition from the interface of application D displayed in the first partition, and then use the extracted background base color as the background color displayed in the second partition, as shown in the user interface 38 of Figure 3Db below.
- Figure 3D, b shows user interface 38, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application D, and the background color value of the larger controls in this interface is C (also known as the fourth color value).
- the background color displayed in the second section is color value C' (also known as the third color value).
- the electronic device may display status information that has a certain contrast with the background color, such as displaying black for a specific duration, thereby ensuring that the user can accurately read the status information of the electronic device.
- the color value C’ is extracted by the electronic device from the interface of application D in the first partition.
- the color value C’ can be a single solid color.
- color value C is represented by a pattern of evenly spaced and sparsely spaced vertical lines, while color value C’ is represented by a pattern of evenly spaced and closely spaced vertical lines. This color value C’ is similar to color value C.
- the method by which the electronic device extracts the color value C’ from color value C in application D can be referred to the description of the method embodiments below, and will not be repeated here.
- the background color display effect of the second partition intelligently extracted by the electronic device shown in Figure 3D is only an example.
- the electronic device 100 can switch from displaying a user interface other than user interface 37 to displaying user interface 38.
- the display modes of the electronic device 100 include a light mode and a dark mode.
- the electronic device 100 can switch display modes based on user operation, ambient light, or time.
- light mode the background displayed by the electronic device 100 is predominantly white or other light colors, paired with black or dark text and graphic elements.
- dark mode the background displayed by the electronic device 100 is predominantly black or dark colors, paired with... White or light-colored text and graphic elements.
- Figure 4A exemplarily illustrates the effect of screen partitioning display on an electronic device 100 in dark mode.
- Figure 4A(a) shows user interface 41, which is the main interface displayed on the external screen of electronic device 100.
- This main interface includes a first section and a second section.
- the first and second sections jointly display the background of the system theme.
- the first section displays application icons, and the second section displays the status information of the electronic device (currently only the time is shown as an example).
- the display effect of the main interface is as shown in Figure 4A(a); when the system display mode of electronic device 100 is set to dark mode, the display effect of the main interface is different from that in Figure 4A(a) (not shown in Figure 4A).
- electronic device 100 receives an operation applied to the icon of application A shown in Figure 4A(a), in response to the operation, electronic device 100 displays the interface of application A in the first partition. If application A is set to dark mode, even though application A has configured its own background color for the second partition, electronic device 100 will still display a black background in the second partition instead of displaying the background color configured by application A, specifically as shown in user interface 42 in Figure 4A(b) below.
- application A can be set to dark/light mode in ways including but not limited to:
- the application A automatically follows the display mode of the system and is set to dark mode.
- the application A automatically follows the display mode of the system and is set to light mode.
- Figure 4Ab shows user interface 42, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application A
- the background of application A's interface is black.
- the second section displays the black background color corresponding to dark mode.
- electronic device 100 may display status information of the electronic device that has a certain contrast with the background color, such as the time for displaying white (the corresponding color value could be saturation of 3D, brightness of 24%, and hue of #000000), thereby ensuring that the user can accurately read the status information of the electronic device.
- the screen partitioning effect of the electronic device 100 in dark mode shown in Figure 4A is merely an example.
- the background color of different applications in the first partition may be different.
- the background of the second partition could also be gray. This example only illustrates the situation where application A displays a black background, and the second partition also displays a black background. This should not constitute a limitation of this application. limit.
- Figure 4B illustrates, for example, the effect of screen partitioning display on another set of electronic devices 100 in dark mode.
- Figure 4Ba shows the user interface 43, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 42 shown in Figure 4Ab above.
- electronic device 100 receives an operation to switch from application A to application B, in response to the operation, electronic device 100 switches to the interface displaying application B in the first partition. If application B is set to dark mode, even though application B has not configured the background color of the second partition by itself, and electronic device 100 has pre-configured the background color of the second partition corresponding to application B, electronic device 100 will still display a black background in the second partition, as shown in user interface 44 in Figure 4Bb below.
- Figure 4Bb shows user interface 44, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application B, and the background of application B's interface is black.
- the second section displays the corresponding black background color in dark mode.
- electronic device 100 may display status information of the electronic device with a certain contrast to that background color, such as displaying the time in white, thereby ensuring that the user can accurately read the status information of the electronic device.
- the effect of screen partitioning display of electronic device 100 in dark mode shown in Figure 4B is only an example.
- the background color of different applications in the first partition may be different.
- the background of the second partition can also be gray.
- Figure 4C exemplarily illustrates the effect of another set of screen partitioning displays used by electronic devices 100 in dark mode.
- FIG 4Ca shows a user interface 45, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 44 shown in Figure 4Bb above.
- electronic device 100 receives an operation to switch from application B to application C, in response to the operation, the electronic device switches to displaying the interface of application C in the first partition. If application C is set to dark mode, even though application C does not configure the background color of the second partition itself, and electronic device 100 only pre-configures the background overlay color corresponding to application C in the second partition, electronic device 100 will still display a black background in the second partition, instead of extracting the corresponding background base color of the second partition from the interface of application C displayed in the first partition, and then combining the extracted background base color with the pre-configured background overlay color as the background color displayed in the second partition, as specifically shown in the user interface 46 of Figure 4Cb below.
- Figure 4Cb shows user interface 46, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application C
- the background of application C's interface is black.
- the second section displays the corresponding black background color in dark mode.
- electronic device 100 may display status information of the electronic device that has a certain contrast with the background color, such as displaying... White time and other indicators ensure that users can accurately read the status information of electronic devices.
- the effect of screen partitioning display of electronic device 100 in dark mode shown in Figure 4C is only an example.
- the background color of different applications in the first partition may be different.
- the background of the second partition can also be gray.
- Figure 4D exemplarily illustrates the effect of another set of screen partitioning displays used by electronic devices 100 in dark mode.
- FIG 4D(a) shows the user interface 47, which is the interface displayed on the external screen of the electronic device 100.
- This interface is the same as the user interface 46 shown in Figure 4C(b) above.
- electronic device 100 receives an operation to switch from application C to application D, in response to the operation, electronic device 100 switches to displaying the interface of application D in the first partition. If application D is set to dark mode, even though application D does not configure the background color of the second partition by itself, and electronic device 100 does not pre-configure the background color of the second partition corresponding to application D, electronic device 100 will still display a black background in the second partition, instead of extracting the corresponding background base color of the second partition from the interface of application D displayed in the first partition and then using the extracted background base color as the background color displayed in the second partition, as specifically shown in the user interface 48 of Figure 4Db below.
- Figure 4D, b shows user interface 48, which is the interface displayed on the external screen of electronic device 100.
- This interface includes a second section and a first section.
- the first section displays the interface of application D
- the background of application D's interface is black.
- the second section displays the corresponding black background color in dark mode.
- electronic device 100 may display status information of the electronic device with a certain contrast to that background color, such as displaying the time in white, thereby ensuring that the user can accurately read the status information of the electronic device.
- the effect of screen partitioning display of electronic device 100 in dark mode shown in Figure 4D is only an example.
- the background color of different applications in the first partition may be different.
- the background of the second partition can also be gray.
- FIG. 5 illustrates an exemplary flowchart of a screen partitioning display method.
- This screen partitioning display method includes the following steps:
- S51 ⁇ S52 Trigger the background color palette in the second partition to switch to a background color that matches the application window in the first partition.
- application windows can be displayed in the first section of the screen.
- the window displayed at the top, visible to the user, and which the user can directly interact with, is the focus window.
- the focus window is the window provided by the desktop application.
- the electronic device opens application A and displays the interface of application A in the first section of the screen
- the focus window switches to the window of application A.
- the electronic device opens application B and displays its interface in the first section of the screen...
- the focus window switches to the window of application B.
- a focus window switching mechanism can be triggered to display the new application interface in the first partition of the screen.
- the Activity Manager Service (AMS) of the electronic device will start a new Activity corresponding to the new interface.
- AMS then begins to manage the running state of the new Activity and the old Activity.
- WMS Window Manager Service
- the WMS is triggered to switch the focus window. This includes setting the old window corresponding to the old Activity to an invisible state and setting the new window corresponding to the new Activity to a visible state, thereby triggering subsequent drawing, rendering, composition, and display of the new window, thus displaying the new interface after the switch.
- the screen here can be the external screen shown in Figure 2 above.
- the screen here can be the external screen shown in Figure 2 above.
- the partition display strategy described in Figure 5 is used. If full-screen display is determined, the corresponding full-screen display strategy is followed.
- This application embodiment does not specifically limit the content of the full-screen display, which can be determined by the desktop or other applications to be displayed.
- full-screen display scenarios include, but are not limited to, displaying the desktop, weather, or other applications.
- This application can preset full-screen display scenarios, or it can preset partition display scenarios, etc.
- the electronic device After detecting a switch in the focus window, the electronic device will execute the task of drawing the focus window. Once the electronic device has finished drawing the focus window, it can obtain the completed focus window object.
- the focused window object includes, but is not limited to, the application package name and window identifier, and may also include, relationship attributes and screen information attributes.
- the application package name is the package name of the application to which the focused window belongs; the window identifier uniquely identifies the window; relationship attributes may include properties such as ⁇ parent ⁇ and ⁇ top ⁇ , which return references to the parent window and the topmost ancestor window, respectively; and screen information attributes may include ⁇ screenLeft ⁇ and ⁇ screenTop ⁇ , which declare the window's position relative to the screen.
- the window object also carries a corresponding attribute value, which is used to indicate the background color of the second partition.
- This application embodiment does not limit the specific setting form of the attribute value of the second partition.
- S53 ⁇ S54-2 Strategy 1, using the self-configured color value as the background color of the second partition.
- the electronic device 100 supports application developers in configuring the background color of the application in the second partition. If the developer has already configured the background color of the application in the second partition, the electronic device 100 can obtain the background color from the attribute values carried in the focus window object obtained in S52. Therefore, the electronic device can determine whether the corresponding first application has configured the background color of the second partition based on the focus window object. When it is determined that the focus window object carries the corresponding attribute value, it is determined that the first application has configured the background color of the second partition, and then the electronic device proceeds according to the self-configuration result of the corresponding first application.
- Control the background color of the second partition i.e., execute subsequent S54-1 to S54-2; if it is determined that the focused window object does not carry the corresponding attribute value, it is determined that the first application has not self-configured the background color of the second partition, and then the background color of the second partition is controlled according to the pre-configuration/intelligent adaptation strategy provided by the electronic device (i.e., execute subsequent S55, etc.).
- the background color of the second partition is obtained based on the attribute value in the focused window object.
- the electronic device can obtain the background color of the second partition configured by the first application from the attribute values of the focused window object.
- the background color of the second partition configured by the first application can be similar to or the same as the color value of the focused window in the first partition, thus providing the user with a visual experience of the first application being displayed in full screen.
- S54-2 displays the focus window of the first application in the first partition of the screen, and displays the background color configured for the first application in the second partition of the screen.
- the switched focus window can be displayed in the first partition, thus forming the user interface of the first application.
- the electronic device obtains the background color of the second partition configured by the first application, the corresponding background color can also be displayed in the second partition.
- the electronic device can simultaneously display the focus window in the first partition and the corresponding background color in the second partition.
- the electronic device can first display the focus window in the first partition and then display the corresponding background color in the second partition, but the user cannot visually perceive the time delay between the two, which is equivalent to seeing the content switching between the two partitions simultaneously.
- This application embodiment does not limit this; it depends on the electronic device's strategy for controlling screen display.
- the screen may only support refreshing the first and second partitions simultaneously, or it may support refreshing the first and second partitions separately.
- S55 ⁇ S56-2 Strategy 2, using the color values pre-configured by the electronic device as the background color of the second partition.
- the electronic device can pre-configure the default background color of the second partition for applications in the first whitelist. Therefore, the electronic device can detect whether the first application belongs to the first whitelist. If it does, the electronic device will use the preset color value as the background color of the second partition for display (i.e., execute the subsequent S56-1 to S56-2); if it does not, the intelligently extracted color value will be used as the background color of the second partition for display (i.e., execute the subsequent S57, etc.).
- the background color of the second partition corresponding to different applications in the first whitelist can be the same or different.
- the same application can correspond to one background color, or the same application can correspond to different background colors according to different window levels.
- the windows of the first-level interface and the windows of the second-level interface of the application can be configured with different background colors. This application embodiment does not limit this.
- the background color of the second partition pre-configured by the electronic device is obtained from the configuration file of the first application.
- the electronic device configures only one background color for the first application, that background color can be used regardless of which window of the first application is the focused window.
- the electronic device configures multiple background colors for the first application, the corresponding background color is obtained based on the interface level of the first application corresponding to the currently focused window. The latter mainly takes into account that different levels of the same application have different colors, so electronic devices can be pre-configured with the same or similar background colors according to different levels of the interface.
- the background color of the second partition stored in the configuration file of the first application can be a single color (i.e., the background base color described in this embodiment) or a color composed of multiple colors (i.e., the background base color combined with the background overlay color described in this embodiment).
- the background base color can be a single color in the Hue-Saturation-Brightness (HSB) color space, such as pink, yellow, green, or red.
- the background overlay color can be a white with a brightness gradient in the HSB color space. This brightness gradient white is overlaid on the background base color, which will not completely cover the original background base color, and can distinguish the first partition and the second partition through the brightness gradient effect, so that the user can focus on the main task in the first partition. This embodiment does not limit this.
- S56-2 displays the focus window of the first application in the first section of the screen and displays the background color of the electronic device configuration in the second section of the screen.
- the switched focus window can be displayed in the first partition, thus forming the user interface of the first application.
- the electronic device obtains the background color of the second partition corresponding to the first application pre-configured by the electronic device, the corresponding background color can also be displayed in the second partition.
- the electronic device can simultaneously display the focus window in the first partition and the corresponding background color in the second partition.
- the electronic device can first display the focus window in the first partition and then display the corresponding background color in the second partition, but the user cannot visually perceive the time delay between the two, which is equivalent to seeing the content switching between the two partitions simultaneously.
- This application embodiment does not limit this; it depends on the electronic device's strategy for controlling screen display.
- the screen may only support refreshing the first and second partitions simultaneously, or it may support refreshing the first and second partitions separately.
- S57 ⁇ S58-4 Strategy 3, using the background base color intelligently extracted by the electronic device combined with the background overlay color preset by the electronic device as the background color of the second partition.
- the electronic device can pre-configure the background overlay color for the second partition of applications in the second whitelist.
- This background overlay color is superimposed on the background base color extracted from the focused window, serving as the final background color of the second partition. Therefore, the electronic device can detect whether the first application belongs to the second whitelist. If it does, the preset background overlay color of the electronic device is used as the overlay layer of the background color of the second partition for display (i.e., executing subsequent steps S58-1 to S58-4); if it does not belong, the intelligently extracted background base color is used as the background color of the second partition for display (i.e., executing subsequent steps S59-1 to S59-2).
- the background overlay color of the second partition corresponding to different applications can be the same or different.
- the same application can correspond to one background overlay color, or the same application can correspond to different background overlay colors according to different window levels.
- the windows of the first-level interface and the windows of the second-level interface of the application can be configured with different background overlay colors. This application embodiment does not limit this.
- the electronic device information is retrieved from the configuration file of the first application.
- a pre-configured background overlay color for the second partition is provided.
- that background overlay color can be used regardless of which window of the first application is the focused window.
- the electronic device configures multiple background overlay colors for the first application the corresponding background overlay color is obtained based on the interface level of the first application corresponding to the currently focused window.
- the background overlay color of the second partition corresponding to each application pre-configured by the electronic device is either a white with a brightness gradient or other color values with a brightness gradient.
- This brightness gradient color is overlaid on the background base color, so that it will not completely cover the background base color, and the first partition and the second partition can be distinguished by the brightness gradient effect, so that the user can focus on the main task in the first partition.
- This application embodiment does not limit this.
- the background base color is also extracted from the View in the corresponding focus window based on the focus window object.
- the order of these two steps is not limited in this embodiment.
- the focus window object carries a window identifier.
- the drawn focus window is composed of various Views, which can be various controls, text, etc.
- Electronic devices can extract the color of the view of the focus window based on the window identifier, and use it as the background base color of the second section.
- the focus window may contain many views, and the colors of different views may not be completely consistent. Therefore, the electronic device may select a view in the focus window that meets the following conditions: the number of layers is within the top 10, it is visible to the user, the area it occupies is greater than 80% of the area of the root view (DecorView), the background color is not empty, and finally the color value that is the same as or similar to the background color of the view is used as the final background base color.
- a method for selecting a color value similar to the background color of the View as the final background base color includes: first converting the actual color value of the View's background color into the HSB color space; then adjusting the value of the luminance (B) channel in the HSB color space.
- the luminance (B) channel value is divided into multiple values from 0% to 100%, such as 50% and 100%. Then, the luminance (B) values within the 0% to 50% range are set to 50%, and the luminance (B) values within the 50% to 100% range are set to 100%.
- the luminance (B) can be divided into more segments for adjustment; this application embodiment does not limit this.
- the saturation (S) channel value in the HSB color space can be adjusted; for example, all saturation (S) values greater than 40 can be set to the upper limit of 40.
- the hue (H) channel value in the HSB color space can be adjusted, etc. This application embodiment does not specifically limit the method for selecting a color value similar to the actual background color of the View as the background base color.
- the background color of the second section is obtained by overlaying the background base color and the background overlay color.
- the final color obtained by overlaying the background base color with the background overlay color can be used as the background color of the second partition.
- the background color obtained in this way ensures that it is similar to the color value in the first partition, improving the user's visual experience, while also ensuring that the brightness and saturation of the background color in the second partition are moderate, reducing the impact on key content in the first partition.
- the electronic device may also determine the color value of the electronic device status information displayed in the second partition based on the background color of the final acquired second partition, ensuring a certain contrast between the two, thus ensuring the readability of the content displayed in the second partition.
- S58-4 displays the focus window of the first application in the first section of the screen, and displays the electronic device in the second section of the screen. Configure the background color.
- the switched focus window can be displayed in the first partition, thus forming the user interface of the first application.
- the electronic device obtains the background color of the second partition corresponding to the first application pre-configured by the electronic device, the corresponding background color can also be displayed in the second partition.
- the electronic device can simultaneously display the focus window in the first partition and the corresponding background color in the second partition.
- the electronic device can first display the focus window in the first partition and then display the corresponding background color in the second partition, but the user cannot visually perceive the time delay between the two, which is equivalent to seeing the content switching between the two partitions simultaneously.
- This application embodiment does not limit this; it depends on the electronic device's strategy for controlling screen display.
- the screen may only support refreshing the first and second partitions simultaneously, or it may support refreshing the first and second partitions separately.
- S59-1 ⁇ S59-2 Strategy 4, using the background base color intelligently extracted by the electronic device as the background color of the second partition.
- S59-1 is the same as S58-2 mentioned above.
- S59-1 please refer to the description of S58-2 above. It will not be repeated here.
- S59-2 displays the focus window of the first application in the first section of the screen, and displays the background color of the electronic device configuration in the second section of the screen.
- S59-2 is similar to S58-4 mentioned above. The difference is that the background color of the second partition in S59-2 is only the background base color extracted by the electronic device, while the background color of the second partition in S58-4 is the color value obtained by combining the background base color extracted by the electronic device with the background overlay color preset by the electronic device.
- S59-2 please refer to the description of S58-4 above. It will not be repeated here.
- the four screen partitioning display strategies are ranked from highest to lowest priority as follows: application self-configuration, electronic device pre-configuration, electronic device pre-configuration overlay with smart lift, and smart lift only.
- the system determines which conditions are met and adopts the corresponding strategy to control the screen partitioning display effect.
- other priority orders besides the one shown in Figure 5 can be used to determine which strategy to use to control the screen partitioning display effect; this embodiment does not limit this approach.
- Figure 6 illustrates an OS interaction flow diagram of a screen partitioning display method. Specifically, it includes the following steps:
- the software modules of the electronic device 100 involved in this OS interaction include, but are not limited to: the first application, WMS, LetterBox, Task management module, ViewRootImpl, file parsing, and View management framework.
- WMS Wireless Management System
- LetterBox Task management module
- ViewRootImpl file parsing
- View management framework For detailed information on these modules, please refer to the introduction of the software architecture of the electronic device 100 later, which will not be elaborated here.
- Phase 1 Trigger the acquisition of the background color of the second partition.
- the first application receives the first operation event.
- the first application of the electronic device can obtain the first operation event.
- the first application described in this application can be any one of the aforementioned application A, application B, application C, or application D.
- the first operation can also be the operation performed on the icon of application A on the desktop as shown in Figure 3A, or the operation for switching to the interface of application B as shown in Figure 3B, or the operation for switching to the interface of application C as shown in Figure 3C, or the operation for switching to the interface of application D as shown in Figure 3D, etc.
- the embodiments of this application do not limit this.
- the first application notifies the WMS via AMS that the first activity of the first application has been set to the Resumed state.
- the first application can execute the ⁇ onStart() ⁇ method to launch its first activity.
- This first activity can be the application's main activity or a non-main activity that was started during the last foreground run.
- AMS can manage its lifecycle.
- AMS will coordinate with other modules to sequentially execute the tasks of drawing, rendering, and displaying the first window corresponding to that activity, thereby enabling the subsequent display of the first window to form the first interface visible to the user.
- the first activity enters the Resumed state, other activities that were previously active before the first application will enter the Paused state.
- AMS will also notify WMS of the first activity being set to the Resumed state, allowing WMS to switch the focus window accordingly.
- the first activity of the first application launched by AMS can be the activity corresponding to user interface 32 in Figure 3A as described above; when the first application is application B, the first activity of the first application launched by AMS can be the activity corresponding to user interface 34 in Figure 3B as described above; when the first application is application C, the first activity of the first application launched by AMS can be the activity corresponding to user interface 36 in Figure 3C as described above; and when the first application is application D, the first activity of the first application launched by AMS can be the activity corresponding to user interface 38 in Figure 3D as described above.
- WMS sets the first window of the first activity as the focus window.
- WMS learns that the first activity has been set to the Resumed state, it indicates that the user wants to focus on the interface corresponding to the first activity. Therefore, it needs to set the first window of the first activity as the focus window, that is, set the first window to the visible state, so as to ensure that the first window is displayed at the top in the future, and thus ensure that the user can see the first interface formed by the first window after it is displayed.
- WMS after WMS sets the first window as the focus window, since the first window is subsequently displayed in the first partition, WMS also needs to adjust the background color of the second partition as the window in the first partition changes. Specifically, WMS can notify LetterBox to refresh the background color of the second partition.
- LetterBox provides a mechanism for refreshing application display modes. Specifically, some applications need to maintain interface consistency and functionality across devices of different sizes. However, some devices (such as foldable devices) have different screen sizes and aspect ratios than traditional devices. Therefore, display compatibility issues arise when the application's interface design is only for traditional standard-sized screens. To solve this problem, LetterBox can fill a portion of the screen (such as a second section) to ensure that the application interface is not distorted or stretched due to differences in device screens.
- LetterBox registers a listener service with the Task management module to indicate when the first window is drawn.
- LetterBox after receiving the notification from WMS to refresh the background color of the second partition, LetterBox needs to wait for the first window to be displayed in the first partition to be drawn before it can complete the refresh task of the second partition based on the object of the first window. Therefore, LetterBox also needs to register a listener service for the completion of the drawing of the focus window with the Task management module.
- the Task management module can be used to manage and execute tasks that draw the first window.
- the Task management module returns a successful drawing response to the LetterBox, carrying the first window object.
- the Task management module After the Task management module detects and completes the drawing of the first window, it will return a drawing success message to the LetterBox based on the service registered by the LetterBox, and will also send the first window object after successful drawing.
- the contents of the first window object can be found in the previous description, and will not be repeated here.
- LetterBox when LetterBox refreshes the background color of the second section, it needs to match the first window in the first section. Therefore, LetterBox also needs to obtain the background color that matches the first window to refresh the second section. Thus, LetterBox returns the first window object to WMS, so that WMS can obtain the corresponding background color of the second section based on the first window object.
- WMS requests the background color of the second partition from ViewRootImpl, carrying the first window object.
- the WMS is triggered to request the background color of the second section from the ViewRootImpl.
- ViewRootImpl is the top-level class responsible for managing the view hierarchy. As the root node (parent class) of all views, ViewRootImpl manages the view drawing process, that is, it is responsible for triggering the measurement, layout, and drawing processes of the view to ensure that the view is displayed correctly on the screen. ViewRootImpl communicates with WMS through the internal Binder service to complete the real-time refresh display of the window.
- ViewRootImpl pre-sets multiple screen partition display strategies to determine the background color of the second partition, and then returns the background color to WMS.
- Phase 2-1 (S71-S72): Use strategy 1 (i.e., apply self-configuration) to obtain the background color of the second partition.
- ViewRootImpl determines the background color of the first application pre-configured second partition based on the first window object.
- ViewRootImpl After ViewRootImpl receives the first window object, it determines whether the first window object includes the corresponding attribute value indicating the background color of the second partition. If the corresponding attribute value exists, it determines that the first application has already configured the background color corresponding to the second partition, and then sends the background color configured by the first application to WMS, that is, executes the subsequent S72.
- the first window object includes, but is not limited to, the application package name and window identifier, and may also include, relationship attributes and screen information attributes.
- the application package name is the package name of the application to which the focused window belongs.
- the window identifier uniquely identifies the window. Relationship attributes may include properties such as ⁇ parent ⁇ and ⁇ top ⁇ , which return references to the parent window and the topmost ancestor window, respectively.
- Screen information attributes may include ⁇ screenLeft ⁇ and ⁇ screenTop ⁇ , which declare the window's position relative to the screen.
- the first window object carries the corresponding attribute value, so ViewRootImpl will use strategy 1 to obtain the background color of the second partition for application A.
- ViewRootImpl returns the background color of the second partition, which is configured by the first application, to WMS.
- ViewRootImpl obtains the second partition configured by the first application from the property value of the first window object. After setting the background color, it needs to be returned to WMS.
- Phase 2-2 (S81-S85): Use strategy 2 (i.e., electronic device pre-configuration) to obtain the background color of the second partition.
- ViewRootImpl determines the background color of the second partition that the first application has not configured itself based on the first window object.
- ViewRootImpl After ViewRootImpl receives the first window object, it determines whether the first window object includes the corresponding attribute value indicating the background color of the second partition. If the corresponding attribute value does not exist, it determines that the first application has not self-configured the background color corresponding to the second partition, and then obtains the background color pre-configured by the electronic device and sends it to WMS, that is, executes the subsequent S82-S85.
- the first window object does not carry the corresponding attribute value. Therefore, ViewRootImpl will use strategy 2 to obtain the background color of the second partition for application B.
- ViewRootImpl requests the background color of the second partition from the file parsing module based on the first window object.
- ViewRootImpl can send a request to the parsing module based on the package name of the first application carried in the first window object. This request can carry the package name of the first application, which is then used by the file parsing module to obtain the background color in the second partition corresponding to the first application.
- the file parsing module determines that the first application to which the first window belongs belongs to the first whitelist, then it obtains the pre-configured background color of the second partition.
- the file parsing module can have a pre-defined first whitelist, which contains applications that have been pre-configured with the corresponding background color for the second screen partition on the electronic device. Therefore, the file parsing module can first determine whether the first application belongs to the first whitelist. If it does, it will determine to use strategy 2 to implement the second screen partition display. Strategy 2 includes obtaining the background color of the second partition from the parsed file of the first application.
- the file parsing module returns the background color of the second partition to ViewRootImpl.
- ViewRootImpl returns the background color of the second partition pre-configured by the electronic device to WMS.
- Phase 2-3 (S91-S99): Use strategy 3 (electronic device pre-configuration overlay intelligent extraction) to obtain the background color of the second partition.
- ViewRootImpl determines the background color of the second partition that the first application has not configured itself based on the first window object.
- ViewRootImpl After ViewRootImpl receives the first window object, it determines whether the first window object includes the corresponding attribute value indicating the background color of the second partition. If the corresponding attribute value does not exist, it determines that the first application has not configured the background color corresponding to the second partition. Then, it obtains the background overlay color pre-configured by the electronic device and the intelligently extracted background base color and sends the background color formed by overlaying the two to WMS, that is, it executes the subsequent S92-S99.
- ViewRootImpl requests the background color of the second partition from the file parsing module based on the first window object.
- ViewRootImpl can send a request to the parsing module based on the package name of the first application carried in the first window object. This request can carry the package name of the first application, which is then used by the file parsing module to obtain the corresponding file name of the first application. The background color in the second section.
- the file parsing module determines that the first application mentioned in the first window belongs to the second whitelist, then it obtains the pre-configured background overlay color of the second partition.
- the file parsing module can pre-define a second whitelist. Applications on this whitelist are those for which the electronic device has pre-configured a corresponding background overlay color for the second screen partition. Therefore, the file parsing module can first determine if the first application belongs to the second whitelist. If it does, it determines to use strategy 3 to implement the second screen partition display.
- Strategy 3 includes obtaining the background overlay color for the second partition from the parsed file of the first application, and also extracting the background base color from the first window. The background color obtained by overlaying the background overlay color onto the background base color is used as the background color for the second partition.
- the file parsing module returns the background overlay color of the second partition to ViewRootImpl.
- the file parsing module can also return a strategy 3 identifier to ViewRootImpl, carrying the background overlay color of the second partition.
- This strategy 3 identifier can be used to instruct ViewRootImpl to continue extracting the background base color from the first window, and then use the background color obtained by overlaying the background base color with the background overlay color as the final background color to control the display of the second partition.
- ViewRootImpl requests the background base color of the second partition from the View management framework based on the first window.
- ViewRootImpl can send a request to the View management framework to request the background base color of the second partition corresponding to the first window. This request can carry the identifier of the first window.
- the View management framework determines the background base color based on the View of the first window.
- the first window is composed of various Views, which can be various controls, text, etc.
- the View management framework can traverse the Views in the first window and extract color values from them to serve as the background base color for the second section.
- the electronic device may select a first view that meets the following conditions and extract the background base color from the first view: the view belongs to a layer within the top N layers (e.g., 10 layers), the view is set to be visible to the user, the area occupied by the view is greater than a first value (e.g., 80%) of the area of the root view (DecorView), and the background color of the view is not empty.
- a first value e.g., 80%
- the view management framework can extract the color value from the application navigation bar/status bar as the background base color.
- the view management framework can extract the color value from that view as the background base color.
- the view management framework can select the view with the largest area from the multiple views to extract the color value as the background base color, or the view management framework can extract the color values from the multiple views respectively, perform fusion processing, and then use the resulting color value as the background base color.
- methods for extracting the background color from a View include: first converting the actual color value of the View's background color to the HSB color space; then adjusting the value of the luminance B channel in the HSB color space, for example, dividing the luminance B channel value from the range of 0% to 100% into multiple values, such as 50% and 100%; and then adjusting the actual background color value.
- Brightness B values between 0% and 50% are set to 50%
- actual brightness B values between 50% and 100% are set to 100%.
- brightness B can be divided into more segments for adjustment; this embodiment does not limit this.
- the value of the saturation S channel in the HSB color space can be adjusted, for example, setting all actual saturation S values greater than 40 to the upper limit of 40.
- the value of the hue H channel in the HSB color space can be adjusted, etc. This embodiment does not specifically limit the method of selecting a color value similar to the actual background color of the View as the background base color.
- the View management framework returns the background base color of the second partition to ViewRootImpl.
- ViewRootImpl overlays the background overlay color onto the base background color to obtain the background color of the second partition.
- the final color obtained by overlaying the background base color with the background overlay color can be used as the background color of the second partition.
- the background color obtained in this way ensures that it is similar to the color value in the first partition, improving the user's visual experience, while also ensuring that the brightness and saturation of the background color in the second partition are moderate, reducing the impact on key content in the first partition.
- ViewRootImpl returns the background color of the overlaid second partition to WMS.
- Phase 2-4 (S11-S18): Use strategy 4 (intelligent color picking only) to obtain the background color of the second partition.
- ViewRootImpl determines the background color of the second partition that the first application has not configured itself based on the first window object.
- ViewRootImpl requests the background color of the second partition from the file parsing module based on the first window object.
- the file parsing module determines that the first application to which the first window belongs is neither in the first whitelist nor in the second whitelist.
- the first whitelist and the second whitelist stored in the file parsing module can be the same list or different lists, as long as the specific application in the stored list uses either strategy 2 or strategy 3.
- the first window object does not carry the corresponding attribute value
- the electronic device does not have a preset corresponding background color or a preset corresponding background overlay color. Therefore, ViewRootImpl will use strategy 4 to obtain the background color of the second partition for application D.
- the file parsing module returns the identifier of strategy 4 to ViewRootImpl.
- the file parsing module can also return a strategy 4 identifier to ViewRootImpl, which can be used to instruct ViewRootImpl to extract the background base color from the first window and then use the background base color as the final background color to control the display of the second partition.
- a strategy 4 identifier to ViewRootImpl, which can be used to instruct ViewRootImpl to extract the background base color from the first window and then use the background base color as the final background color to control the display of the second partition.
- ViewRootImpl requests the background base color of the second partition from the View management framework based on the first window.
- the View management framework determines the background base color based on the View of the first window.
- the View management framework returns the background base color of the second partition to ViewRootImpl.
- ViewRootImpl returns the background base color of the second partition to WMS.
- Phase 3 (S21-S23): The first window is refreshed and displayed in the first partition, and the background color is refreshed and displayed in the second partition.
- WMS returns the background color of the second partition to the LetterBox.
- WMS obtains the second partition through any of the screen partitioning strategies in stages 2-1 to 2-4 mentioned above. After setting the background color for the second section, that background color will be returned to the LetterBox, allowing the LetterBox to use that background color to draw the content of the second section.
- the Task management module has already begun executing the task of drawing the first window. After drawing the first window, it writes the data of the drawn first window into the corresponding buffer. The surface flinger can read the image data in the buffer, then synthesize it into image data and send it to the display driver. This allows the display driver to control the first partition on the screen to refresh and display the first window, thereby presenting the user-visible application interface.
- the user-visible application interface can be any of the application interfaces shown in Figures 3A-3D described above.
- LetterBox begins to execute the task of drawing the content of the second partition. After completing the drawing of the second partition, it writes the drawn data of the second partition to the corresponding buffer. The surface flinger can read the image data in the buffer, then combine it into image data and send it to the display driver. This causes the display driver to control the second partition on the screen to refresh and display the corresponding background color, thereby presenting the user interface that is visible to the user.
- the user-visible application interface can be any of the interfaces shown in Figures 3A-3D described above.
- the Surface Flinger can simultaneously synthesize image data based on the data of the first window and the content of the second partition, and then send it to the display driver to achieve simultaneous refresh of the first and second partitions across the entire screen.
- the Surface Flinger can separately synthesize image data based on the data of the first window and send it to the display driver to refresh the application interface in the first partition of the screen, and separately synthesize image data based on the content of the second partition and send it to the display driver to refresh the corresponding background color in the second partition of the screen.
- This application embodiment does not limit this, and the specific implementation may depend on whether the screen of the electronic device supports partial refresh by partition.
- the method flow shown in Figure 6 above only applies to how to implement screen partition display when the first application is set to light mode. If the first application also supports dark mode, it is necessary to determine whether the current display mode of the first application is light mode or dark mode during the implementation of screen partition display. If it is light mode, the method flow shown in Figure 6 above can be executed. If it is dark mode, the background color of the second partition is directly defaulted to black or other dark colors.
- ViewRootImpl can obtain the display mode of the first application from the setting database based on the first application to which the first window belongs, in order to determine the current display mode set by the first application. If the display mode of the first application is dark mode, then the background color returned by ViewRootImpl to WMS is black or dark, rather than the background color obtained by the four strategies introduced in Figure 6. If the display mode of the first application is light mode, then the background color returned by ViewRootImpl to WMS is the background color obtained by one of the four strategies introduced in Figure 6.
- the electronic device 100 may be equipped with... Or other portable terminal devices with different operating systems, such as mobile phones, tablets, desktop computers, laptops, handheld computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices and/or smart city devices, etc.
- PDAs personal digital assistants
- AR augmented reality
- VR virtual reality
- AI artificial intelligence
- Figure 7 shows a schematic diagram of the hardware architecture of the 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 sensor module 180, a display screen 194, etc.
- the sensor module 180 may include a pressure sensor 180A and a touch sensor 180K, etc.
- the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
- AP application processor
- GPU graphics processing unit
- ISP image signal processor
- DSP digital signal processor
- NPU neural network processing unit
- the controller can be the nerve center and command center of the electronic device 100.
- the controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
- the processor 110 may also include a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the processor 110 can be used to execute the screen partition display method provided in this application, specifically as described in Figures 5-6 above, which will not be repeated here.
- the processor 110 may include one or more interfaces.
- the interfaces may include a Universal Serial Bus (USB) interface, etc.
- USB Universal Serial Bus
- the USB interface 130 is an interface compliant with the USB standard specification, specifically 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 for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100.
- the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
- Electronic device 100 implements display functions through a GPU, display screen 194, and application processor.
- the GPU is responsible for image processing.
- the microprocessor is connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations and for graphics rendering.
- the processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
- Display screen 194 is used to display images, videos, etc.
- Display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD).
- the display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microLEDs, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc.
- OLEDs organic light-emitting diodes
- AMOLEDs active-matrix organic light-emitting diodes
- FLEDs flexible light-emitting diodes
- miniled microLEDs, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc.
- electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
- the specific structure of the display screen 194 can be as shown in Figure 2 above.
- the processor 110 applies the screen partitioning display method provided in this application, it can control the display screen 194 to display the effect shown in Figures 3A-4D above, which will not be described in detail here.
- Internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). Internal memory 121 may be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121.
- Internal memory 121 may include a program storage area and a data storage area.
- the program storage area may store the operating system, application programs required for at least one function (such as sound playback, image and video playback, etc.), etc.
- the data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.).
- the external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100.
- the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
- the aforementioned memory can be used to store the implementation methods of the aforementioned four screen partition display strategies, such as a first whitelist, a second whitelist, and preset applications and corresponding background colors, or applications and corresponding background base colors, etc.
- Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals.
- pressure sensor 180A can be disposed on display screen 194.
- pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
- a capacitive pressure sensor may include at least two parallel plates with conductive material.
- Electronic device 100 determines the pressure intensity based on the change in capacitance.
- electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A.
- Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.
- touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
- Touch sensor 180K also known as a "touch panel,” can be located on display screen 194.
- the touch sensor 180K and display screen 194 together form a touchscreen, also known as a “touchscreen.”
- Touch sensor 180K detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to confirm...
- the touch event type is defined. Visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K may also be located on the surface of the electronic device 100, in a different position than the display screen 194.
- the software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
- This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
- Figure 8 shows the software architecture of the electronic device 100 according to an embodiment of this application.
- a layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.
- the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system libraries, and the kernel layer.
- the application layer can include a series of application packages.
- the application package may include applications A, B, C, D, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, etc.
- the first application can be any one of applications A, B, C, and D
- the second application can also be any one of applications A, B, C, and D.
- the first application and the second application are different.
- the application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer.
- APIs application programming interfaces
- the application framework layer includes some predefined functions.
- the application framework layer may include Activity Manager Service (AMS), Surface Flinger (SF), LetterBox, Windows Manager Service (WMS), View System Service, etc.
- AMS Activity Manager Service
- SF Surface Flinger
- WMS Windows Manager Service
- View System Service etc.
- the Activity Manager is responsible for managing the lifecycle of Activities in an application, including creation, startup, pause, resumption, and destruction, as well as events such as foreground/background switching.
- SF is primarily responsible for compositing and displaying screen content. Specifically, SF can use OpenGL and Hardware Composer to combine the drawn window data into image data, which is then displayed.
- LetterBox provides a mechanism for refreshing application display modes. Specifically, some applications need to maintain interface consistency and functionality across devices of different sizes. However, some devices (such as foldable devices) have different screen sizes and aspect ratios than traditional devices. Therefore, display compatibility issues arise when the application's interface design is only for traditional standard-sized screens. To solve this problem, LetterBox can fill a portion of the screen (e.g., a second partition) to ensure that the application interface is not distorted or stretched due to differences in device screens. In the embodiments of this application, the specific functions that LetterBox can provide can be referred to the relevant methods described in Figures 5-6 above, and will not be elaborated here.
- the window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
- a view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications.
- a display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
- the Android runtime consists of core libraries and a virtual machine.
- the Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is the Android core. Library.
- the application layer and application framework layer run in a virtual machine.
- the virtual machine executes the Java files of the application layer and application framework layer as binary files.
- the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
- System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
- surface manager e.g., media libraries
- 3D graphics processing libraries e.g., OpenGL ES
- 2D graphics engines e.g., SGL
- the Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- a 2D graphics engine is a graphics engine for 2D drawing.
- the kernel layer is the layer between hardware and software. At a minimum, the kernel layer contains a display driver, which receives image data sent by the Surface Flinger to control the screen to achieve partitioned display.
- each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form.
- the method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
- This application also provides an electronic device that may include a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method performed by the electronic device as described in any of the above embodiments.
- This application also provides a chip system including a processing circuit and an interface circuit.
- the interface circuit is used to receive computer instructions and transmit them to the processing circuit.
- the processing circuit is used to execute the computer instructions to implement the method performed by the electronic device as in any of the above embodiments.
- This application also provides a chip system including at least one processor for implementing the methods executed by the electronic device in any of the above embodiments.
- the chip system further includes a memory for storing program instructions and data, the memory being located within or outside the processor.
- a chip system can consist of chips or include chips and other discrete components.
- processors in the chip system there may be one or more processors in the chip system.
- the processor can be implemented in hardware or software.
- the processor can be a logic circuit, integrated circuit, etc.
- the processor can be a general-purpose processor, implemented by reading software code stored in memory.
- the chip system may contain one or more memories. These memories may be integrated with the processor or disposed separately; this application does not limit this.
- the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
- the chip system can be a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or a system-on-a-chip (SoC).
- SoC system-on-a-chip
- SoC can also be a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
- CPU central processing unit
- NP network processor
- DSP digital signal processor
- MCU micro controller unit
- PLD programmable logic device
- This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method executed by the electronic device in any of the above embodiments.
- This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method executed by the electronic device as described in any of the above embodiments.
- implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof.
- software When implemented using software, it can be implemented, in whole or in part, as a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
- the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media.
- the available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请提供了一种屏幕分区显示方法、图形界面及电子设备。该方法应用于包括传感器和屏幕的电子设备,该屏幕包括设置在同一面的第一分区和第二分区,第一分区不包括打孔区域,第二分区包括用于设置传感器的打孔区域。电子设备运行应用时,在第一分区显示应用的窗口,在第二分区显示与第一分区中应用的窗口相适配的背景色。该第二分区的背景色为以下一种:由第一分区中应用的开发者自配置,由电子设备为该应用预配置,由电子设备从第一分区中应用的窗口实时提取的背景基础色结合预配置的背景叠加色得到,或者由电子设备从第一分区中应用的窗口实时提取的背景基础色等。
Description
本申请涉及终端领域,尤其涉及一种屏幕分区显示方法、图形界面及电子设备。
目前,越来越多的电子设备具备屏幕和各种传感模器,若将屏幕和传感器设计在电子设备的同一面,则屏幕与传感器的设计区域存在冲突。
那么,在电子设备的同一面设置有传感器和屏幕的情况下,如何在设计空间受限的情况下,既提供一种空间利用率较大的屏幕,又能够提升屏幕的显示效果。
发明内容
本申请提供了一种屏幕分区显示方法、图形界面及电子设备。该方法应用于包括传感器和屏幕的电子设备,该屏幕包括设置在同一面的第一分区和第二分区,第一分区不包括打孔区域,第二分区包括用于设置传感器的打孔区域。电子设备运行应用时,在第一分区显示应用的窗口,在第二分区显示与第一分区中应用的窗口相适配的背景色。其中,第二分区显示的背景色为以下任意一种:由第一分区中应用的开发者自配置,由电子设备为该应用预配置,由电子设备从第一分区中应用的窗口实时提取的背景基础色结合预配置的背景叠加色得到的,或者由电子设备从第一分区中应用的窗口实时提取的背景基础色等。
第一方面,一种屏幕分区显示方法,该方法应用于包括第一屏幕的电子设备,该第一屏幕包括第一分区和第二分区,该第一分区不包括打孔区域,该第二分区包括打孔区域,该方法包括:运行第一应用时,在该第一分区显示该第一应用提供的第一窗口,在该第二分区显示第一背景,该第一背景的色彩值和该第一窗口中第一视图的色彩值相同或相近;其中,该第一视图满足以下一个或多个条件:该第一视图在该第一窗口中的图层数为第N层以上,该第一视图处于可见状态,该第一视图的面积大于第一值,或者,该第一视图的背景非空;接收到第一操作,运行第二应用;运行该第二应用时,在该第一分区中显示该第二应用的第二窗口,在该第二分区中显示第二背景,该第二背景的色彩值和该第二窗口中第二视图的色彩值相同或相近。
实施第一方面描述的方法,通过充分利用电子设备的设计区域,提供几近全屏显示的能力。弱化屏幕中用于设置传感器的打孔区域对显示效果的影响。具体的,将屏幕划分为包含打孔区域的第二分区和不含打孔区域的第一分区,然后分区显示不同内容,并且使得第二分区的背景色与第一分区中应用窗口相适配,既弱化屏幕分区间的割裂感以营造全屏联合显示效果。
结合第一方面描述的方法,该第一背景仅包含色彩元素,不包含图案元素。
这样,可以避免第二分区的显示元素过于复杂,分散用户的注意力,帮助用户聚焦关键的第一分区的内容,不影响用户的主任务交互。
结合第一方面描述的方法,该第一窗口用于显示以下一项:社交类应用的主页、社交
类应用的聊天页面、社交类应用的设置页面、音乐类应用的主页、音乐类应用的播放界面、音乐类应用的设置界面、视频类应用的主页、视频类应用的播放界面、视频类应用的设置界面、购物类应用的主页、购物类应用的播放界面或者购物类应用的设置界面。
这样,电子设备在第一分区显示任意的应用界面时,第二分区的背景色均可以与第一分区的应用相适配,扩展了本方案的应用场景。
结合第一方面描述的方法,该第一背景的色彩值为该第一应用配置的第一预设值。
这样,电子设备可以为第三方应用提供自配置第二分区背景色的接口,支持第三方应用开发者自定义第二分区中的背景色,从而带来全屏联合显示应用窗口的效果,提升用户的视觉体验。
结合第一方面描述的方法,在该第一应用配置有第一预设值的情况下,该第一背景的色彩值为该第一预设值。在该第一分区显示该第一应用提供的第一窗口之前,通过绘制该第一窗口获取该第一窗口的对象;在该第二分区显示第一背景之前,基于该第一窗口的对象中包含的第一属性值确定该第一背景的色彩值为该第一应用配置的第一预设值。
这样,第一应用的开发人员可以为应用的窗口配置对应的第二分区的背景色。
结合第一方面描述的方法,该第一背景的色彩值为该电子设备配置的第二预设值。
这样,电子设备的开发人员可以预配置应用对应的第二分区的背景色,保证在第一应用的开发人员没有自配置第二分区的背景色的情况下,仍然可以在第二分区显示与第一分区中第一应用相适配的背景色,提升用户的视觉体验。
结合第一方面描述的方法,在该第一应用未配置第一预设值并且该电子设备配置有第二预设值的情况下,该第一背景的色彩值为该第二预设值。该电子设备预置第一白名单,并且,预置该第一白名单中的应用对应的该第二预设值,该方法还包括:在该第一分区显示该第一应用提供的第一窗口之前,通过绘制该第一窗口获取该第一窗口的对象;在该第二分区显示第一背景之前,确定该第一窗口的对象中未包含第一属性值,该第一属性值对应该第一背景的色彩值,并且,确定该第一应用属于该第一白名单,则确定该第一背景的色彩值为该第二预设值。
这样,可以优先采用第一应用自配置的第二分区的背景色,从而优先保证第一应用提供的联合整套的显示效果,但当第一应用没有自配置时,则可以采用电子设备预配置的第二分区的背景色,从而全方位保证第二分区的背景色与第一分区中的第一应用的显示效果相适配。
结合第一方面描述的方法,该第二预设值是,在第三色彩值之上叠加第四色彩值后得到的,该第三色彩值为纯色,该第四色彩值为亮度渐变的白色。
这样,通过在纯色的基础上叠加亮度渐变的白色,将第一分区和第二分区的显示效果做出轻微区别,既不会带给用户视觉割裂感,又能保证一定的视觉融合体验。
结合第一方面描述的方法,该第一背景的色彩值为,根据该电子设备配置的第三预设值和根据该第一窗口中第一视图的色彩值确定。
这样,可以避免从第一窗口的第一视图中智能提取的色彩过于单调,进而叠加电子设备预置的第三预设值,可以带给用户丰富的视觉体验。
结合第一方面描述的方法,在该第一应用未配置第一预设值、该电子设备未配置第二
预设值并且该电子设备配置有第三预设值的情况下,该第一背景的色彩值为,根据该电子设备配置的第三预设值和根据该第一窗口的色彩值确定。该电子设备预置第一白名单和第二白名单,并且,预置该第一白名单中的应用对应的该第二预设值,预置该第二白名单中的应用对应的该第三预设值,该方法还包括:在该第一分区显示该第一应用提供的第一窗口之前,通过绘制该第一窗口获取该第一窗口的对象;在该第二分区显示第一背景之前,确定该第一窗口的对象中未包含第一属性值,该第一属性值对应该第一背景的色彩值,并且,确定该第一应用不属于该第一白名单且属于该第二白名单,则确定该第一背景的色彩值为,根据该第三预设值和根据该第一窗口中第一视图的色彩值确定。
这样,优先采用第一应用自配置的第二分区的背景色,第一应用未自配置则采用电子设备预配置的第二分区的背景色,若电子设备仅预配置的第二分区的背景叠加色(即第三预设值),则还需要从第一应用的第一窗口中智能提取背景基础色,如此可以全方位的保证第二分区的背景色能够随着第一分区中的应用动态适配。
结合第一方面描述的方法,该第一背景的色彩值为在第三色彩值之上叠加该第三预设值后得到的,该第三色彩值为根据该第一窗口中第一视图的色彩值确定的纯色,该第三预设值为亮度渐变的白色。
这样,通过在纯色的基础上叠加亮度渐变的白色,将第一分区和第二分区的显示效果做出轻微区别,既不会带给用户视觉割裂感,又能保证一定的视觉融合体验。
结合第一方面描述的方法,该第一窗口中的第一视图为第四色彩值;该第三色彩值为通过调整该第四色彩值的亮度确定,当该第四色彩值的亮度大于第二值(例如0%)并且小于第三值(例如50%)时,则该第三色彩值的亮度为该第三值,当该第四色彩值的亮度属于大于或等于该第三值,并且小于第四值(例如100%)时,则该第三色彩值的亮度为该第四值。
这样,在从第一窗口的第一视图中提取背景基础色时,可以选取与第一视图的色彩值相近似的色彩值作为背景基础色,这样可以使得第二分区的背景色与第一分区相近但有轻微区别,从而不会过于干扰用户关注第一分区中的关键信息。
结合第一方面描述的方法,该第一背景的色彩值为根据该第一窗口中第一视图的色彩值确定。
结合第一方面描述的方法,在该第一应用未配置第一预设值、该电子设备未配置第二预设值并且该电子设备未配置第三预设值的情况下,该第一背景的色彩值根据该第一窗口中第一视图的色彩值确定。该电子设备预置第一白名单和第二白名单,并且,预置该第一白名单中的应用对应的该第二预设值,预置该第二白名单中的应用对应的该第三预设值,该方法还包括:在该第一分区显示该第一应用提供的第一窗口之前,通过绘制该第一窗口获取该第一窗口的对象;在该第二分区显示第一背景之前,确定该第一窗口的对象中未包含第一属性值,该第一属性值对应该第一背景的色彩值,并且,确定该第一应用不属于该第一白名单且不属于该第二白名单,则根据该第一窗口中第一视图的色彩值确定该第一背景的色彩值。
这样,可以全方位的保证第二分区的背景色能够随着第一分区中的应用动态适配。
结合第一方面描述的方法,该第一窗口中的第一视图为第四色彩值;该第一背景的色
彩值为通过调整该第四色彩值的亮度确定,当该第四色彩值的亮度大于第二值并且小于第三值时,则该第一背景的色彩值的亮度为该第三值,当该第四色彩值的亮度属于大于或等于该第三值,并且小于第四值时,则该第一背景的色彩值的亮度为该第四值。
这样,在从第一窗口的第一视图中提取背景基础色时,可以选取与第一视图的色彩值相近似的色彩值作为背景基础色,这样可以使得第二分区的背景色与第一分区相近但有轻微区别,从而不会过于干扰用户关注第一分区中的关键信息。
结合第一方面描述的方法,在该第二分区中显示该第一背景之前,该方法还包括:确定该第一应用的显示模式被设置为浅色模式。
由于深色模式下,第一分区中第一应用的界面的显示模式均为深色,无需对第二分区的背景色做额外的处理,随第一分区显示深色即可,只有在第一应用的显示模式为浅色模式时,才采用前述显示方法控制第二分区的背景色。
结合第一方面描述的方法,在该第二分区显示第一背景时,该方法还包括:在该第二分区中还显示该电子设备的状态信息。
这样,采用第二分区显示对屏幕的规则度完整度要求不高的内容,如电子设备的状态信息,可以避免打孔区域对显示内容的影响。
结合第一方面描述的方法,在运行第一应用之前,该方法还包括:在该第一分区和该第二分区中显示桌面的背景,在该第一分区中还显示该桌面的应用图标,在该第二分区中还显示该电子设备的状态信息。
这样,在电子设备显示桌面是,可以通过第一分区和第二分区联合显示桌面背景。
结合第一方面描述的方法,在获取第一应用对应的该第二分区中的第一色彩值之前,该方法还包括:检测到该第一窗口切换为焦点窗口。
这样,可以及时检测到第一分区中将要切换应用的窗口,从而及时调整第二分区的背景色,保证屏幕分区显示效果的实时性和有效性。
结合第一方面描述的方法,该第一屏为该电子设备的外屏。
第二方面,本申请提供了一种电子设备,包括一个或多个存储器,一个或多个处理器,以及存储在该存储器上的计算机程序,显示屏,该处理器执行该计算机程序以实现第一方面中任一项所描述的步骤。
第三方面,本申请提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时以实现第一方面中任一项所描述的步骤。
第四方面,本申请提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序被处理器执行时以实现第一方面中任一项所描述的步骤。
图1为本申请实施例提供的一种屏幕结构的示意图;
图2为本申请实施例提供的另一种屏幕结构的示意图;
图3A-图3D为本申请实施例提供的几种显示策略对应的屏幕分区显示效果示意图;
图4A-图4D为本申请实施例提供的另一种屏幕分区显示效果示意图;
图5为本申请实施例提供的一种屏幕分区显示方法流程示意图;
图6为本申请实施例提供的一种屏幕分区显示方法的OS交互流程示意图;
图7为本申请实施例提供的电子设备的硬件架构示意图;
图8为本申请实施例提供的电子设备的软件架构示意图。
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在本申请中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本申请所描述的实施例可以与其它实施例相结合。
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接收形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
目前,用户对电子设备中传感器的功能、数量等的需求较高,为此,传感器在电子设备中的设计区域越来越大,相应的,导致屏幕在电子设备中的设计区域受到了限制。以传感器为电子设备的摄像头,屏幕为电子设备的外屏为例,该外屏的设计区域受到摄像头的限制,具体可参考图1。
图1示例性示出一种屏幕结构。
图1所示的电子设备为可折叠的电子设备,该电子设备的屏幕包括内屏和外屏,内屏是指电子设备处于展开状态时所运行的屏幕,外屏是指电子设备处于折叠状态时所运行的屏幕。在外屏和摄像头均设置在电子设备的同一面(即外壳所在的一面)的情况下,为了既保证摄像功能的正常实现,又保证摄像头不影响外屏的显示效果,则采用摄像头所在区域以外的,规则且完整的区域作为外屏的设计区域。其中,规则区域特指例如矩形、圆形等的区域,完整的区域是指无孔洞的单联通区域,这样才可以保证显示效果的完整性和规则性。
图1仅以一个示例性的场景来介绍该种屏幕设计方法,类似的,在电子设置其他类型的传感器、屏幕的场景下,若传感器和屏幕需要设计在电子设备的同一面,均可能采用如图1所示的屏幕设计方法,在此暂不一一举例。
基于图1所示的屏幕设计可知,在电子设备的传感器与屏幕的设计区域存在冲突的情况下,虽然图1所示的屏幕设计可以提供规则的显示区域,但是该屏幕设计没能充分利用电子设备的设计区域,即,没有充分利用摄像头的周边区域,这样设计出的屏幕较小,带给用户的交互体验不佳。
为了解决图1所示的屏幕结构所存在的问题,本申请提供了另一种改进后的屏幕结构。接下来,结合图2来介绍本申请提供的屏幕分区显示方法所涉及的屏幕结构。
图2示例性示出另一种屏幕结构。
如图2所示,本申请提供的显示方法应用于电子设备100。该电子设备100的屏幕包括内屏和外屏(又称第一屏幕),内屏是指电子设备100处于展开状态时所运行的屏幕,外屏是指电子设备100处于折叠状态时所运行的屏幕。对比图1和图2中的屏幕设计可知,图2中的屏幕设计充分利用了可设计空间,将外屏的设计面积延展至传感器的四周。在提供较大外屏的基础上,也带来了外屏的显示效果上的挑战。即,虽然外屏的面积更大,但是外屏并非一个完整的区域,其中包含孔/洞,外屏被挖孔/洞则会影响屏幕中内容被完整、规则的显示。
基于此,在扩展外屏面积的基础上,为了进一步避免外屏中用于设置传感器的孔/洞影响显示内容的完整性,本申请进一步将外屏划分为多个区域,然后分区显示不同类型的内容,从而尽可能的减少屏外屏中的孔/洞对显示内容完整性的影响。可选的,可将外屏划分为第一分区和第二分区,第一分区为单联通区域(即无孔区域),第二分区为多联通区域(即有孔/洞区域),第二分区中的孔/洞用于设置传感器,在电子设备运行应用时,采用第一分区显示对屏幕的规则度完整度要求较高的内容,如应用界面,采用第二分区显示对屏幕的规则度完整度要求不高的内容,如电子设备的状态信息(具体可参见后文对图3A-图3D的描述),这样的屏幕分区显示方法可以避免打孔区域处的传感器对屏幕显示内容的影响。关于具体的屏幕分区显示方法可以参考下文对图5-图6的介绍,关于屏幕分区显示的用户界面可以参考后文图3A-图4D的UI实施例。
图2仅示例性示出本申请提供的一种屏幕设计,不应构成对本申请的限制,本申请提供的屏幕分区显示方法还可以应用在其他屏幕设计中,具体如下:
在本申请提供的其他屏幕设计中,第二分区和第一分区的划分方向除了纵向划分外还可以横向划分,屏幕的分区划分方向具体取决于传感器的打孔区域的排布方向,若打孔区域为纵向排布,则第二分区和第一分区可以纵向划分;若打孔区域为横向排布的,则第二分区和第一分区可以横向划分。
在本申请提供的其他屏幕设计中,屏幕中的打孔区域的数量还可以是一个或更多个,打孔区域的数量具体取决于对传感器的设计,若打孔区域为一个,则该一个打孔区域可用于设置一个传感器或者可用于设置集成为一体的多个传感器;若打孔区域为多个,则每个打孔区域均可用于设置一个或多个传感器。
在本申请提供的其他屏幕设计中,采用分区设计的屏幕除了外屏以外还可以是内屏,也可以是没有内外屏之分的电子设备100的屏幕(如非折叠式电子设备100的屏幕)。虽然,通常情况下,电子设备100的内屏所在面中所设置的传感器的数量较少、区域较小,即电子设备100内屏所在面的传感器几乎不影响内屏的显示效果,故无需对内屏采用本申请提供的屏幕分区显示方法。但是,在特殊情况下,若电子设备100的内屏所在面中设置的传感器的数量较多、区域较大,则可以采用本申请提供的屏幕分区显示方法。总之,对于传感器和屏幕的设计区域存在冲突的情况,均可以采用本申请提供的屏幕分区设计和屏幕分区显示方法。
基于前述对图2中屏幕分区结构的介绍可知,仅将屏幕进行分区显示不同类型内容时,虽然可以避免打孔区域的传感器影响屏幕显示内容的完整性,但是,分区可能因为显示不同类型的内容而出现视觉割裂感,或者出现混淆用户关注的内容的问题等。在此基础上,为了进一步提高屏幕分区显示效果,还需进一步改进第二分区的显示效果(例如背景色),旨在既能够带给用户全屏联合显示的视觉体验,增强视觉美感,弱化第二分区与第一分区的割裂感;又可以让用户聚焦第一分区中显示的主任务,弱化第二分区对第一分区的影响。
综上所述,为了解决前述问题,本申请提供了一种屏幕分区显示方法、图形界面及电子设备。该方法应用于包括传感器和屏幕的电子设备,该屏幕包括设置在同一面的第一分区和第二分区,第一分区不包括打孔区域,第二分区包括用于设置传感器的打孔区域。电子设备运行应用时,在第一分区显示应用的窗口,在第二分区显示与第一分区中应用的窗口相适配的背景色。其中,第二分区显示的背景色为以下任意一种:由第一分区中应用的开发者自配置,由电子设备为该应用预配置,由电子设备从第一分区中应用的窗口实时提取的背景基础色结合预配置的背景叠加色得到的,或者由电子设备从第一分区中应用的窗口实时提取的背景基础色等。
接下来,先介绍本申请涉及的一些相关概念。
传感器:可以包括一个或多个图像传感器(即摄像头),环境光传感器,或者接近光传感器等等。
屏幕:电子设备可以仅配置一个屏幕;或者,当电子设备为折叠式设备时,可以配置两个屏幕,例如,以上下折叠式的电子设备为例,则可以配置内外两个屏幕;或者,当电子设备为折叠式设备时,还可以配置三个屏幕,例如,以左右折叠的电子设备为例,可以配置外屏和内屏,内屏又包括左右两个屏幕。总之,本申请实施例对电子设备的屏幕数量,屏幕是否折叠,以及折叠形式等均不作限制。
第一分区和第一分区:是指一个屏幕中包含的相互连接且互不重叠的两个子区域,关于该两个区域的结构,具体可以参考下文对图2示例性示出的外屏分区结构的描述,在此暂不赘述。
打孔区域是指屏幕中第二分区中的孔/洞,第二分区相当于数理概念中多联通区域,第二分区中的打孔区域相当于数理概念中多联通区域中的孔/洞。
应用的窗口:是指电子设备在运行应用时,构成第一分区中应用界面的窗口,该窗口通过在第一分区中显示以形成用户可视的应用界面。应用界面包括但不限于:主界面(又称一级界面)、二级界面、三级界面等等,每当用户切换应用界面时,电子设备均需通过切换焦点窗口(即,包括将旧的应用界面对应的窗口设置为不可见状态,将新的应用的界面对应的窗口设置为可见状态)来实现切换显示新的用户界面。
背景色:是指在第一分区中显示的界面元素中作为底层的颜色,其可以是单一色彩(即本申请实施例中所述的背景基础色),也可以是由多种色彩组合而成的色彩(即本申请实施例中所述的背景基础色结合背景叠加色得到色彩)。
电子设备的状态信息:是指在第二分区中显示的时间、日期等信息。
实施本申请提供的显示方法、图形界面及电子设备后,可以带来以下有益效果:
(1)充分利用电子设备的设计区域,兼容设计屏幕和传感器,既保证传感功能的正常实现,又提供几近全屏显示的能力。具体的,在屏幕中进行打孔,将传感器设置在打孔区域处,便可以将传感器周围的区域拓展为屏幕的设计区域。
(2)弱化屏幕中传感器对显示效果的影响。具体的,将屏幕划分为包含打孔区域的第二分区和不含打孔区域的第一分区,然后分区显示不同内容,包括采用第一分区显示对屏幕的规则度完整度要求较高的内容(如应用界面),采用第二分区显示对屏幕的规则度完整度要求不高的内容(如电子设备的状态信息)。
(3)为第三方应用提供自配置第二分区背景色的接口,支持第三方应用开发者自定义第二分区中的背景色,从而带来全屏联合显示应用窗口的效果,提升用户的视觉体验。
(4)为第二分区预配置与第一分区中应用相匹配的背景色,或者从第一分区中应用智能提取相似色作为第二分区的背景色,从而使得第二分区可以适配第一分区中应用窗口的显示效果,既弱化屏幕分区间的割裂感以营造全屏联合显示效果,又可以聚焦关键分区的内容不影响用户的主任务交互。
接下来,结合图3A-图3D示例性示出几种显示策略对应的屏幕分区显示效果。
图3A示例性示出一组应用自配置第二分区中背景色的用户界面。
图3A的a示出用户界面31,该用户界面31为电子设备100外屏显示的主界面。该主界面包括第一分区和第二分区,第一分区和第二分区联合显示系统主题的背景,并且第一分区显示有应用图标,第二分区显示有电子设备的状态信息(暂时仅以时间为例示出)。
若电子设备100接收到作用于图3A的a中所示的应用A的图标上的操作,响应于该操作,电子设备则在第一分区中显示应用A的界面。若该应用A还自配置了第二分区的背景色,则电子设备100还会在第二分区中显示应用A自配置的背景色,具体如下文描述的图3A的b所示的用户界面32。
其中,应用A自配置第二分区的背景色是指,由应用A的开发商/开发人员,在开发应用A或者更新应用A时,在该应用的安装包中配置了对应的第二分区背景色,当电子设备100安装并运行该应用A后,则在第二分区中显示应用A对应的背景色。该应用A可以是第三方应用或者系统应用,本申请实施对此不作限制。
图3A的b示出用户界面32,该用户界面32为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用A的界面,且该应用A的界面中大多数控件的背景为白色,第二分区则按照应用A自配置的白色作为背景色(又称第一背景色)显示。可选的,电子设备为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示黑色(相应的色彩值又称第一预设值,可以是饱和度为42亮度为26%色相为FFFFFF)的时间等,从而保证用户可以准确读取到电子设备的状态信息。
图3A所示的应用自配置第二分区的背景色的显示效果仅为示例,不同应用自配置的第二分区的背景色可能不同,但是,第二分区的背景与第一分区的风格相似,这里仅以应用A显示的白色为例来介绍,不应构成对本申请的限制。可选的,应用A除了自配置二分区背景色以外,还可以配置第二分区中文本的格式等,本申请实施例对此不作限制,在此暂不一一赘述。
图3B示例性示出一组电子设备预配置第二分区中背景色的用户界面。
图3B的a示出用户界面33,该用户界面33为电子设备100外屏显示的界面,该界面与前述图3A中b示出的用户界面32相同,关于对该界面的介绍可参考前文的描述,在此暂不赘述。
若电子设备100接收到用于从应用A切换至应用B的操作(又称第一操作),响应于该操作,电子设备在第一分区中切换至显示应用B的界面,若该应用B未自配置了第二分区的背景色,且电子设备100预配置了应用B对应的第二分区的背景色,则电子设备100还会在第二分区中显示电子设备100预配置的应用B对应的背景色,具体如下文描述的图3B的b所示的用户界面34。
其中,电子设备预配置应用B对应的第二分区的背景色是指,由电子设备100的开发人员,在开发电子设备/更新电子设备系统时,为应用B配置的对应的第二分区的背景色。可选的,可以使用可扩展标示语言(Extensive Markup Language,XML)为应用B配置XML文件,在该XML文件中存储应用B对应的第二分区的背景色,后续电子设备100的开发人员可以远程更新应用B的XML文件,以实现更新应用B对应的第二分区的背景色。
图3B的b示出用户界面34,该用户界面34为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用B的界面,且该界面中较大控件的背景的色彩值为A,第二分区中显示的背景色(又称第二背景色)变为在色彩值A之上叠加色彩值a后形成的色彩值。其中,应用B的界面中的各个控件可通过绘制相应的视图(View)来实现。可选的,电子设备为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示黑色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
其中,电子设备100预配置的背景色可以包括:背景基础色即色彩值A(又称第三色彩值),和背景叠加色即色彩值a(又称第四色彩值);或者,电子设备100预置的背景色,为色彩值A之上叠加色彩值a后形成的最终色彩值(又称第二预设值)。其中,色彩值A可以是单一的纯色,图3B中以填充间隔均匀的斜线图案来表征色彩值A,该色彩值A与对应的应用B的界面中的色彩值相同。色彩值a可以是具有亮度渐变效果的色彩值,图3B
中以填充间隔由密到疏的横线图案来表征色彩值a,色彩值a例如是亮度渐变的白色。这样,色彩值A之上叠加色彩值a后,不仅可以保留基础的色彩值A的信息,还能够通过覆盖的亮度渐变效果,将第二分区与第一分区进行轻微的区别显示,既可以避免两个分区的割裂感,又可以帮助用户聚焦第一分区中的关键任务。可以理解的,电子设备预先配置的背景色中所包含的背景基础色可能与应用B中的色彩A完全一致,也可能与应用B中的色彩A相近似,本申请实施例对此不作限制。
图3B所示的电子设备预配置的第二分区的背景色的显示效果仅为示例,电子设备100可以从显示除用户界面33以外的其他用户界面中切换至显示用户界面34,电子设备100也可以对不同应用预置相同的背景色,或者预置不同的背景色,或者预置相同的背景叠加色结合不同的背景基础色等,这里仅以为应用B预置色彩A叠加色彩a为例来介绍,不应构成对本申请的限制。可选的,电子设备100除了预配置应用B对应的第二分区背景色以外,还可以预配置应用B对应的第二分区中文本的格式等,本申请实施例对此不作限制,在此暂不一一赘述。
图3C示例性示出一组电子设备预配置结合智能提取出的第二分区中背景色的用户界面。
图3C的a示出用户界面35,该用户界面35为电子设备100外屏显示的界面,该界面与前述图3B中b示出的用户界面34相同,关于对该界面的介绍可参考前文的描述在此暂不赘述。
若电子设备100接收到用于从应用B切换至应用C的操作(又称第一操作),响应于该操作,电子设备在第一分区中切换至显示应用C的界面,若该应用C未自配置第二分区的背景色,且电子设备100仅预配置了应用C对应在第二分区的背景叠加色(又称第三预设值),则电子设备100还会从第一分区中显示的应用C的界面中提取对应的第二分区的背景基础色,然后将提取的背景基础色结合预配置的背景叠加色,作为在第二分区中显示的背景色,具体如下文描述的图3C的b所示的用户界面36。
图3C的b示出用户界面36,该用户界面36为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用C的界面,且该界面中较大控件的背景的色彩值为B,第二分区显示的背景色变为在色彩值B’之上叠加色彩值b后形成的色彩值。可选的,电子设备为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示黑色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
其中,色彩值B’为电子设备从第一分区中应用C的界面中的色彩B中提取的,色彩值B’可以是单一的纯色,图3C中以填充间隔均匀且稀疏的竖线图案来表征色彩值B,以填充间隔均匀且紧密的竖线图案来表征色彩值B’,该色彩值B’与色彩值B相近似,关于电子设备从应用C中的色彩值B中提取色彩值B’的方式,可以参考后文方法实施例的描述,在此暂不赘述。色彩值b可以是具有亮度渐变效果的色彩值,该色彩值b可以与前述色彩值a相同或者不同,图3C中以填充间隔由密到疏的横线图案来表征色彩值b,色彩值b例如是亮度渐变的白色。这样,色彩值B’之上叠加色彩值b后,不仅可以保留基础的色彩值B’
的信息,还能够通过覆盖的亮度渐变效果,将第二分区与第一分区进行轻微的区别显示,既可以避免两个分区的割裂感,又可以帮助用户聚焦第一分区中的关键任务。
图3C所示的电子设备预配置结合智能提取出的第二分区的背景色的显示效果仅为示例,电子设备100可以从显示除用户界面35以外的其他用户界面中切换至显示用户界面36,并且,电子设备100可以对不同应用预置相同的背景叠加色或者预置不同的背景叠加色等,这里仅以为应用C预置应用色彩值b为例来介绍,不应构成对本申请的限制。可选的,电子设备除了预配置应用C对应的第二分区背景叠加色以外,还可以预配置应用C对应的第二分区中文本的格式等,本申请实施例对此不作限制,在此暂不一一赘述。
图3D示例性示出一组电子设备智能提取出的第二分区中背景色的用户界面。
图3D的a示出用户界面37,该用户界面37为电子设备100外屏显示的界面,该界面与前述图3C中b示出的用户界面36相同,关于对该界面的介绍可参考前文的描述在此暂不赘述。
若电子设备100接收到用于从应用C切换至应用D的操作,响应于该操作,电子设备在第一分区中切换至显示应用D的界面,若该应用D未自配置第二分区的背景色,且电子设备100也未预配置应用D对应的第二分区的背景色,则电子设备100会从第一分区中显示的应用D的界面中提取对应的第二分区的背景基础色,然后将提取的背景基础色作为在第二分区中显示的背景色,具体如下文描述的图3D的b所示的用户界面38。
图3D的b示出用户界面38,该用户界面38为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用D的界面,且该界面中较大控件的背景的色彩值为C(又称第四色彩值),第二分区显示的背景色为色彩值C’(又称第三色彩值)。可选的,电子设备为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示黑色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
可选的,色彩值C’为电子设备从第一分区中应用D的界面中的提取的。其中,色彩值C’可以是单一的纯色,图3D中以填充间隔均匀且稀疏的竖线图案来表征色彩值C,以填充间隔均匀且紧密的竖线图案来表征色彩值C’,该色彩值C’与色彩值C相近似,关于电子设备从应用D中的色彩值C中提取色彩值C’的方式,可以参考后文方法实施例的描述,在此暂不赘述。
图3D所示的电子设备智能提取的第二分区的背景色的显示效果仅为示例,电子设备100可以从显示除用户界面37以外的其他用户界面中切换至显示用户界面38,这里仅以从显示应用C的用户界面37切换至显示应用D的用户界面38为例来介绍,不应构成对本申请的限制。
在本申请实施例中,电子设备100的显示模式包括浅色模式(Light Mode)和深色模式(Dark Mode),电子设备100可以基于用户操作、环境光或者时间等来切换显示模式。其中,浅色模式是指,电子设备100显示的背景以白色或者其他浅色为主,搭配黑色或深色的文字和图形元素。深色模式是指,电子设备100显示的背景以黑色或暗色为主,配以
白色或浅色的文字和图形元素。
前述图3A-图3D均以电子设备100应用浅色模式的情况下,电子设备100采用屏幕分区显示的效果。而当电子设备100应用深色模式的情况下,电子设备100的第二分区的背景色始终为黑色或者深色,具体可参考下文对图4A-图4D的介绍。
图4A示例性示出一组在深色模式下电子设备100采用屏幕分区显示的效果。
图4A的a示出用户界面41,该用户界面41为电子设备100外屏显示的主界面。该主界面包括第一分区和第二分区,第一分区和第二分区联合显示系统主题的背景,并且第一分区显示有应用图标,第二分区显示有电子设备的状态信息(暂时仅以时间为例示出),可选的,当电子设备100的系统显示模式被设置为浅色模式时,则主界面的显示效果如图4A的a所示;当电子设备100的系统显示模式被设置为深色模式时,则主界面的显示效果与图4A的a不同(图4A中暂未示出)。
若电子设备100接收到作用于图4A的a中所示的应用A的图标上的操作,响应于该操作,电子设备100则在第一分区中显示应用A的界面。若该应用A被设置为深色模式,尽管该应用A自配置了第二分区的背景色,电子设备100仍然会在第二分区中显示黑色背景,而非显示应用A自配置的背景色,具体如下文描述的图4A的b所示的用户界面42。
可选的,应用A被设置为深色模式/浅色模式的方式包括但不限于:
(1)在应用开启跟随系统的功能的情况下,当电子设备100的系统被设置为深色模式时,应用A自动跟随系统的显示模式而设置为深色模式,当电子设备100的系统被设置为浅色模式时,应用A自动跟随系统的显示模式而设置为浅色模式。
(2)在应用关闭跟随系统的功能的情况下,无论系统的显示模式被设置为深色模式/浅色模式,应用A均根据用户的操作来设置应用A的显示模式,当用户开启应用A的深色模式时,应用A的显示模式则被设置为深色模式,应用A的显示模式不再随系统的显示模式变化;当用户开启应用A的浅色模式时,应用A的显示模式则被设置为浅色模式,应用A的显示模式不再随系统的显示模式变化。图4A的a仅以系统设置为浅色模式,应用A关闭跟随系统功能且被设置为深色模式的场景为例示出。若在系统被设置为深色模式,应用A关闭跟随系统功能且被设置为深色模式的场景下,虽然电子设备100显示深色的主界面,该深色的主界面不同于与图4A中所示的浅色模式下的主界面,但是应用A的界面的显示效果与图4A中的b所示出的效果相同,具体也如下文描述的图4A的b所示的用户界面42。
图4A的b示出用户界面42,该用户界面42为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用A的界面,且该应用A的界面的背景为黑色,第二分区则按照深色模式下对应的黑色背景色来显示。可选的,电子设备100为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示白色(相应的色彩值可以是饱和度为3D亮度为24%色相为#000000)的时间等,从而保证用户可以准确读取到电子设备的状态信息。
图4A所示的深色模式下电子设备100采用屏幕分区显示的效果仅为示例,在深色模式下第一分区中不同应用的背景色可能不同,比如,第二分区的背景还可以是灰色,这里仅以应用A显示的黑色背景,第二分区也显示黑色背景为例来介绍,不应构成对本申请的
限制。
图4B示例性示出另一组在深色模式下电子设备100采用屏幕分区显示的效果。
图4B的a示出用户界面43,该用户界面43为电子设备100外屏显示的界面,该界面与前述图4A中b示出的用户界面42相同,关于对该界面的介绍可参考前文的描述,在此暂不赘述。
若电子设备100接收到用于从应用A切换至应用B的操作,响应于该操作,电子设备100在第一分区中切换至显示应用B的界面,若该应用B设置深色模式,则尽管应用B未自配置第二分区的背景色,且电子设备100预配置了应用B对应的第二分区的背景色,电子设备100仍然会在第二分区中显示黑色背景,具体如下文描述的图4B的b所示的用户界面44。
其中,关于应用B被设置为深色模式/浅色模式的方式可以参考前文描述的,应用A被设置为深色模式/浅色模式的方式,在此暂不赘述。
图4B的b示出用户界面44,该用户界面44为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用B的界面,且该应用B的界面的背景为黑色,第二分区则按照深色模式下对应的黑色背景色来显示。可选的,电子设备100为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示白色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
图4B所示的深色模式下电子设备100采用屏幕分区显示的效果仅为示例,在深色模式下第一分区中不同应用的背景色可能不同,比如,第二分区的背景还可以是灰色这里仅以应用B显示的黑色背景,第二分区也显示黑色背景为例来介绍,不应构成对本申请的限制。
图4C示例性示出另一组在深色模式下电子设备100采用屏幕分区显示的效果。
图4C的a示出用户界面45,该用户界面45为电子设备100外屏显示的界面,该界面与前述图4B中b示出的用户界面44相同,关于对该界面的介绍可参考前文的描述在此暂不赘述。
若电子设备100接收到用于从应用B切换至应用C的操作,响应于该操作,电子设备在第一分区中切换至显示应用C的界面,若该应用C设置了深色模式,尽管应用C未自配置第二分区的背景色,且电子设备100仅预配置了应用C对应在第二分区的背景叠加色,电子设备100仍然会在第二分区中显示黑色背景,而非从第一分区中显示的应用C的界面中提取对应的第二分区的背景基础色,然后将提取的背景基础色结合预配置的背景叠加色,作为在第二分区中显示的背景色,具体如下文描述的图4C的b所示的用户界面46。
其中,关于应用C被设置为深色模式/浅色模式的方式可以参考前文描述的,应用A被设置为深色模式/浅色模式的方式,在此暂不赘述。
图4C的b示出用户界面46,该用户界面46为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用C的界面,且该应用C的界面的背景为黑色,第二分区则按照深色模式下对应的黑色背景色来显示。可选的,电子设备100为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示
白色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
图4C所示的深色模式下电子设备100采用屏幕分区显示的效果仅为示例,在深色模式下第一分区中不同应用的背景色可能不同,比如,第二分区的背景还可以是灰色这里仅以应用C显示的黑色背景,第二分区也显示黑色背景为例来介绍,不应构成对本申请的限制。
图4D示例性示出另一组在深色模式下电子设备100采用屏幕分区显示的效果。
图4D的a示出用户界面47,该用户界面47为电子设备100外屏显示的界面,该界面与前述图4C中b示出的用户界面46相同,关于对该界面的介绍可参考前文的描述在此暂不赘述。
若电子设备100接收到用于从应用C切换至应用D的操作,响应于该操作,电子设备100在第一分区中切换至显示应用D的界面,若该应用D被设置为深色模式,尽管该应用D未自配置第二分区的背景色,且电子设备100也未预配置应用D对应的第二分区的背景色,则电子设备100仍然会在第二分区中显示黑色背景,而非从第一分区中显示的应用D的界面中提取对应的第二分区的背景基础色,然后将提取的背景基础色作为在第二分区中显示的背景色,具体如下文描述的图4D的b所示的用户界面48。
其中,关于应用D被设置为深色模式/浅色模式的方式可以参考前文描述的,应用A被设置为深色模式/浅色模式的方式,在此暂不赘述。
图4D的b示出用户界面48,该用户界面48为电子设备100外屏显示的界面。该界面包括第二分区和第一分区,第一分区显示应用D的界面,且该应用D的界面的背景为黑色,第二分区则按照深色模式下对应的黑色背景色来显示。可选的,电子设备100为了匹配第二分区中的背景色,会显示与该背景色存在一定对比度的电子设备的状态信息,例如显示白色的时间等,从而保证用户可以准确读取到电子设备的状态信息。
图4D所示的深色模式下电子设备100采用屏幕分区显示的效果仅为示例,在深色模式下第一分区中不同应用的背景色可能不同,比如,第二分区的背景还可以是灰色这里仅以应用D显示的黑色背景,第二分区也显示黑色背景为例来介绍,不应构成对本申请的限制。
基于前文介绍的UI实施例,接下来结合图5所示的屏幕分区显示方法流程,来详细介绍本申请提供的四种屏幕分区显示策略。
图5示例性示出一种屏幕分区显示方法流程。该屏幕分区显示的方法流程包括以下步骤:
S51~S52:触发第二分区中背景色板切换为与第一分区中的应用窗口相适配的背景色。
S51,检测到待在屏幕中第一分区显示的焦点窗口发生切换。
具体的,电子设备100运行屏幕时,可以在屏幕的第一分区显示应用窗口,其中,显示在最顶层的,用户可见的,且用户能够直接与之交互的窗口即为焦点窗口。以前述图3A所示的场景为例,在当屏幕的第一分区显示桌面时,则焦点窗口为桌面应用提供的窗口,当电子设备打开应用A并在屏幕的第一分区显示应用A的界面时,则焦点窗口切换为应用A的窗口。以前述图3B所示的场景为例,在当电子设备打开应用B并在屏幕的第一分区
显示应用B的界面时,则焦点窗口切换为应用B的窗口。以前述图3C所示的场景为例,在当电子设备打开应用C并在屏幕的第一分区显示应用C的界面时,则焦点窗口切换为应用C的窗口。以前述图3D所示的场景为例,在当电子设备打开应用D并在屏幕的第一分区显示应用D的界面时,则焦点窗口切换为应用D的窗口。
可选的,响应于用户切换应用界面的操作,可以触发切换焦点窗口以实现在屏幕的第一分区中显示切换后的应用界面。具体的,响应于用户切换应用界面的操作,电子设备的活动管理服务(Activity manager service,AMS)会启动新界面对应的新Activity,AMS则开始管理新Activity的运行状态和旧Activity的运行状态,当AMS通知窗口管理服务(Window manager service,WMS)新Activity切换为继续(Resumed)状态,旧Activity切换为暂停(Paused)状态,则触发WMS切换焦点窗口,包括将旧Activity对应的旧窗口设置为不可见状态,将新Activity对应的新窗口设置为可见状态,从而触发后续绘制、渲染、合成送显该新窗口,进而实现显示切换后的新界面。
可选的,这里的屏幕可以是前述图2中所示的外屏,关于该屏幕的介绍可以参考前文的描述,在此暂不赘述。
可选的,在检测待在屏幕中第一分区显示的焦点窗口发生切换前,还可以先确定是否进行屏幕分区显示,若确定屏幕分区显示,则采用图5所介绍的分区显示策略进行显示。若确定全屏显示,则按照对应的全屏显示策略进行显示,本申请实施例对全屏显示的内容不作具体限制,具体可以由待显示的桌面或其他应用而决定。例如,全屏显示的场景包括但不限于:显示桌面、天气或者其他应用程序的场景,本申请可以预置全屏显示的场景,或者也可以预置分区显示的场景等。
S52,在切换后的焦点窗口绘制完成后,获取焦点窗口对象。
具体的,在检测到焦点窗口发生切换后,电子设备会执行绘制该焦点窗口的任务,当电子设备绘制完焦点窗口后,则电子设备可以获取到绘制完成后的焦点窗口对象。
焦点窗口对象包括但不限于:应用包名、窗口标识,或者还包括:关系属性、屏幕信息属性等。其中,应用包名为该焦点窗口所属的应用的包名,窗口标识可以唯一标识该窗口,关系属性可包括如parent和top属性,分别用于返回父窗口和最顶层先辈窗口的引用,屏幕信息属性可包括screenLeft和screenTop属性,其声明了窗口相对于屏幕的位置。
可选的,当窗口所属应用自配置有该窗口对应的第二分区的背景色,则窗口对象中还额外携带相应的属性值,该属性值用于指示第二分区的背景色,本申请实施例对第二分区的属性值的具体设置形式不作限制。
S53~S54-2:策略1,采用应用自配置的色彩值作为第二分区的背景色。
S53,基于焦点窗口对象确定对应的第一应用是否配置第二分区的背景色。
具体的,电子设备100支持应用的开发者自配置该应用对应在第二分区的背景色,若开发者已经对该应用自配置第二分区的背景色,则电子设备100可以从前述S52中获取的焦点窗口对象中携带的属性值中获取到背景色。因此,电子设备可以基于焦点窗口对象确定对应的第一应用是否自配置第二分区的背景色,当确定焦点窗口对象中携带相应的属性值,则确定第一应用自配置了第二分区的背景色,进而按照对应第一应用的自配置结果来
控制第二分区的背景色(即执行后续S54-1~S54-2);当确定焦点窗口对象中未携带相应的属性值,则确定第一应用没有自配置了第二分区的背景色,进而按照电子设备提供的预配置/智能适配的策略来控制第二分区的背景色(即执行后续S55等)。
S54-1,若确定第一应用自配置第二分区的背景色,则基于焦点窗口对象中的属性值,获取第二分区的背景色。
具体的,电子设备可以从焦点窗口对象的属性值中获取到第一应用自配置的第二分区的背景色。通常,第一应用自配置的第二分区的背景色可以与第一分区中的焦点窗口的色彩值相似或者相同,从而带给用户全屏联合显示第一应用的视觉体验。
S54-2,在屏幕的第一分区显示第一应用的焦点窗口,在屏幕的第二分区显示第一应用配置的背景色。
具体的,在电子设备切换焦点窗口后,可以在第一分区中显示切换后的焦点窗口,从而形成第一应用的用户界面,以及在电子设备获取到第一应用自配置的第二分区的背景色后,还可以在第二分区中显示相应的背景色。
可选的,电子设备可以同时在第一分区中显示焦点窗口,以及在第二分区显示与之对应的背景色,或者,电子设备还可以先在第一分区中显示焦点窗口,后再第二分区中显示与之对应的背景色,但是用户视觉上感知不到两者之间的时延,相当于同时看到两个分区中的内容切换。本申请实施例对此不作限制,具体取决于电子设备控制屏幕送显的策略,屏幕可以仅支持同时刷新第一分区和第二分区,也可以支持分别刷新第一分区和第二分区。
关于S54-2中涉及的分区显示效果还可以参考前文UI实施例中对图3A的描述,在此暂不赘述。
S55~S56-2:策略2,采用电子设备预配置的色彩值作为第二分区的背景色。
S55,若确定第一应用未自配置第二分区的背景色,则确定第一应用是否属于电子设备的第一白名单中。
具体的,电子设备可以预先为第一白名单中的应用配置默认的第二分区的背景色,因此,电子设备可以检测该第一应用是否属于第一白名单中,若属于,则采用电子设备预置的色彩值作为第二分区的背景色来显示(即执行后续的S56-1~S56-2);若不属于,则采用智能提取的色彩值最为第二分区的背景色来显示(即执行后续的S57等)。
其中,第一白名单中不同应用对应的第二分区的背景色可以相同或者不同,同一应用可以对应一个背景色,或者同一应用可以根据不同窗口等级分别对应不同的背景色,例如应用的一级界面的窗口、二级界面的窗口等等可分别配置不同的背景色本申请实施例对此不作限制。
S56-1,若第一应用属于第一白名单,则从第一应用的配置文件中获取对应的第二分区的背景色。
具体的,在确定第一应用属于第一白名单后,则从第一应用的配置文件中获取电子设备预先配置的第二分区的背景色。当电子设备仅对第一应用配置一个背景色时,无论焦点窗口为第一应用的哪一个窗口均可以使用该一个背景色,当电子设备对第一应用配置有多个背景色时,则还以基于当前焦点窗口对应的第一应用的界面等级来获取相应的背景色。
后者主要考虑到,同一个应用不同等级的界面的颜色不同,因此电子设备可以预先根据不同等级界面来配置与之相同或者相近的背景色。
可选的,第一应用的配置文件中存储的第二分区的背景色可以是单一色彩(即本申请实施例中所述的背景基础色),也可以是由多种色彩组合而成的色彩(即本申请实施例中所述的背景基础色结合背景叠加色得到色彩),其中,背景基础色可以是色调-饱和度-亮度(Hue-Saturation-Brightness,HSB)色彩空间下的单一色彩,例如粉色、黄色、绿色或者红色等,背景叠加色可以是HSB色彩空间下亮度渐变的白色,该亮度渐变的白色叠加在背景基础色之上,既不会完全覆盖原始的背景基础色,又可以通过亮度渐变的效果区分第一分区和第二分区,使得用户聚焦第一分区中的主要任务,本申请实施例对此不作限制。
S56-2,在屏幕的第一分区显示第一应用的焦点窗口,在屏幕的第二分区显示电子设备配置的背景色。
具体的,在电子设备切换焦点窗口后,可以在第一分区中显示切换后的焦点窗口,从而形成第一应用的用户界面,以及在电子设备获取到电子设备预配置的第一应用对应的第二分区的背景色后,还可以在第二分区中显示相应的背景色。
可选的,电子设备可以同时在第一分区中显示焦点窗口,以及在第二分区显示与之对应的背景色,或者,电子设备还可以先在第一分区中显示焦点窗口,后再第二分区中显示与之对应的背景色,但是用户视觉上感知不到两者之间的时延,相当于同时看到两个分区中的内容切换。本申请实施例对此不作限制,具体取决于电子设备控制屏幕送显的策略,屏幕可以仅支持同时刷新第一分区和第二分区,也可以支持分别刷新第一分区和第二分区。
关于S56-2中涉及的分区显示效果还可以参考前文UI实施例中对图3B的描述,在此暂不赘述。
S57~S58-4:策略3,采用电子设备智能提取的背景基础色结合电子设备预置的背景叠加色作为第二分区的背景色。
S57,若第一应用不属于第一白名单,则确定第一应用是否属于电子设备的第二白名单中。
具体的,电子设备可以预先为第二白名单中的应用配置第二分区的背景叠加色,该背景叠加色用于叠加在从焦点窗口中提取的背景基础色,作为第二分区最终的背景色。因此,电子设备可以检测该第一应用是否属于第二白名单中,若属于,则采用电子设备预置的背景叠加色作为第二分区的背景色的叠加层来显示(即执行后续的S58-1~S58-4);若不属于,则采用智能提取的背景基础色最为第二分区的背景色来显示(即执行后续的S59-1~S59-2)。
其中,第二白名单中不同应用对应的第二分区的背景叠加色可以相同或者不同,同一应用可以对应一个背景叠加色,或者同一应用可以根据不同窗口等级分别对应不同的背景叠加色,例如应用的一级界面的窗口、二级界面的窗口等等可分别配置不同的背景叠加色本申请实施例对此不作限制。
S58-1,若第一应用属于第二白名单,则从第一应用的配置文件中获取对应的第二分区的背景叠加色。
具体的,在确定第一应用属于第二白名单后,则从第一应用的配置文件中获取电子设
备预先配置的第二分区的背景叠加色。当电子设备仅对第一应用配置一个背景叠加色时,无论焦点窗口为第一应用的哪一个窗口均可以使用该一个背景叠加色,当电子设备对第一应用配置有多个背景叠加色时,则还以基于当前焦点窗口对应的第一应用的界面等级来获取相应的背景叠加色。
可选的,电子设备预配置的每个应用对应的第二分区的背景叠加色均为亮度渐变的白色或者亮度渐变的其他色彩值等,该亮度渐变色叠加在背景基础色之上,既不会完全覆盖背景基础色,又可以通过亮度渐变的效果区分第一分区和第二分区,使得用户聚焦第一分区中的主要任务,本申请实施例对此不作限制。
S58-2,基于焦点窗口对象从对应焦点窗口的View中提取对应的第二分区的背景基础色。
具体的,在确定第一应用属于第二白名单后,除了从第一应用的配置文件中获取背景叠加色外,还会基于焦点窗口对象从对应焦点窗口中的View中提取背景基础色,本申请实施例对该两个步骤的先后顺序不作限制。
其中,焦点窗口对象中携带窗口标识,绘制而成的焦点窗口由各个View组成,View可以是各类控件、文本等等,电子设备可以基于该窗口标识来提取焦点窗口的View的颜色,以作为第二分区的背景基础色。
可选的,焦点窗口的View可能包括很多,不同View的颜色可能不完全一致,因此,电子设备可以选取焦点窗口中View满足以下条件:层数为顶部10层以内,用户可见的,所占面积大于根视图(DecorView)面积的80%,背景色不为空,最后将与View的背景色相同或者相近的色彩值作为最终的背景基础色。
可选的,一种选取与View的背景色相近的色彩值作为最终的背景基础色的方法包括:先将View的背景色的实际色彩值转化为HSB色彩空间,然后对该色HSB色彩空间中亮度B通道的数值做调,例如:亮度B通道的数值由范围0%~100%亮度B划分为多个数值,以划分为50%和100%,然后将实际亮度B属于0%~50%的设置为50%,将实际亮度B属于50%~100%的设置为100%。可选的,还可以将亮度B划分为更多段来调整,本申请实施例对此不作限制。或者,还可以对该HSB色彩空间中饱和度S通道的数值做调整,例如将实际饱和度S大于40的数值均设置为上限值40。又或者,还可以对该HSB色彩空间中色相H通道的数值做调整等,本申请实施例对选取与View实际背景色相近的色彩值作为背景基础色的方法不作具体限制。
S58-3,将背景基础色和背景叠加色叠加后得到第二分区的背景色。
前述在S58-2中获取到背景基础色后和在S58-1中获取到背景叠加色后,可以将背景叠加色覆盖在背景基础色后获得的最终色彩作为第二分区的背景色。通过该方式获取的背景色既保证与第一分区中色彩值相近似,提升用户的视觉体验,又可以保证第二分区中背景色亮度和饱和度适中,减少对第一分区中关键内容的影响。
可选的,电子设备还会基于最终获取的第二分区的背景色来确定第二分区中显示的电子设备状态信息的色彩值,保证两者之间存在一定的对比度,这样可以保证第二分区中显示内容的可读性。
S58-4,在屏幕的第一分区显示第一应用的焦点窗口,在屏幕的第二分区显示电子设备
配置的背景色。
具体的,在电子设备切换焦点窗口后,可以在第一分区中显示切换后的焦点窗口,从而形成第一应用的用户界面,以及在电子设备获取到电子设备预配置的第一应用对应的第二分区的背景色后,还可以在第二分区中显示相应的背景色。
可选的,电子设备可以同时在第一分区中显示焦点窗口,以及在第二分区显示与之对应的背景色,或者,电子设备还可以先在第一分区中显示焦点窗口,后再第二分区中显示与之对应的背景色,但是用户视觉上感知不到两者之间的时延,相当于同时看到两个分区中的内容切换。本申请实施例对此不作限制,具体取决于电子设备控制屏幕送显的策略,屏幕可以仅支持同时刷新第一分区和第二分区,也可以支持分别刷新第一分区和第二分区。
关于S58-4中涉及的分区显示效果还可以参考前文UI实施例中对图3C的描述,在此暂不赘述。
S59-1~S59-2:策略4,采用电子设备智能提取的背景基础色作为第二分区的背景色。
S59-1,若第一应用不属于第二白名单,则基于焦点窗口对象从对应焦点窗口中的View,获取对应的第二分区的背景基础色。
S59-1与前述S58-2相同,关于对S59-1的描述,可以参考前文对S58-2的描述,在此暂不赘述。
S59-2,在屏幕的第一分区显示第一应用的焦点窗口,在屏幕的第二分区显示电子设备配置的背景色。
S59-2与前述S58-4相似,其区域别在于,S59-2中第二分区的背景色仅为电子设备提取的背景基础色,而S58-4中第二分区的背景色为电子设备提取的背景基础色结合电子设备预置的背景叠加色得到的色彩值,关于对S59-2的描述,可以参考前文对S58-4的描述,在此暂不赘述。
关于S59-2中涉及的分区显示效果还可以参考前文UI实施例中对图3D的描述,在此暂不赘述。
可以理解的是,在前述介绍的图5中所述的屏幕分区显示方法中,将四种屏幕分区显示的策略按照优先级从高到低依次为:应用自配置、电子设备预配置、电子设备预配置叠加智能提起和仅智能提起的先后顺序来依次判断满足何种条件,进而采取相应的策略来控制屏幕分区显示效果。可选的,还可以采用除图5所示的优先级顺序以外的其他优先级顺序来依次判断采用何种策略来控制屏幕分区显示效果,本申请实施例对此不作限制。
基于前述对图5所示的屏幕分区显示方法流程的介绍,接下来结合图6进一步介绍本申请涉及的屏幕分区显示方法的OS交互流程。
图6示例性示出一种屏幕分区显示方法的OS交互流程示意图。具体包括以下步骤:
该OS交互涉及的电子设备100的软件模块包括但不限于:第一应用、WMS、LetterBox、Task任务管理模块、ViewRootImpl、文件解析、View管理框架等模块,关于这些模块的详细介绍还可以参考后文对电子设备100的软件架构的介绍,在此暂不赘述。
阶段1(S61-S68):触发获取第二分区的背景色。
S61,第一应用获取到第一操作事件。
具体的,在用户输入用于切换至第一应用的界面的第一操作后,电子设备的第一应用可以获取到第一操作事件。
可选的,本申请所述的第一应用可以是前述应用A、应用B、应用C或者应用D中的任意一个,相应的,第一操作也可以是前述图3A所示的作用于桌面中的应用A的图标上的操作,或者还可以是前述图3B所涉及的用于切换至应用B的界面的操作,或者还可以是前述图3C所涉及的用于切换至应用C的界面的操作,或者还可以是前述图3D所涉及的用于切换至应用D的界面的操作等等,本申请实施例对此不作限制。
S62,第一应用通过AMS通知WMS第一应用的第一活动被设置为Resumed状态。
具体的,在第一应用获取到前述第一操作事件后,第一应用可以通过执行onStart()方法,以启动第一应用的第一活动(Activity),该第一活动可以是第一应用的主活动(Main Activity)或者是上次前台运行时开启的非主活动等。启动第一活动后,AMS可以管理该第一活动的生命周期,当第一活动进入Resumed状态后,AMS则会协同其他模块依次执行绘制、渲染、送显该第一活动对应的第一窗口的任务,进而实现后续显示第一窗口以形成用户可见的第一界面。其中,当第一活动进入Resumed状态时,切换至第一应用之前的其他活动会进入Paused状态,AMS还会将第一活动被设置Resumed状态的消息通知至WMS,使得WMS基于此来切换焦点窗口。
可选的,当第一应用为应用A时,AMS启动的第一应用的第一活动可以是前文介绍的图3A中用户界面32所对应的活动;当第一应用为应用B时,AMS启动的第一应用的第一活动可以是前文介绍的图3B中的用户界面34所对应的活动;当第一应用为应用C时,AMS启动的第一应用的第一活动可以是前文介绍的图3C中的用户界面36所对应的活动;当第一应用为应用D时,AMS启动的第一应用的第一活动可以是前文介绍的图3D中的用户界面38所对应的活动。
S63,WMS将第一活动的第一窗口设置为焦点窗口。
具体的,WMS在获知第一活动被设置为Resumed状态后,则表征用户想要聚焦第一活动对应的界面,因此需要将第一活动的第一窗口设置为焦点窗口,即将该第一窗口设置为可见转态,从而保证后续在顶部显示该第一窗口,进而保证后续用户可以看见送显后的该第一窗口形成的第一界面。
S64,WMS通知LetterBox刷新第二分区的背景色。
具体的,在WMS将第一窗口设置为焦点窗口之后,由于第一窗口后续被送至第一分区中显示,因此WMS还需要随着第一分区的窗口变化来调整第二分区的背景色,具体的,WMS可以通知LetterBox来刷新第二分区的背景色。
其中,LetterBox提供了一种应用显示模式的刷新机制。具体的,一些应用程序需要在不同尺寸的设备上保持界面的一致性和功能性,但是一些设备(例如可折叠设备)具有与传统设备不同的屏幕尺寸和宽高比,因此当应用的界面设计仅针对传统的标准尺寸的屏幕时,就会出现显示兼容性问题。为了解决这一问题,LetterBox可以通过填充屏幕中部分区域(例如第二分区)来确保应用界面不会因设备屏幕的差异而变形或被拉伸。
S65,LetterBox向Task任务管理模块注册第一窗口的绘制完成的监听服务。
具体的,LetterBox接收到WMS发送的刷新第二分区背景色的通知后,还需等待待在第一分区中显示的第一窗口绘制完成后,才可以基于第一窗口的对象来完成第二分区的刷新任务,因此,LetterBox还需向Task任务管理模块注册焦点窗口的绘制完成的监听服务。
其中,Task任务管理模块可用于管理、执行绘制第一窗口的任务。
S66,Task任务管理模块向LetterBox返回绘制成功,携带第一窗口对象。
具体的,在Task任务管理模块检测到以及完成绘制第一窗口后,则会基于LetterBox注册的服务向LetterBox返回绘制成功的信息,并且还会携带发送绘制成功后的第一窗口对象。
其中,第一窗口对象所包含的内容可以参考前文的介绍,在此暂不赘述。
S67,LetterBox向WMS返回第一窗口对象。
具体的,LetterBox刷新第二分区的背景色时需要匹配第一分区中的第一窗口,因此LetterBox还需要获取到与第一窗口匹配的背景色来刷新第二分区,因此LetterBox向WMS返回第一窗口对象,使得WMS基于该第一窗口对象获取到对应的第二分区的背景色。
S68,WMS向ViewRootImpl请求获取第二分区的背景色,携带第一窗口对象。
具体的,WMS在接收到LetterBox返回的第一窗口对象后,则触发WMS向ViewRootImpl请求获取第二分区的背景色。
其中,ViewRootImpl为负责管理视图层次结构的顶级类,作为所有视图(View)的根节点(父类),ViewRootImpl会管理View绘制流程,即ViewRootImpl负责触发View的测量布局、绘制等过程,确保View正确显示在屏幕上。ViewRootImpl通过内部的Binder服务与WMS进行通信,完成窗口的实时刷新显示。
特别的,在本能申请实施例中,ViewRootImpl中预置多种屏幕分区显示策略,用于决策出第二分区的背景色,然后将该背景色返回至WMS中。
阶段2-1(S71-S72):采用策略1(即应用自配置)获取第二分区背景色。
S71,ViewRootImpl基于第一窗口对象确定第一应用预配置第二分区的背景色。
具体的,ViewRootImpl接收到的第一窗口对象后,则确定该第一窗口的对象中是否包括指示第二分区背景色的相应的属性值,当存在相应的属性值时,则确定第一应用已经自配置对应在第二分区的背景色,进而将第一应用自配置的背景色发送至WMS,即执行后续的S72。
其中,第一窗口对象中包括但不限于:应用包名、窗口标识,或者还包括:关系属性、屏幕信息属性等。其中,应用包名为该焦点窗口所属的应用的包名,窗口标识可以唯一标识该窗口,关系属性可包括如parent和top属性,分别用于返回父窗口和最顶层先辈窗口的引用,屏幕信息属性可包括screenLeft和screenTop属性,其声明了窗口相对于屏幕的位置。
可选的,当第一应用为前述应用A时,则该第一窗口对象中携带有相应的属性值,因此ViewRootImpl会对应用A采用策略1来获取第二分区的背景色。
S72,ViewRootImpl向WMS返回第一应用自配置的第二分区的背景色。
具体的,ViewRootImpl从第一窗口对象的属性值中获取到第一应用自配置的第二分区
的背景色后,还需将其返回至WMS。
阶段2-2(S81-S85):采用策略2(即电子设备预配置)获取第二分区背景色。
S81,ViewRootImpl基于第一窗口对象确定第一应用未自配置第二分区的背景色。
具体的,ViewRootImpl接收到的第一窗口对象后,则确定该第一窗口的对象中是否包括指示第二分区背景色的相应的属性值,当不存在相应的属性值时,则确定第一应用未自配置对应在第二分区的背景色,进而获取电子设备预配置的背景色并将其发送至WMS,即执行后续的S82-S85。
可选的,当第一应用为前述应用B时,则该第一窗口对象中没有携带相应的属性值,因此ViewRootImpl会对应用B采用策略2来获取第二分区的背景色。
S82,ViewRootImpl基于第一窗口对象请求向文件解析模块请求获取第二分区的背景色。
具体的,ViewRootImpl可以基于第一窗口对象中所携带的第一应用的包名,向解析模块发送请求,该请求可以携带第一应用的包名,进而用于文件解析模块获取第一应用对应的第二分区中的背景色。
S83,文件解析模块若确定该第一窗口所属的第一应用属于第一白名单,则获取预配置的第二分区的背景色。
具体的,文件解析模块中可以预置第一白名单,该第一白名单中的应用属于电子设备预先配置过对应第二分区背景色的应用。因此,文件解析模块可以先判断第一应用是否属于第一白名单,若属于,则确定采用策略2的方式来实现第二屏幕分区显示,该策略2包括从第一应用的解析文件中获取第二分区的背景色。
S84,文件解析模块向ViewRootImpl返回第二分区的背景色。
具体的,文件解析模块可以向ViewRootImpl返回策略2的标识,携带第二分区的背景色,该策略2的标识可用于指示ViewRootImpl将该第二分区的背景色作为最终背景色来控制第二分区显示。
S85,ViewRootImpl向WMS返回电子设备预配置的第二分区的背景色。
阶段2-3(S91-S99):采用策略3(电子设备预配置叠加智能提取)获取第二分区背景色。
S91,ViewRootImpl基于第一窗口对象确定第一应用未自配置第二分区的背景色。
具体的,ViewRootImpl接收到的第一窗口对象后,则确定该第一窗口的对象中是否包括指示第二分区背景色的相应的属性值,当不存在相应的属性值时,则确定第一应用未自配置对应在第二分区的背景色,进而获取电子设备预配置的背景叠加色以及智能提取背景基础色并将两者叠加而成的背景色发送至WMS,即执行后续的S92-S99。
S92,ViewRootImpl基于第一窗口对象请求向文件解析模块请求获取第二分区的背景色。
具体的,ViewRootImpl可以基于第一窗口对象中所携带的第一应用的包名,向解析模块发送请求,该请求可以携带第一应用的包名,进而用于文件解析模块获取第一应用对应
的第二分区中的背景色。
S93,文件解析模块若确定第一窗口所述的第一应用属于第二白名单,则获取预配置的第二分区的背景叠加色。
具体的,文件解析模块中可以预置第二白名单,该第二白名单中的应用属于电子设备预先配置过对应第二分区背景叠加色的应用。因此,文件解析模块可以先判断第一应用是否属于第二白名单,若属于,则确定采用策略3的方式来实现第二屏幕分区显示,该策略3包括从第一应用的解析文件中获取第二分区的背景叠加色,还包括从第一窗口中提取背景基础色。将背景叠加色叠加在背景基础色之上得到的背景色作为第二分区的背景色。
可选的,文件解析模块中存储的第一白名单和第二白名单可以是同一个名单也可以是不同的名单,只有存储有指示名单中具体应用采用策略2或采用策略3的方式即可。
可选的,当第一应用为前述应用C时,则该第一窗口对象中没有携带相应的属性值,并且电子设备仅预置背景叠加色,因此ViewRootImpl会对应用C采用策略3来获取第二分区的背景色。
S94,文件解析模块向ViewRootImpl返回第二分区的背景叠加色。
具体的,文件解析模块还可以向ViewRootImpl返回策略3的标识,携带第二分区的背景叠加色,该策略3的标识可用于指示ViewRootImpl将继续从第一窗口中提取背景基础色,然后将背景基础色叠加背景叠加色后获取的背景色来作为最终背景色来控制第二分区显示。
S95,ViewRootImpl基于第一窗口向View管理框架请求获取第二分区的背景基础色。
具体的,ViewRootImpl可以向View管理框架发送请求,用于请求获取第一窗口对应的第二分区的背景基础色,该请求可以携带第一窗口的标识。
S96,View管理框架基于第一窗口的View确定背景基础色。
具体的,绘制而成的第一窗口由各个View组成,View可以是各类控件、文本等等,View管理框架可以遍历该第一窗口中的View,从中提取色彩值,以作为第二分区的背景基础色。
可选的,由于第一窗口的View可能包括很多,不同View的颜色可能不完全一致,因此,电子设备可以选取满足下述条件的第一View,将从第一View中提取背景基础色:View所属层数为顶部N层(例如10层)以内,View被设置为用户可见的,View所占面积大于根视图(DecorView)面积的第一值(例如80%),View背景色不为空。
可选的,满足前述条件的view可能有零个、一个或多个,当没有符合条件的View(又称第一视图)时,则View管理框架可以从应用导航栏/状态栏来提取色彩值作为背景基础色;当只有一个View时,则View管理框架可以从该一个View中提取色彩值作为背景基础色;当存在多个View时,则View管理框架可以从该多个View中选取面积最大的View来提取色彩值作为背景基础色,或者View管理框架可以从该多个View中分别提取色彩值进行融合处理后得到的色彩值作为背景基础色。
可选的,从View中提取背景色的方法具体包括:先将View的背景色的实际色彩值转化为HSB色彩空间,然后对该色HSB色彩空间中亮度B通道的数值做调,例如:亮度B通道的数值由范围0%~100%亮度B划分为多个数值,以划分为50%和100%,然后将实际
亮度B属于0%~50%的设置为50%,将实际亮度B属于50%~100%的设置为100%。可选的,还可以将亮度B划分为更多段来调整,本申请实施例对此不作限制。或者,还可以对该HSB色彩空间中饱和度S通道的数值做调整,例如将实际饱和度S大于40的数值均设置为上限值40。又或者,还可以对该HSB色彩空间中色相H通道的数值做调整等,本申请实施例对选取与View实际背景色相近的色彩值作为背景基础色的方法不作具体限制。
S97,View管理框架向ViewRootImpl返回第二分区的背景基础色。
S98,ViewRootImpl将背景叠加色叠加在背景基础色之上得到第二分区的背景色。
具体的,前述在S94中获取到背景基础色后和在S97中获取到背景叠加色后,可以将背景叠加色覆盖在背景基础色后获得的最终色彩作为第二分区的背景色。通过该方式获取的背景色既保证与第一分区中色彩值相近似,提升用户的视觉体验,又可以保证第二分区中背景色亮度和饱和度适中,减少对第一分区中关键内容的影响。
S99,ViewRootImpl向WMS返回叠加后的第二分区的背景色。
阶段2-4(S11-S18):采用策略4(仅智能取色)获取第二分区背景色。
S11,ViewRootImpl基于第一窗口对象确定第一应用未自配置第二分区的背景色。
S12,ViewRootImpl基于第一窗口对象请求向文件解析模块请求获取第二分区的背景色。
S13,文件解析模块确定第一窗口所属的第一应用既不属于第一白名单也不属于第二白名单。
关于S11-S13的相关描述可以参考前文介绍的S91-S93,在此暂不再赘述。
可选的,文件解析模块中存储的第一白名单和第二白名单可以是同一个名单也可以是不同的名单,只有存储有指示名单中具体应用采用策略2或采用策略3的方式即可。
可选的,当第一应用为前述应用D时,则该第一窗口对象中没有携带相应的属性值,并且电子设备没有预置对应的背景色,也没有预置对应的背景叠加色,因此ViewRootImpl会对应用D采用策略4来获取第二分区的背景色。
S14,文件解析模块向ViewRootImpl返回策略4的标识。
具体的,文件解析模块还可以向ViewRootImpl返回策略4的标识,该策略4的标识可用于指示ViewRootImpl从第一窗口中提取背景基础色,然后将背景基础色作为最终背景色来控制第二分区显示。
S15,ViewRootImpl基于第一窗口向View管理框架请求获取第二分区的背景基础色。
S16,View管理框架基于第一窗口的View确定背景基础色。
S17,View管理框架向ViewRootImpl返回第二分区的背景基础色。
关于S15-S17的相关描述可以参考前文介绍的S95-S97,在此暂不再赘述。
S18,ViewRootImpl向WMS返回第二分区的背景基础色。
阶段3(S21-S23):在第一分区刷新显示第一窗口,在第二分区刷新显示背景色。
S21,WMS向LetterBox返回第二分区的背景色。
具体的,在WMS通过上述阶段2-1~阶段2-4中任意一种屏幕分区策略获取到第二分
区的背景色后,则会将该背景色返回至LetterBox,使得LetterBox采用该背景色来绘制第二分区内容的。
S22,通过surface flinger合成图像数据后,发送至显示驱动,以实现在屏幕的第一分区中刷新显示第一窗口。
具体的,在前述S66之前,Task任务管理模块已经开始执行绘制第一窗口的任务,当执行完绘制第一窗口后,会将绘制完成的第一窗口的数据写入至相应的Buffer中,surface flinger可以读取该buffer中的图像数据,然后将其合成为图像数据后发送至显示驱动。使得显示驱动控制屏幕中的第一分区刷新显示第一窗口,进而呈现出用户可视的应用界面。
可选的,在第一窗口被刷新显示后,所呈现出的用户可视的应用界面可以如前述介绍的图3A-图3D中的任意一种应用界面。
S23,通过surface flinger合成图像数据后,发送至显示驱动,以实现在屏幕的第二分区中刷新显示背景色。
具体的,在前述S21之后,LetterBox开始执行绘制第二分区内的任务,当执行完绘制第二分区内容后,会将绘制完成的第二分区的数据写入至相应的Buffer中,surface flinger可以读取该buffer中的图像数据,然后将其合成为图像数据后发送至显示驱动。使得显示驱动控制屏幕中的第二分区刷新显示相应的背景色,进而呈现出用户可视的用户界面。
可选的,在第一窗口被刷新显示后,所呈现出的用户可视的应用界面可以如前述介绍的图3A-图3D中的任意一种界面。
可选的,surface flinger可以同时基于第一窗口的数据和第二分区的内容来合成图像数据,然后向显示驱动送显,以实现在屏幕的全部区域同时刷新第一分区和第二分区。或者,surface flinger可以分别基于第一窗口的数据合成图像数据然后向显示驱动送显,以实现在屏幕的第一分区刷新显示应用的界面,以及基于第二分区的内容合成图像数据然后向显示驱动送显,以实现在屏幕的第二分区刷新显示相应的背景色,本申请实施例对此不作限制,具体可以取决于电子设备的屏幕是否支持分区进行局部刷新。
前述图6所示出的方法流程仅适用于第一应用设置浅色模式时如何实现屏幕分区显示,若第一应用还支持应用深色模式,则在实现屏幕分区显示的过程中还需判断该第一应用当前的显示模式是浅色模式或者深色模式,若是浅色模式则可以按照前述图6所示的方法流程来执行,若是深色模式则直接默认第二分区的背景色为黑色或者其他深色。
在一种具体的可实现方式中,在执行前述S68之后以及在执行前述S72之前的任意步骤中,或者在执行前述S68之后以及在执行前述S85之前的任意步骤中,或者在执行前述S68之后以及在执行前述S99之前的任意步骤中,或者在执行前述S68之后以及在执行前述S18之前的任意步骤中,ViewRootImpl可以基于第一窗口所属的第一应用,从setting数据库中获取第一应用的显示模式,以判断该第一应用当前设置的显示模式,若第一应用的显示模式为深色模式,则ViewRootImpl向WMS返回的背景色为黑色或者深色,而非前述图6中所介绍的四种策略获取的背景色,若第一应用的显示模式为浅色模式,则ViewRootImpl向WMS返回的背景色为前述图6中所介绍的四种策略中相应一种策略所获取的背景色。
接下来介绍本申请涉及的电子设备100的形态及硬件架构,电子设备100可以是搭载或者其它操作系统的便携式终端设备,例如手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,等等。
图7示出了电子设备100的硬件架构示意图。
如图7所示,电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,传感器模块180,显示屏194等。其中传感器模块180可以包括压力传感器180A,和触摸传感器180K等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备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可用于执行本申请提供的屏幕分区显示方法,具体如前文图5-图6所描述的方法,在此暂不赘述。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括通用串行总线(universal serial bus,USB)接口等。USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备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的正整数。
在本申请实施例中,显示屏194的具体结构可以如前文介绍的图2中所示出的屏幕结构,在处理器110应用本申请提供的屏幕分区显示方法后,可以控制显示屏194显示如前文图3A-图4D所示出的效果,在此暂不赘述。
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像视频播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。
在本申请实施例中,前述存储器可用于存储前述4种屏幕分区显示策略的实现方法,例如包括第一白名单、第二白名单、以及预置的应用和对应的背景色,或者应用和对应的背景基础色等等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确
定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图8是本申请实施例的电子设备100的软件架构。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图8所示,应用程序包可以包括应用A、应用B、应用C、应用D、相机,图库,日历,通话,地图,导航,WLAN,蓝牙等应用程序。第一应用可以是应用A、应用B、应用C、应用D中的某一应用,第二应用也可以是应用A、应用B、应用C、应用D中的某一应用,第一应用与第二应用不同。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图8所示,应用程序框架层可以包括活动管理器(Activity manager service,AMS)、显示合成系统(Surface flinger,SF)、LetterBox、窗口管理器(Windows manager service,WMS),视图系统(View system service)等。
活动管理器负责管理应用程序中Activity的创建、启动、暂停、恢复和销毁等生命周期以及前后台切换等事件。
SF主要负责屏幕内容的合成和送显。具体的,SF可以使用OpenGL和Hardware Composer来将将绘制后的窗口数据合称为图像数据,然后进行送显。
LetterBox提供了一种应用显示模式的刷新机制。具体的,一些应用程序需要在不同尺寸的设备上保持界面的一致性和功能性,但是一些设备(例如可折叠设备)具有与传统设备不同的屏幕尺寸和宽高比,因此当应用的界面设计仅针对传统的标准尺寸的屏幕时,就会出现显示兼容性问题。为了解决这一问题,LetterBox可以通过填充屏幕中部分区域(例如第二分区)来确保应用界面不会因设备屏幕的差异而变形或被拉伸。在本申请实施例中,LetterBox可以提供的具体功能可以参考前文介绍的图5-图6中涉及的相关方法,在此暂不赘述。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心
库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维(2D)图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,显示驱动可以接收surface flinger发送的图像数据,来控制屏幕实现分区显示。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请还提供一种电子设备,该电子设备可以包括存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现如上述任意一个实施例中电子设备执行的方法。
本申请还提供一种芯片系统,包括处理电路和接口电路,接口电路用于接收计算机指令并传输至处理电路,处理电路用于运行计算机指令以实现如上述任意一个实施例中电子设备执行的方法。
本申请还提供了一种芯片系统,该芯片系统包括至少一个处理器,用于实现上述任意一个实施例中电子设备执行的方法。在一种可能的设计中,该芯片系统还包括存储器,所述存储器用于保存程序指令和数据,存储器位于处理器之内或处理器之外。
芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
可选地,芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性地,芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片
(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
本申请还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述任意一个实施例中电子设备执行的方法。
本申请还提供一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现如上述任意一个实施例中电子设备执行的方法。
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
总之,以上所述仅为本申请技术方案的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (27)
- 一种屏幕分区显示方法,其特征在于,所述方法应用于包括第一屏幕的电子设备,所述第一屏幕包括第一分区和第二分区,所述第一分区不包括打孔区域,所述第二分区包括打孔区域,所述方法包括:运行第一应用时,在所述第一分区显示所述第一应用提供的第一窗口,在所述第二分区显示第一背景,所述第一背景的色彩值和所述第一窗口中第一视图的色彩值相同或相近;其中,所述第一视图满足以下一个或多个条件:所述第一视图在所述第一窗口中的图层数为第N层以上,所述第一视图处于可见状态,所述第一视图的面积大于第一值,或者,所述第一视图的背景非空;接收到第一操作,运行第二应用;运行所述第二应用时,在所述第一分区中显示所述第二应用的第二窗口,在所述第二分区中显示第二背景,所述第二背景的色彩值和所述第二窗口中第二视图的色彩值相同或相近。
- 根据权利要求1所述的方法,其特征在于,所述第一背景仅包含色彩元素,不包含图案元素。
- 根据权利要求1或2所述的方法,其特征在于,所述第一窗口用于显示以下一项:社交类应用的主页、社交类应用的聊天页面、社交类应用的设置页面、音乐类应用的主页、音乐类应用的播放界面、音乐类应用的设置界面、视频类应用的主页、视频类应用的播放界面、视频类应用的设置界面、购物类应用的主页、购物类应用的播放界面或者购物类应用的设置界面。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一背景的色彩值为所述第一应用配置的第一预设值。
- 根据权利要求4所述的方法,其特征在于,在所述第一应用配置有第一预设值的情况下,所述第一背景的色彩值为所述第一预设值。
- 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:在所述第一分区显示所述第一应用提供的第一窗口之前,通过绘制所述第一窗口获取所述第一窗口的对象;在所述第二分区显示第一背景之前,基于所述第一窗口的对象中包含的第一属性值确定所述第一背景的色彩值为所述第一应用配置的第一预设值。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一背景的色彩值为所述电子设备配置的第二预设值。
- 根据权利要求7所述的方法,其特征在于,在所述第一应用未配置第一预设值并且所述电子设备配置有第二预设值的情况下,所述第一背景的色彩值为所述第二预设值。
- 根据权利要求7或8所述的方法,其特征在于,所述第二预设值是,在第三色彩值之上叠加第四色彩值后得到的,所述第三色彩值为纯色,所述第四色彩值为亮度渐变的白色。
- 根据权利要求7-9中任一项所述的方法,其特征在于,所述电子设备预置第一白名单,并且,预置所述第一白名单中的应用对应的所述第二预设值,所述方法还包括:在所述第一分区显示所述第一应用提供的第一窗口之前,通过绘制所述第一窗口获取所述第一窗口的对象;在所述第二分区显示第一背景之前,确定所述第一窗口的对象中未包含第一属性值,所述第一属性值对应所述第一背景的色彩值,并且,确定所述第一应用属于所述第一白名单,则确定所述第一背景的色彩值为所述第二预设值。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一背景的色彩值为,根据所述电子设备配置的第三预设值和根据所述第一窗口中第一视图的色彩值确定。
- 根据权利要求11所述的方法,其特征在于,在所述第一应用未配置第一预设值、所述电子设备未配置第二预设值并且所述电子设备配置有第三预设值的情况下,所述第一背景的色彩值为,根据所述电子设备配置的第三预设值和根据所述第一窗口的色彩值确定。
- 根据权利要求11或12所述的方法,其特征在于,所述第一背景的色彩值为在第三色彩值之上叠加所述第三预设值后得到的,所述第三色彩值为根据所述第一窗口中第一视图的色彩值确定的纯色,所述第三预设值为亮度渐变的白色。
- 根据权利要求13所述的方法,其特征在于,所述第一窗口中的第一视图为第四色彩值;所述第三色彩值为通过调整所述第四色彩值的亮度确定,当所述第四色彩值的亮度大于第二值并且小于第三值时,则所述第三色彩值的亮度为所述第三值,当所述第四色彩值的亮度属于大于或等于所述第三值,并且小于第四值时,则所述第三色彩值的亮度为所述第四值。
- 根据权利要求11-14中任一项所述的方法,其特征在于,所述电子设备预置第一白名单和第二白名单,并且,预置所述第一白名单中的应用对应的所述第二预设值,预置所述第二白名单中的应用对应的所述第三预设值,所述方法还包括:在所述第一分区显示所述第一应用提供的第一窗口之前,通过绘制所述第一窗口获取所述第一窗口的对象;在所述第二分区显示第一背景之前,确定所述第一窗口的对象中未包含第一属性值,所述第一属性值对应所述第一背景的色彩值,并且,确定所述第一应用不属于所述第一白名单且属于所述第二白名单,则确定所述第一背景的色彩值为,根据所述第三预设值和根据所述第一窗口中第一视图的色彩值确定。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一背景的色彩值为根据所述第一窗口中第一视图的色彩值确定。
- 根据权利要求16所述的方法,其特征在于,在所述第一应用未配置第一预设值、所述电子设备未配置第二预设值并且所述电子设备未配置第三预设值的情况下,所述第一背景的色彩值根据所述第一窗口中第一视图的色彩值确定。
- 根据权利要求16或17所述的方法,其特征在于,所述第一窗口中的第一视图为第四色彩值;所述第一背景的色彩值为通过调整所述第四色彩值的亮度确定,当所述第四色彩值的亮度大于第二值并且小于第三值时,则所述第一背景的色彩值的亮度为所述第三值,当所述第四色彩值的亮度属于大于或等于所述第三值,并且小于第四值时,则所述第一背景的色彩值的亮度为所述第四值。
- 根据权利要求16-18中任一项所述的方法,其特征在于,所述电子设备预置第一白名单和第二白名单,并且,预置所述第一白名单中的应用对应的所述第二预设值,预置所述第二白名单中的应用对应的所述第三预设值,所述方法还包括:在所述第一分区显示所述第一应用提供的第一窗口之前,通过绘制所述第一窗口获取所述第一窗口的对象;在所述第二分区显示第一背景之前,确定所述第一窗口的对象中未包含第一属性值,所述第一属性值对应所述第一背景的色彩值,并且,确定所述第一应用不属于所述第一白名单且不属于所述第二白名单,则根据所述第一窗口中第一视图的色彩值确定所述第一背景的色彩值。
- 根据权利要求1-19中任一项所述的方法,其特征在于,在所述第二分区中显示所述第一背景之前,所述方法还包括:确定所述第一应用的显示模式被设置为浅色模式。
- 根据权利要求1-20中任一项所述的方法,其特征在于,在所述第二分区显示第一背景时,所述方法还包括:在所述第二分区中还显示所述电子设备的状态信息。
- 根据权利要求1-21中任一项所述的方法,其特征在于,在运行第一应用之前,所述方法还包括:在所述第一分区和所述第二分区中显示桌面的背景,在所述第一分区中还显示所述桌面的应用图标,在所述第二分区中还显示所述电子设备的状态信息。
- 根据权利要求1-22中任一项所述的方法,其特征在于,在获取第一应用对应的所述第二分区中的第一色彩值之前,所述方法还包括:检测到所述第一窗口切换为焦点窗口。
- 根据权利要求1-23中任一项所述的方法,其特征在于,所述第一屏幕为所述电子设备的外屏。
- 一种电子设备,其特征在于,包括一个或多个存储器,一个或多个处理器,以及存储在所述存储器上的计算机程序,显示屏,所述处理器执行所述计算机程序以实现权利要求1-24中任一项所述方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时以实现权利要求1-24中任一项所述方法的步骤。
- 一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序被处理器执行时以实现权利要求1-24中任一项所述方法的步骤。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202480046536.9A CN121569477A (zh) | 2024-06-12 | 2024-06-12 | 屏幕分区显示方法、图形界面及电子设备 |
| PCT/CN2024/098784 WO2025255751A1 (zh) | 2024-06-12 | 2024-06-12 | 屏幕分区显示方法、图形界面及电子设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2024/098784 WO2025255751A1 (zh) | 2024-06-12 | 2024-06-12 | 屏幕分区显示方法、图形界面及电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025255751A1 true WO2025255751A1 (zh) | 2025-12-18 |
Family
ID=98050047
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/098784 Pending WO2025255751A1 (zh) | 2024-06-12 | 2024-06-12 | 屏幕分区显示方法、图形界面及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121569477A (zh) |
| WO (1) | WO2025255751A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106155454A (zh) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | 一种界面显示方法、装置及电子设备 |
| US20180018937A1 (en) * | 2016-07-14 | 2018-01-18 | Guangzhou Shenma Mobile Information Technology Co., Ltd. | Method and apparatus for changing background color of toolbar with dominant color of picture |
| CN109460272A (zh) * | 2018-09-11 | 2019-03-12 | 广州优视网络科技有限公司 | 针对安卓系统的应用显示方法和装置 |
| CN111309425A (zh) * | 2020-02-14 | 2020-06-19 | Oppo广东移动通信有限公司 | 一种系统栏设置方法、装置及计算机可读存储介质 |
| CN117472479A (zh) * | 2022-07-20 | 2024-01-30 | 华为技术有限公司 | 显示方法和电子设备 |
-
2024
- 2024-06-12 WO PCT/CN2024/098784 patent/WO2025255751A1/zh active Pending
- 2024-06-12 CN CN202480046536.9A patent/CN121569477A/zh active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106155454A (zh) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | 一种界面显示方法、装置及电子设备 |
| US20180018937A1 (en) * | 2016-07-14 | 2018-01-18 | Guangzhou Shenma Mobile Information Technology Co., Ltd. | Method and apparatus for changing background color of toolbar with dominant color of picture |
| CN109460272A (zh) * | 2018-09-11 | 2019-03-12 | 广州优视网络科技有限公司 | 针对安卓系统的应用显示方法和装置 |
| CN111309425A (zh) * | 2020-02-14 | 2020-06-19 | Oppo广东移动通信有限公司 | 一种系统栏设置方法、装置及计算机可读存储介质 |
| CN117472479A (zh) * | 2022-07-20 | 2024-01-30 | 华为技术有限公司 | 显示方法和电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121569477A (zh) | 2026-02-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12400608B2 (en) | Method for adjusting display screen brightness, electronic device, and storage medium | |
| KR20150045121A (ko) | 멀티윈도우 운용 방법 및 이를 지원하는 전자 장치 | |
| WO2022052677A1 (zh) | 界面显示方法及电子设备 | |
| CN115033333B (zh) | 一种悬浮窗显示方法、电子设备和存储介质 | |
| CN113805744A (zh) | 窗口的显示方法和电子设备 | |
| WO2023005751A1 (zh) | 渲染方法及电子设备 | |
| WO2023124908A1 (zh) | 图标拼接方法及相关设备 | |
| CN116185248A (zh) | 一种视窗的显示方法以及相关设备 | |
| CN116033062B (zh) | 应用程序的界面显示方法、电子设备及可读存储介质 | |
| US20250383895A1 (en) | Wallpaper Display Method and Electronic Device | |
| CN118113180A (zh) | 一种应用界面分栏显示方法及电子设备 | |
| WO2021253922A1 (zh) | 字体切换方法及电子设备 | |
| CN116048317B (zh) | 一种显示方法及装置 | |
| CN116680133B (zh) | 一种黑屏检测方法和电子设备 | |
| US12524140B2 (en) | Window interaction method and electronic device | |
| CN118426798A (zh) | 一种资源切换方法及显示设备 | |
| CN117440073A (zh) | 显示方法、装置、电子设备和可读存储介质 | |
| CN121569477A (zh) | 屏幕分区显示方法、图形界面及电子设备 | |
| CN119690551B (zh) | 一种应用程序多窗口的显示方法以及电子设备 | |
| US20260019662A1 (en) | Screen recording method and electronic device | |
| US20250264976A1 (en) | Display method, display apparatus, and electronic device | |
| CN114580447B (zh) | 翻译方法、装置、存储介质及电子设备 | |
| WO2025199780A1 (zh) | 屏幕分区显示方法、图形界面及电子设备 | |
| EP4648041A1 (en) | Backlight brightness control method and electronic device | |
| CN120335665A (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: 24942928 Country of ref document: EP Kind code of ref document: A1 |