Screen partition display method, graphical interface and electronic equipment

CN121569477APending Publication Date: 2026-02-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480046536.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

When placing sensors and screens on the same side of an electronic device, how can we provide a screen with high space utilization and improve display quality while minimizing the impact of sensors on the display, given limited design space?

Method used

The screen is divided into a first section without a punch-hole area and a second section with a punch-hole area. The first section displays the main application interface, and the second section displays a background color that matches the first section. The sense of disjointedness is reduced by using self-configuration, pre-configuration, or real-time extraction of the background color.

Benefits of technology

It achieves a full-screen display effect, reduces the impact of sensors on the display, enhances the user's visual experience, and focuses on key content interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121569477A_ABST
    Figure CN121569477A_ABST
Patent Text Reader

Abstract

The invention provides a screen partition display method, a graphical interface and electronic equipment. The method is applied to the electronic equipment comprising a sensor and a screen, the screen comprises a first subarea and a second subarea which are arranged on the same face, the first subarea does not comprise a punching area, and the second subarea comprises a punching area used for arranging the sensor. And when the electronic equipment runs the application, displaying the window of the application in the first partition, and displaying the background color matched with the window of the application in the first partition in the second partition. The background color of the second partition is obtained by self-configuration of a developer of the application in the first partition, pre-configuration of the application by the electronic equipment, and combination of a background basic color extracted by the electronic equipment from a window of the application in the first partition in real time and a pre-configured background superposition color; or a background base color extracted by the electronic device in real time from a window applied in the first partition.
Need to check novelty before this filing date? Find Prior Art

Description

Screen partition display method, graphical interface and electronic device TECHNICAL FIELD

[0001] The present application relates to the terminal field, and in particular to a screen partition display method, a graphical interface and an electronic device. BACKGROUND

[0002] At present, more and more electronic devices have screens and various sensor modules. If the screen and the sensor are designed on the same surface of the electronic device, there is a conflict between the design areas of the screen and the sensor.

[0003] Therefore, in the case that the sensor and the screen are arranged on the same surface of the electronic device, how to provide a screen with a high space utilization rate and improve the display effect of the screen under the condition of limited design space.

[0004] SUMMARY

[0005] The present application provides a screen partition display method, a graphical interface and an electronic device. The method is applied to an electronic device including a sensor and a screen, the screen including a first partition and a second partition arranged on the same surface, the first partition not including a punching area, and the second partition including a punching area for arranging the sensor. When the electronic device runs an application, the first partition displays a window of the application, and the second partition displays a background color matched with the window of the application in the first partition. The background color displayed by the second partition is any one of the following: configured by a developer of the application in the first partition, preconfigured by the electronic device for the application, obtained by combining a background base color extracted from the window of the application in the first partition in real time with a preconfigured background overlay color, or obtained by the electronic device from the background base color extracted from the window of the application in the first partition in real time.

[0006] In a first aspect, a screen partition display method is provided. The method is 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 punching area, and the second partition including a punching area. The method includes: when a first application is run, displaying a first window provided by the first application in the first partition and displaying a first background in the second partition, a color value of the first background being the same as or similar to a color value of a first view in the first window; wherein the first view satisfies one or more of the following conditions: a layer number of the first view in the first window is Nth or above, the first view is in a visible state, an area of the first view is greater than a first value, or a background of the first view is not empty; receiving a first operation and running a second application; when the second application is run, displaying a second window of the second application in the first partition and displaying a second background in the second partition, a color value of the second background being the same as or similar to a color value of a second view in the second window.

[0007] The method described in the first aspect provides the ability of nearly full-screen display by making full use of the design area of the electronic device. The influence of the punch area for setting the sensor on the display effect is weakened. Specifically, the screen is divided into a second partition containing the punch area and a first partition not containing the punch area, then different contents are displayed in the partitions, and the background color of the second partition is adapted to the application window in the first partition, which weakens the sense of fragmentation between the screen partitions to create a full-screen joint display effect.

[0008] In combination with the method described in the first aspect, the first background only contains color elements and does not contain pattern elements.

[0009] In this way, the display elements of the second partition can be prevented from being too complex and distracting the user's attention, helping the user focus on the content of the key first partition and not affecting the user's main task interaction.

[0010] In combination with the method described in the first aspect, the first window is used to display one of the following: a home page of a social application, a chat page of a social application, a setting page of a social application, a home page of a music application, a play interface of a music application, a setting interface of a music application, a home page of a video application, a play interface of a video application, a setting interface of a video application, a home page of a shopping application, a play interface of a shopping application, or a setting interface of a shopping application.

[0011] In this way, when the electronic device displays any application interface in the first partition, the background color of the second partition can be adapted to the application in the first partition, expanding the application scenarios of the present solution.

[0012] In combination with the method described in the first aspect, the color value of the first background is a first preset value configured by the first application.

[0013] In this way, the electronic device can provide an interface for third-party applications to configure the background color of the second partition, support third-party application developers to customize the background color in the second partition, and thus bring the effect of full-screen joint display of application windows and improve the user's visual experience.

[0014] In combination with the method described in the first aspect, when the first application is configured with a first preset value, the color value of the first background is the first preset value. Before the first partition displays a first window provided by the first application, the objects of the first window are obtained by drawing the first window; before the second partition displays the first background, the color value of the first background is determined to be the first preset value configured by the first application based on a first attribute value contained in the objects of the first window.

[0015] In this way, the developer of the first application can configure the background color of the second partition corresponding to the window of the application.

[0016] The color value of the first background is a second preset value configured by the electronic device.

[0017] In this way, the developer of the electronic device can pre-configure the background color of the corresponding second partition, so that the first application can display the background color that is suitable for the first application in the first partition even if the developer of the first application does not configure the background color of the second partition, thereby improving the visual experience of the user.

[0018] In the method described in the first aspect, when the first application does not configure the first preset value and the electronic device is configured with the second preset value, the color value of the first background is the second preset value. The electronic device pre-configures a first white list, and the second preset value corresponding to the application in the first white list is pre-configured. The method further comprises: 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 corresponding to the color value of the first background, and determining that the first application belongs to the first white list, then determining that the color value of the first background is the second preset value.

[0019] In this way, the background color of the second partition configured by the first application can be used preferentially, so that the display effect of the entire set provided by the first application can be ensured preferentially. However, when the first application is not configured, the background color of the second partition configured by the electronic device can be used, so that the display effect of the first application in the first partition can be adapted to the background color of the second partition.

[0020] In the method described in the first aspect, the second preset value is obtained by superimposing a fourth color value on a third color value, the third color value is a pure color, and the fourth color value is a white color with gradual brightness.

[0021] In this way, by superimposing the white color with gradual brightness on the pure color, the display effects of the first partition and the second partition are slightly distinguished, so that the user does not have a visual sense of fragmentation, and a certain visual fusion experience can be ensured.

[0022] In the method described in the first aspect, the color value of the first background is determined according to a third preset value configured by the electronic device and according to the color value of the first view in the first window.

[0023] In this way, the color value extracted intelligently from the first view of the first window can be prevented from being too monotonous, and the third preset value pre-configured by the electronic device can be superimposed, thereby providing the user with a rich visual experience.

[0024] In a case where the first application is not configured with the first preset value, the electronic device is not configured with the second preset value, and the electronic device is configured with the third preset value, the color value of the first background is determined according to the third preset value configured by the electronic device and according to the color value of the first window. The electronic device preconfigures the first whitelist and the second whitelist, and preconfigures the second preset value corresponding to the application in the first whitelist and the third preset value corresponding to the application 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 rendering the first window; before displaying the first background in the second partition, determining that the first attribute value, which corresponds to the color value of the first background, is not included in the object of the first window, and determining that the first application does not belong to the first whitelist and belongs to the second whitelist, and then determining that the color value of the first background is determined according to the third preset value and according to the color value of the first view in the first window.

[0025] In this way, the background color of the second partition configured by the first application is preferentially used, the background color of the second partition preconfigured by the electronic device is used in a case where the first application is not configured, and the background base color of the second partition is intelligently extracted from the first window of the first application in a case where the electronic device only preconfigures the background overlay color (i.e., the third preset value) of the second partition, so that the background color of the second partition can be dynamically adapted to the application in the first partition in all directions.

[0026] In the method described in the first aspect, 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, and the third preset value is a white color with luminance gradient.

[0027] In this way, the display effects of the first partition and the second partition are slightly distinguished by superimposing the white color with luminance gradient on the pure color, so that the user is not given a visual split feeling, and a certain visual fusion experience is ensured.

[0028] In the method described in the first aspect, the first view in the first window is a fourth color value, the third color value is determined by adjusting the luminance of the fourth color value, when the luminance of the fourth color value is greater than a second value (for example, 0%) and less than a third value (for example, 50%), the luminance of the third color value is the third value, and when the luminance of the fourth color value is greater than or equal to the third value and less than a fourth value (for example, 100%), the luminance of the third color value is the fourth value.

[0029] In this way, when the background base color is extracted from the first view of the first window, a color value similar to the color value of the first view can be selected as the background base color, so that the background color of the second partition is similar to but slightly different from the first partition, so as not to interfere with the user's attention to the key information in the first partition.

[0030] In combination with the method described in the first aspect, the color value of the first background is determined according to the color value of the first view in the first window.

[0031] In combination with the method described in the first aspect, in a case where the first application is not configured with the first preset value, the electronic device is not configured with the second preset value, and the electronic device is not configured with the third preset value, the color value of the first background is determined according to the color value of the first view in the first window. The electronic device preconfigures a first whitelist and a second whitelist, and preconfigures the second preset value corresponding to the application in the first whitelist and the third preset value corresponding to the application in the second whitelist. The method further comprises: before the first partition displays the first window provided by the first application, obtaining the object of the first window by rendering the first window; before the second partition displays the first background, determining that the first attribute value corresponding to the color value of the first background is not included in the object of the first window, and determining that the first application does not belong to the first whitelist and does not belong to the second whitelist, then determining the color value of the first background according to the color value of the first view in the first window.

[0032] In this way, the background color of the second partition can be dynamically adapted to the application in the first partition in an all-round way.

[0033] In combination with the method described in the first aspect, the first view in the first window is a fourth color value; the color value of the first background is determined by adjusting the brightness of the fourth color value, when the brightness of the fourth color value is greater than a second value and less than a third value, the brightness of the color value of the first background is the third value, and when the brightness of the fourth color value belongs to greater than or equal to the third value and less than a fourth value, the brightness of the color value of the first background is the fourth value.

[0034] In this way, when the background base color is extracted from the first view of the first window, a color value similar to the color value of the first view can be selected as the background base color, so that the background color of the second partition is similar to but slightly different from the first partition, so as not to interfere with the user's attention to the key information in the first partition.

[0035] In combination with the method described in the first aspect, before the second partition displays the first background, the method further comprises: determining that the display mode of the first application is set to a light color mode.

[0036] Since the display mode of the interface of the first application in the first partition is dark in the dark mode, no additional processing is required for the background color of the second partition, and the dark display of the first partition is sufficient. Only when the display mode of the first application is light, the display method described above is used to control the background color of the second partition.

[0037] In combination with the method described in the first aspect, when the first background is displayed in the second partition, the method further includes: displaying state information of the electronic device in the second partition.

[0038] In this way, the second partition is used to display the content, such as the state information of the electronic device, which has a low requirement for the regularity and integrity of the screen, and the influence of the punch area on the display content can be avoided.

[0039] In combination with the method described in the first aspect, before running the first application, the method further includes: displaying a desktop background in the first partition and the second partition, displaying an application icon of the desktop in the first partition, and displaying state information of the electronic device in the second partition.

[0040] In this way, when the electronic device displays the desktop, the desktop background can be displayed in the first partition and the second partition.

[0041] In combination with the method described in the first aspect, before obtaining the first color value in the second partition corresponding to the first application, the method further includes: detecting that the first window is switched to the focus window.

[0042] In this way, the window in the first partition that is about to switch the application can be detected in time, so that the background color of the second partition can be adjusted in time, and the real-time and effectiveness of the display effect of the screen partition can be ensured.

[0043] In combination with the method described in the first aspect, the first screen is an outer screen of the electronic device.

[0044] In the second aspect, the present application provides an electronic device, which includes one or more memories, one or more processors, and a computer program stored in the memory, and a display screen. The processor executes the computer program to implement the steps described in any one of the first aspect.

[0045] In the third aspect, the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps described in any one of the first aspect are implemented.

[0046] In the fourth aspect, the present application provides a computer program product, which includes a computer program / instruction. When the computer program is executed by a processor, the steps described in any one of the first aspect are implemented. BRIEF DESCRIPTION OF DRAWINGS

[0047] FIG. 1 is a schematic diagram of a screen structure according to an embodiment of the present application;

[0048] FIG. 2 is a schematic diagram of another screen structure according to an embodiment of the present application;

[0049] FIGS. 3A-3D are schematic diagrams of screen partition display effects corresponding to several display strategies according to an embodiment of the present application;

[0050] FIGS. 4A-4D are schematic diagrams of another screen partition display effect according to an embodiment of the present application;

[0051] FIG. 5 is a schematic diagram of a screen partition display method according to an embodiment of the present application;

[0052] FIG. 6 is a schematic diagram of an OS interaction process of a screen partition display method according to an embodiment of the present application;

[0053] FIG. 7 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present application;

[0054] FIG. 8 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone.

[0056] Hereinafter, the terms "first" and "second" are only for descriptive purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.

[0057] In the present application, the phrase "embodiment" means that the specific features, structures or properties described in conjunction with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment independent of or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present application can be combined with other embodiments.

[0058] The term "user interface (UI)" in the embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes conversion between an internal form of information and a form that can be received by the user. The user interface is source code written in a specific computer language such as Java, extensible markup language (XML), and the like. The interface source code is parsed, rendered, and finally presented as content that can be recognized by the user on an electronic device. A commonly used form of the user interface is a graphic user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, and the like displayed in the display screen of the electronic device.

[0059] At present, users have high demands on the functions and quantity of sensors in electronic devices. Therefore, the design area of the sensors in the electronic devices is increasingly large, and accordingly, the design area of the screen in the electronic devices is limited. Taking a sensor as a camera of an electronic device and a screen as an outer screen of the electronic device as an example, the design area of the outer screen is limited by the camera. For details, reference can be made to FIG. 1.

[0060] FIG. 1 exemplarily shows a screen structure.

[0061] The electronic device shown in FIG. 1 is a foldable electronic device. The screen of the electronic device includes an inner screen and an outer screen. The inner screen refers to a screen running when the electronic device is in an unfolded state, and the outer screen refers to a screen running when the electronic device is in a folded state. In the case where the outer screen and the camera are both arranged on the same side (i.e., the side where the shell is located) of the electronic device, in order to ensure the normal realization of the camera function and the display effect of the outer screen, a regular and complete area other than the area where the camera is located is used as the design area of the outer screen. The regular area specifically refers to an area such as a rectangular area, a circular area, and the like, and the complete area refers to a single-connected area without holes, so as to ensure the completeness and regularity of the display effect.

[0062] FIG. 1 only introduces this screen design method in one exemplary scenario. Similarly, in the scenario of arranging other types of sensors and screens in the electronic device, if the sensor and the screen need to be arranged on the same side of the electronic device, the screen design method shown in FIG. 1 can be used. Here, examples are not given one by one.

[0063] Based on the screen design shown in FIG. 1, in the case that there is a conflict between the sensor and the design area of the screen of the electronic device, although the screen design shown in FIG. 1 can provide a regular display area, the screen design fails to fully utilize the design area of the electronic device, that is, the peripheral area of the camera is not fully utilized, so that the designed screen is relatively small, and the interactive experience brought to the user is not good.

[0064] To solve the problem existing in the screen structure shown in FIG. 1, the present application provides another improved screen structure. Next, the screen structure involved in the screen partition display method provided by the present application will be introduced in combination with FIG. 2.

[0065] FIG. 2 exemplarily shows another screen structure.

[0066] As shown in FIG. 2, the display method provided by the present 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 a first screen), the inner screen refers to the screen running when the electronic device 100 is in an unfolded state, and the outer screen refers to the screen running when the electronic device 100 is in a folded state. Comparing the screen designs in FIG. 1 and FIG. 2, the screen design in FIG. 2 fully utilizes the designable space, and extends the design area of the outer screen to the periphery of the sensor. On the basis of providing a larger outer screen, a challenge on the display effect of the outer screen is also brought. That is, although the area of the outer screen is larger, the outer screen is not a complete area, and contains a hole / hole, and the outer screen is punched / holed, which will affect the complete and regular display of the content in the screen.

[0067] Based on this, on the basis of extending the area of the outer screen, in order to further avoid the influence of the hole / hole for setting the sensor in the outer screen on the completeness of the display content, the present application further divides the outer screen into multiple areas, and then displays different types of content in different areas, so as to as far as possible reduce the influence of the hole / hole in the outer screen on the completeness of the display content. Optionally, the outer screen can be divided into a first partition and a second partition, the first partition is a single communication area (i.e. a hole-free area), and the second partition is a multi-communication area (i.e. a hole / hole area), the hole / hole in the second partition is used for setting the sensor, and when the electronic device runs an application, the first partition is used to display content with higher requirements for the regularity and completeness of the screen, such as an application interface, and the second partition is used to display content with lower requirements for the regularity and completeness of the screen, such as the status information of the electronic device (for details, see the description of FIG. 3A-FIG. 3D below), such a screen partition display method can avoid the influence of the sensor at the punched area on the display content of the screen. For specific screen partition display methods, refer to the introduction of FIG. 5-FIG. 6 below, and for the user interface of screen partition display, refer to the UI embodiments of FIG. 3A-FIG. 4D below.

[0068] FIG. 2 only exemplarily shows a screen design provided by the present application, which should not be construed as a limitation of the present application, and the screen partition display method provided by the present application can also be applied in other screen designs, as follows:

[0069] In other screen designs provided by the present application, the division direction of the second partition and the first partition can be horizontal division in addition to vertical division, and the partition division direction of the screen depends on the arrangement direction of the sensor punch region, if the punch region is arranged vertically, the second partition and the first partition can be vertically divided; if the punch region is arranged horizontally, the second partition and the first partition can be horizontally divided.

[0070] In other screen designs provided by the present application, the number of punch regions in the screen can also be one or more, and the number of punch regions depends on the design of the sensor, if the punch region is one, the one punch region can be used to set one sensor or can be used to set multiple sensors integrated into one; if the punch region is multiple, each punch region can be used to set one or more sensors.

[0071] In other screen designs provided by the present application, the screen using the partition design can be an inner screen in addition to an outer screen, or can be a screen of the electronic device 100 without an inner screen and an outer screen (such as a screen of a non-foldable electronic device 100). Although, usually, the number of sensors arranged in the surface of the inner screen of the electronic device 100 is small and the area is small, that is, the sensors in the surface of the inner screen of the electronic device 100 hardly affect the display effect of the inner screen, so there is no need to use the screen partition display method provided by the present application for the inner screen. However, in special cases, if the number of sensors arranged in the surface of the inner screen of the electronic device 100 is large and the area is large, the screen partition display method provided by the present application can be used. In summary, for the case of conflict between the design of the sensor and the screen area, the screen partition design and the screen partition display method provided by the present application can be used.

[0072] Based on the foregoing introduction to the screen partition structure in FIG. 2, when only the screen is partitioned to display different types of content, although the sensors in the punch region can avoid affecting the integrity of the screen display content, the partition may have a visual fragmentation feeling due to the display of different types of content, or there may be a problem of confusing the content that the user focuses on. On this basis, in order to further improve the screen partition display effect, it is necessary to further improve the display effect (such as background color) of the second partition, aiming to not only be able to bring the user a full-screen joint display visual experience, enhance the visual beauty, and weaken the fragmentation feeling of the second partition and the first partition, but also enable the user to focus on the main task displayed in the first partition and weaken the influence of the second partition on the first partition.

[0073] To solve the foregoing problems, the present application provides a screen partition display method, a graphical interface and an electronic device. The method is applied to an electronic device comprising a sensor and a screen, the screen comprising a first partition and a second partition arranged on the same surface, the first partition not comprising a punching area, and the second partition comprising a punching area for arranging the sensor. When the electronic device runs an application, the first partition displays a window of the application, and the second partition displays a background color matching the window of the application in the first partition. The background color displayed by the second partition is any one of the following: configured by a 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 from the window of the application in the first partition in real time with a pre-configured background overlay color, or obtained by the electronic device from the background base color extracted from the window of the application in the first partition in real time.

[0074] Next, some related concepts involved in the present application are introduced.

[0075] Sensor: can include one or more image sensors (i.e. camera), ambient light sensor, or proximity light sensor, etc.

[0076] Screen: the electronic device can be configured with only one screen; or, when the electronic device is a folding device, two screens can be configured, for example, a folding electronic device from top to bottom, which can be configured with two inner and outer screens; or, when the electronic device is a folding device, three screens can also be configured, for example, a folding electronic device from left to right, which can be configured with an outer screen and an inner screen, and the inner screen further comprises two screens. In general, the number of screens of the electronic device, whether the screen is folded, and the folding form are not limited in the embodiments of the present application.

[0077] First partition and first partition: refer to two sub-areas connected to each other and not overlapping in a screen. The structure of the two areas can be referred to the description of the partition structure of the outer screen shown in Fig. 2 below, which is not described here.

[0078] Punching area refers to the hole / ditch in the second partition of the screen. The second partition is equivalent to a multi-connected region in the mathematical concept, and the punching area in the second partition is equivalent to a hole / ditch in the multi-connected region in the mathematical concept.

[0079] Window of application: refers to the window of the application interface in the first partition when the electronic device runs the application. The window forms the application interface visible to the user by being displayed in the first partition. 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, and the like. Whenever the user switches the application interface, the electronic device needs to switch the focus window (that is, set the window corresponding to the old application interface to the invisible state, and set the window corresponding to the new application interface to the visible state) to realize the switching of the new user interface.

[0080] Background color: refers to the color as the bottom layer in the interface element displayed in the first partition. The background color can be a single color (that is, the background base color described in the embodiments of the present application), or a color composed of multiple colors (that is, the color obtained by combining the background base color with the background overlay color described in the embodiments of the present application).

[0081] State information of the electronic device: refers to the time, date, and the like information displayed in the second partition.

[0082] After implementing the display method, the graphical interface, and the electronic device provided in the present application, the following beneficial effects can be brought:

[0083] (1) The design area of the electronic device is fully utilized, the screen and the sensor are compatible, the normal implementation of the sensing function is ensured, and the capability of nearly full-screen display is provided. Specifically, a hole is punched in the screen, and the sensor is arranged at the hole area, so that the area around the sensor can be expanded to the design area of the screen.

[0084] (2) The influence of the sensor in the screen on the display effect is weakened. Specifically, the screen is divided into the second partition containing the hole area and the first partition not containing the hole area, and then different contents are displayed in different partitions, including displaying the content (such as the application interface) with higher requirements for the regularity and completeness of the screen in the first partition, and displaying the content (such as the state information of the electronic device) with lower requirements for the regularity and completeness of the screen in the second partition.

[0085] (3) An interface for the third-party application to self-configure the background color of the second partition is provided, which supports the third-party application developer to customize the background color in the second partition, thereby bringing the effect of full-screen joint display of the application window and improving the visual experience of the user.

[0086] (4) The background color in the second partition is preconfigured to match the application in the first partition, or a similar color is intelligently extracted from the application in the first partition as the background color of the second partition, so that the second partition can adapt to the display effect of the application window in the first partition, which weakens the fragmentation between the screen partitions to create a full-screen joint display effect, and focuses on the content of the key partition without affecting the user's main task interaction.

[0087] Next, several display strategies are exemplarily shown in Figs. 3A-3D.

[0088] Fig. 3A exemplarily shows a user interface in which an application configures the background color of the second partition.

[0089] Fig. 3Aa shows a user interface 31 displayed on the outer screen of the electronic device 100, which is the home interface. The home interface includes a first partition and a second partition, which jointly display the background of the system theme, and the first partition displays application icons and the second partition displays the status information of the electronic device (temporarily only time is exemplarily shown).

[0090] If the electronic device 100 receives an operation on the icon of the application A shown in Fig. 3Aa, the electronic device displays the interface of the application A in the first partition in response to the operation. If the application A also configures the background color of the second partition, the electronic device 100 also displays the background color configured by the application A in the second partition, which is the user interface 32 shown in Fig. 3Ab as described below.

[0091] The application A configuring the background color of the second partition means that the developer of the application A configures the corresponding background color of the second partition in the installation package of the application A when developing or updating the application A, and the electronic device 100 displays the background color corresponding to the application A in the second partition after installing and running the application A. The application A can be a third-party application or a system application, and the present application does not limit this.

[0092] Fig. 3Ab shows a user interface 32 displayed on the outer screen of the electronic device 100, which is the interface. The interface includes a second partition and a first partition, the first partition displays the interface of the application A, and the background of most controls in the interface of the application A is white, and the second partition displays the background color configured by the application A (also referred to as the first background color). Optionally, the electronic device displays the status information of the electronic device, such as black (corresponding color value is also referred to as the first preset value, which can be saturation 42, brightness 26%, and hue FFFF) time, in order to match the background color in the second partition, so that the user can accurately read the status information of the electronic device.

[0093] The display effect of the application self-configuring the background color of the second partition shown in FIG. 3A is only an example, and the background color of the second partition self-configured by different applications can be different, but the background of the second partition is similar to the style of the first partition. Here, only the white color displayed by the application A is taken as an example to introduce, and should not be construed as a limitation to the present application. Optionally, in addition to self-configuring the background color of the second partition, the application A can also configure the format of the text in the second partition, and the like, which is not limited in the embodiments of the present application, and will not be described here.

[0094] FIG. 3B exemplarily shows a user interface of a group of electronic devices pre-configuring the background color of the second partition.

[0095] a of FIG. 3B shows a user interface 33, which is an interface displayed on the outer screen of the electronic device 100, and the interface is the same as the user interface 32 shown in b of FIG. 3A, and the description of the interface can refer to the foregoing description, which will not be described here.

[0096] If the electronic device 100 receives an operation (also referred to as a first operation) for switching from the application A to the application B, in response to the operation, the electronic device switches to display the interface of the application B in the first partition. If the application B does not self-configure the background color of the second partition, and the electronic device 100 pre-configures the background color of the second partition corresponding to the application B, the electronic device 100 will also display the background color of the second partition corresponding to the application B pre-configured by the electronic device 100 in the second partition, which is specifically shown in the user interface 34 shown in b of FIG. 3B as described below.

[0097] The electronic device pre-configuring the background color of the second partition corresponding to the application B means that the developer of the electronic device 100 configures the background color of the second partition corresponding to the application B when developing the electronic device / updating the electronic device system. Optionally, an XML file can be configured for the application B using an Extensive Markup Language (XML), and the background color of the second partition corresponding to the application B is stored in the XML file. Subsequently, the developer of the electronic device 100 can remotely update the XML file of the application B to update the background color of the second partition corresponding to the application B.

[0098] Figure 3B(b) shows a user interface 34 displayed on the outer screen of the electronic device 100. The user interface 34 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application B, and the background of a larger control in the interface has a color value A. The background color (also referred to as a second background color) displayed in the second sub-region is changed to a color value formed by superimposing a color value a on the color value A. Each control in the interface of the application B can be implemented by drawing a corresponding view. Alternatively, the electronic device displays the state information of the electronic device, such as the time, in a certain contrast with the background color in the second sub-region, so as to ensure that the user can accurately read the state information of the electronic device.

[0099] The preconfigured background color of the electronic device 100 can include a background base color, i.e., the color value A (also referred to as a third color value), and a background superimposed color, i.e., the color value a (also referred to as a fourth color value). Alternatively, the preconfigured background color of the electronic device 100 is a final color value (also referred to as a second preset value) formed by superimposing the color value a on the color value A. The color value A can be a single solid color. In Figure 3B, the color value A is represented by a diagonal line pattern with evenly filled intervals. The color value A is the same as the color value in the interface of the corresponding application B. The color value a can be a color value with a luminance gradient effect. In Figure 3B, the color value a is represented by a horizontal line pattern with intervals from dense to sparse. The color value a is, for example, a white color with a luminance gradient. In this way, after superimposing the color value a on the color value A, the information of the base color value A can be retained, and the second sub-region and the first sub-region can be slightly distinguished by the overlaying luminance gradient effect, which can avoid the sense of fragmentation of the two sub-regions and help the user focus on the key task in the first sub-region. It can be understood that the background base color included in the preconfigured background color of the electronic device can be completely consistent with the color A in the application B, or can be similar to the color A in the application B. The embodiments of the present application do not limit this.

[0100] The display effect of the preconfigured background color of the second sub-region 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 the user interface 33 to displaying the user interface 34. The electronic device 100 can also preset the same background color for different applications, or preset different background colors, or preset the same background superimposed color in combination with different background base colors. Here, only the color A superimposed with the color a for the application B is taken as an example for introduction, which should not be construed as a limitation on the present application. Alternatively, the electronic device 100 can preconfigure the format of the text in the second sub-region corresponding to the application B in addition to the preconfigured second sub-region background color corresponding to the application B. The embodiments of the present application do not limit this, and details are not described here.

[0101] FIG. 3C illustrates a user interface of a second partition with a background color extracted from a set of electronic devices pre-configurations in combination with smart extraction.

[0102] FIG. 3C(a) illustrates a user interface 35, which is the interface displayed on the outer screen of the electronic device 100. The interface is the same as the user interface 34 illustrated in FIG. 3B(b), and the description of the interface is referred to the foregoing description and will not be repeated here.

[0103] If the electronic device 100 receives an operation (referred to as a first operation) for switching from the application B to the application C, the electronic device switches to display the interface of the application C in the first partition in response to the operation. If the application C does not configure the background color of the second partition, and the electronic device 100 only pre-configures the background overlay color (referred to as a third preset value) of the application C in the second partition, the electronic device 100 further extracts the background base color of the second partition from the interface of the application C displayed in the first partition, and then combines the extracted background base color with the pre-configured background overlay color as the background color displayed in the second partition, as illustrated in the user interface 36 of FIG. 3C(b) described below.

[0104] FIG. 3C(b) illustrates a user interface 36, which is the interface displayed on the outer screen of the electronic device 100. The interface includes a second partition and a first partition. The first partition displays the interface of the application C, and the background color of the larger control in the interface is B. The background color displayed in the second partition is changed to the color value formed by overlaying the color value b on the color value B'. Optionally, the electronic device displays the status information of the electronic device, such as the display time of black, to match the background color in the second partition, so as to ensure that the user can accurately read the status information of the electronic device.

[0105] The color value B' is extracted by the electronic device from the color B in the interface of the application C in the first partition, and the color value B' can be a single pure color. In FIG. 3C, the color value B is represented by a vertical line pattern with evenly and sparsely filled intervals, and the color value B' is represented by a vertical line pattern with evenly and closely filled intervals, which is similar to the color value B. The manner in which the electronic device extracts the color value B' from the color value B in the application C will be described below in the method embodiments, and will not be repeated here. The color value b can be a color value with a luminance gradient effect, which can be the same as or different from the color value a. In FIG. 3C, the color value b is represented by a horizontal line pattern with densely to sparsely filled intervals, and the color value b is, for example, a white color with a luminance gradient. In this way, after the color value b is superimposed on the color value B', the information of the basic color value B' can be retained, and the second partition can be slightly distinguished from the first partition through the covering luminance gradient effect, so that the fragmentation of the two partitions can be avoided, and the user can be helped to focus on the key task in the first partition.

[0106] The display effect of the second partition with the pre-configured background color extracted by the electronic device shown in FIG. 3C is only an example. The electronic device 100 can switch from displaying the user interface 35 to displaying the user interface 36, and the electronic device 100 can preset the same background superimposed color or different background superimposed colors for different applications. Here, only the presetting of the application color value b for the application C is taken as an example, and this should not be construed as a limitation on the present application. Optionally, in addition to the pre-configured second partition background superimposed color corresponding to the application C, the electronic device can also pre-configure the format of the text in the second partition corresponding to the application C, and the embodiments of the present application do not limit this, which will not be repeated here.

[0107] FIG. 3D exemplarily shows a group of user interfaces of the second partition with the background color extracted by the electronic device.

[0108] FIG. 3Da shows a user interface 37, which is an interface displayed on the outer screen of the electronic device 100. The interface is the same as the user interface 36 shown in FIG. 3Cb, and the description of the interface will not be repeated here.

[0109] If the electronic device 100 receives an operation for switching from the application C to the application D, the electronic device switches to display the interface of the application D in the first partition in response to the operation. If the application D does not configure the background color of the second partition, and the electronic device 100 also does not pre-configure the background color of the second partition corresponding to the application D, the electronic device 100 extracts the background basic color of the corresponding second partition from the interface of the application D displayed in the first partition, and then takes the extracted background basic color as the background color displayed in the second partition. The specific user interface 38 is shown in FIG. 3Db described below.

[0110] Fig. 3D(b) illustrates a user interface 38 displayed on the outer screen of the electronic device 100. The user interface 38 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application D, and the background of a larger control in the interface has a color value C (also referred to as a fourth color value). The second sub-region displays a background color with a color value C' (also referred to as a third color value). Optionally, the electronic device displays the status information of the electronic device, such as the time, in a certain contrast with the background color in the second sub-region, so as to ensure that the user can accurately read the status information of the electronic device.

[0111] Optionally, the color value C' is extracted by the electronic device from the interface of the application D in the first sub-region. The color value C' can be a single pure color. In Fig. 3D, the color value C is represented by a vertical line pattern with evenly and sparsely filled intervals, and the color value C' is represented by a vertical line pattern with evenly and closely filled intervals. The color value C' is similar to the color value C. The manner in which the electronic device extracts the color value C' from the color value C in the application D will be described in the following method embodiment, and will not be described herein again.

[0112] The display effect of the background color of the second sub-region extracted by the electronic device in Fig. 3D is only an example. The electronic device 100 can switch from displaying the user interface 37 to displaying the user interface 38. Here, only the switching from the user interface 37 displaying the application C to the user interface 38 displaying the application D is introduced as an example, and should not be construed as a limitation to the present application.

[0113] In the embodiments of the present application, the display mode of the electronic device 100 includes a light mode and a dark mode. The electronic device 100 can switch the display mode based on a user operation, ambient light, or time. The light mode refers to that the background displayed by the electronic device 100 is mainly white or other light colors, and is matched with black or dark text and graphical elements. The dark mode refers to that the background displayed by the electronic device 100 is mainly black or dark, and is matched with white or light text and graphical elements.

[0114] The foregoing Figs. 3A-3D all illustrate the display effect of the electronic device 100 using screen partitioning when the electronic device 100 applies the light mode. When the electronic device 100 applies the dark mode, the background color of the second sub-region of the electronic device 100 is always black or dark. For details, refer to the introduction of Figs. 4A-4D below.

[0115] Fig. 4A illustrates a set of display effects of the electronic device 100 using screen partitioning in the dark mode.

[0116] Figure 4A(a) shows a user interface 41 displayed on the outer screen of the electronic device 100, which is the home screen. The home screen includes a first partition and a second partition, which jointly display a background of the system theme, and the first partition displays application icons and the second partition displays status information (temporarily only time is shown as an example) of the electronic device. Optionally, when the system display mode of the electronic device 100 is set to the light color mode, the display effect of the home screen is as shown in Figure 4A(a); when the system display mode of the electronic device 100 is set to the dark color mode, the display effect of the home screen is different from that of Figure 4A(a) (not shown in Figure 4A).

[0117] If the electronic device 100 receives an operation on the icon of the application A shown in Figure 4A(a), in response to the operation, the electronic device 100 displays the interface of the application A in the first partition. If the application A is set to the dark color mode, although the application A self-configures the background color of the second partition, the electronic device 100 still displays a black background in the second partition instead of the background color configured by the application A, which is shown in the user interface 42 described below in Figure 4A(b).

[0118] Optionally, the manner in which the application A is set to the dark color mode / light color mode includes but is not limited to:

[0119] (1) In the case where the application follows the system, when the system of the electronic device 100 is set to the dark color mode, the application A is automatically set to the dark color mode following the display mode of the system, and when the system of the electronic device 100 is set to the light color mode, the application A is automatically set to the light color mode following the display mode of the system.

[0120] (2) In the case where the application does not follow the system, no matter whether the display mode of the system is set to the dark color mode / light color mode, the display mode of the application A is set according to the operation of the user, when the user turns on the dark color mode of the application A, the display mode of the application A is set to the dark color mode, and the display mode of the application A no longer changes with the display mode of the system; when the user turns on the light color mode of the application A, the display mode of the application A is set to the light color mode, and the display mode of the application A no longer changes with the display mode of the system. Figure 4A(a) only shows the scenario where the system is set to the light color mode, the application A does not follow the system and is set to the dark color mode. If in the scenario where the system is set to the dark color mode, the application A does not follow the system and is set to the dark color mode, although the electronic device 100 displays a dark home screen which is different from the home screen in the light color mode shown in Figure 4A, the display effect of the interface of the application A is the same as that shown in Figure 4A(b), which is also shown in the user interface 42 described below in Figure 4A(b).

[0121] Fig. 4A(b) shows a user interface 42 displayed by the electronic device 100. The user interface 42 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application A, and the interface of the application A has a black background. The second sub-region displays in accordance with the corresponding black background color in the dark mode. Optionally, the electronic device 100 displays the status information of the electronic device in a certain contrast with the background color in the second sub-region, for example, displays the time in white (the corresponding color value can be a saturation of 3D, a brightness of 24%, and a hue of #000000), so as to ensure that the user can accurately read the status information of the electronic device.

[0122] The effect of the screen partition display of the electronic device 100 in the dark mode shown in Fig. 4A is only an example. In the dark mode, the background color of different applications in the first sub-region can be different. For example, the background of the second sub-region can also be gray. Here, only the black background displayed by the application A and the black background displayed by the second sub-region are taken as examples for description, and should not be construed as a limitation to the present application.

[0123] Fig. 4B shows another set of effects of the screen partition display of the electronic device 100 in the dark mode.

[0124] Fig. 4B(a) shows a user interface 43 displayed by the electronic device 100. The user interface 43 is the same as the user interface 42 shown in Fig. 4A(b), and the description of the user interface 43 can refer to the foregoing description, which will not be repeated here.

[0125] If the electronic device 100 receives an operation for switching from the application A to the application B, the electronic device 100 switches to display the interface of the application B in the first sub-region in response to the operation. If the application B is set in the dark mode, although the application B does not configure the background color of the second sub-region, and the electronic device 100 pre-configures the background color of the second sub-region corresponding to the application B, the electronic device 100 still displays a black background in the second sub-region. The specific user interface 44 is shown in Fig. 4B(b) as described below.

[0126] The manner in which the application B is set in the dark mode / light mode can refer to the manner in which the application A is set in the dark mode / light mode as described above, which will not be repeated here.

[0127] Fig. 4B(b) shows a user interface 44 displayed by the electronic device 100. The user interface 44 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application B, and the interface of the application B has a black background. The second sub-region displays in accordance with the corresponding black background color in the dark mode. Optionally, the electronic device 100 displays the status information of the electronic device in a certain contrast with the background color in the second sub-region, such as a white time, so as to ensure that the user can accurately read the status information of the electronic device.

[0128] The screen partition display effect of the electronic device 100 in the dark mode shown in Fig. 4B is only an example. The background color of different applications in the first sub-region in the dark mode can be different. For example, the background of the second sub-region can also be gray. Here, only the black background of the application B is displayed. The second sub-region also displays a black background. This should not be construed as a limitation to the present application.

[0129] Fig. 4C exemplarily shows another set of screen partition display effects of the electronic device 100 in the dark mode.

[0130] Fig. 4C(a) shows a user interface 45 displayed by the electronic device 100. The user interface 45 is the same as the user interface 44 shown in Fig. 4B(b). The description of the user interface 45 can be referred to the foregoing description and will not be repeated here.

[0131] If the electronic device 100 receives an operation for switching from the application B to an application C, the electronic device switches to display an interface of the application C in the first sub-region in response to the operation. If the application C is set in the dark mode, although the application C does not configure the background color of the second sub-region, and the electronic device 100 only pre-configures the background overlay color of the second sub-region corresponding to the application C, the electronic device 100 still displays a black background in the second sub-region, instead of extracting the background base color of the second sub-region from the interface of the application C displayed in the first sub-region, and then combining the pre-configured background overlay color as the background color displayed in the second sub-region. The specific user interface 46 is shown in Fig. 4C(b) described below.

[0132] The manner in which the application C is set in the dark mode / light mode can be referred to the manner in which the application A is set in the dark mode / light mode described above, and will not be repeated here.

[0133] Figure 4C(b) illustrates a user interface 46 displayed by the outer screen of the electronic device 100. The user interface 46 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application C, and the interface of the application C has a black background. The second sub-region displays in accordance with the corresponding black background color in the dark mode. Optionally, the electronic device 100 displays the status information of the electronic device in a certain contrast with the background color in the second sub-region, such as displaying the time in white, so as to ensure that the user can accurately read the status information of the electronic device.

[0134] The effect of the screen sub-region display of the electronic device 100 in the dark mode illustrated in Figure 4C is only an example. The background color of different applications in the first sub-region in the dark mode can be different. For example, the background of the second sub-region can also be gray. Here, only the black background of the application C is displayed. The second sub-region is also taken as an example of displaying the black background, and should not be construed as a limitation to the present application.

[0135] Figure 4D illustrates another set of effects of the screen sub-region display of the electronic device 100 in the dark mode.

[0136] Figure 4D(a) illustrates a user interface 47 displayed by the outer screen of the electronic device 100. The user interface 47 is the same as the user interface 46 illustrated in Figure 4C(b), and the description of the user interface 47 is referred to the foregoing description and will not be repeated here.

[0137] If the electronic device 100 receives an operation for switching from the application C to the application D, the electronic device 100 switches to display the interface of the application D in the first sub-region in response to the operation. If the application D is set to the dark mode, although the application D is not configured with the background color of the second sub-region, and the electronic device 100 is not pre-configured with the background color of the second sub-region corresponding to the application D, the electronic device 100 still displays the black background in the second sub-region, instead of extracting the background base color of the second sub-region from the interface of the application D displayed in the first sub-region, and then taking the extracted background base color as the background color displayed in the second sub-region. The specific user interface 48 is illustrated in Figure 4D(b) as described below.

[0138] The manner in which the application D is set to the dark mode / light mode is referred to the manner in which the application A is set to the dark mode / light mode as described above, and will not be repeated here.

[0139] Figure 4D(b) shows a user interface 48 displayed on the outer screen of the electronic device 100. The user interface 48 includes a second sub-region and a first sub-region. The first sub-region displays an interface of an application D, and the interface of the application D has a black background. The second sub-region is displayed according to the corresponding black background color in the dark mode. Optionally, the electronic device 100 displays the status information of the electronic device, such as the time, in a certain contrast with the background color in the second sub-region, so as to ensure that the user can accurately read the status information of the electronic device.

[0140] The effect of the electronic device 100 in the dark mode shown in Figure 4D is only an example. In the dark mode, the background color of different applications in the first sub-region can be different. For example, the background of the second sub-region can also be gray. Here, only the black background of the application D is displayed. The second sub-region is also taken as an example of displaying a black background, and should not be construed as a limitation to the present application.

[0141] Based on the UI embodiments described above, the following will describe the four screen sub-region display strategies provided by the present application in combination with the screen sub-region display method flow shown in Figure 5.

[0142] Figure 5 shows an example of a screen sub-region display method flow. The screen sub-region display method flow includes the following steps:

[0143] S51-S52: Triggering the background color plate in the second sub-region to switch to a background color that is adapted to the application window in the first sub-region.

[0144] S51, detecting that the focus window to be displayed in the first sub-region of the screen is switched.

[0145] Specifically, when the electronic device 100 runs the screen, the electronic device 100 can display an application window in the first sub-region of the screen. The window displayed in the top layer, visible to the user, and directly interactable by the user is the focus window. Taking the scenario shown in Figure 3A as an example, when the first sub-region of the screen displays the desktop, the focus window is the window provided by the desktop application. When the electronic device opens the application A and displays the interface of the application A in the first sub-region of the screen, the focus window is switched to the window of the application A. Taking the scenario shown in Figure 3B as an example, when the electronic device opens the application B and displays the interface of the application B in the first sub-region of the screen, the focus window is switched to the window of the application B. Taking the scenario shown in Figure 3C as an example, when the electronic device opens the application C and displays the interface of the application C in the first sub-region of the screen, the focus window is switched to the window of the application C. Taking the scenario shown in Figure 3D as an example, when the electronic device opens the application D and displays the interface of the application D in the first sub-region of the screen, the focus window is switched to the window of the application D.

[0146] Optionally, in response to the operation of the user switching the application interface, the switching of the focus window can be triggered to display the switched application interface in the first partition of the screen. Specifically, in response to the operation of the user switching the application interface, the Activity manager service (AMS) of the electronic device starts a new Activity corresponding to the new interface, and the AMS starts to manage the running state of the new Activity and the running state of the old Activity. When the AMS notifies the Window manager service (WMS) that the new Activity is switched to the Resumed state and the old Activity is switched to the Paused state, the WMS is triggered to switch the focus window, including setting the old window corresponding to the old Activity to the invisible state and setting the new window corresponding to the new Activity to the visible state, so as to trigger the subsequent drawing, rendering, compositing and display of the new window, thereby realizing the display of the switched new interface.

[0147] Optionally, the screen herein can be the outer screen shown in FIG. 2, and the description of the screen can refer to the foregoing description.

[0148] Optionally, before detecting the switching of the focus window to be displayed in the first partition of the screen, it can be determined whether the screen is partitioned for display. If it is determined that the screen is partitioned for display, the partitioned display strategy shown in FIG. 5 is used for display. If it is determined that the screen is displayed in full screen, the corresponding full screen display strategy is used for display. The content of the full screen display is not specifically limited in the embodiments of the present application, and can be determined by the desktop or other application to be displayed. For example, the scenarios of full screen display include but are not limited to the scenarios of displaying the desktop, the weather or other application programs. The present application can preset the scenarios of full screen display, or can preset the scenarios of partitioned display.

[0149] S52, after the drawing of the switched focus window is completed, the focus window object is obtained.

[0150] Specifically, after detecting the switching of the focus window, the electronic device performs the task of drawing the focus window. When the electronic device completes the drawing of the focus window, the electronic device can obtain the focus window object after the drawing is completed.

[0151] 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.

[0152] Optionally, if the application to which the window belongs has its own background color configured for the second partition corresponding to the window, 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.

[0153] S53~S54-2: Strategy 1, using the self-configured color value as the background color of the second partition.

[0154] S53, determine whether the corresponding first application should configure the background color of the second partition based on the focused window object.

[0155] Specifically, 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. If 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 background color of the second partition is controlled according to the self-configuration result of the corresponding first application (i.e., executing subsequent S54-1 to S54-2); if it is determined that the focus window object does not carry the corresponding attribute value, it is determined that the first application has not 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., executing subsequent S55, etc.).

[0156] S54-1, If ​​it is determined that the background color of the second partition is configured by the first application, then the background color of the second partition is obtained based on the attribute value in the focused window object.

[0157] Specifically, 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. Typically, 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.

[0158] S54-2, display the focus window of the first application in the first partition of the screen, and display the background color configured by the first application in the second partition of the screen.

[0159] Specifically, after the electronic device switches the focus window, the switched focus window can be displayed in the first partition, thereby forming the user interface of the first application, and after 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.

[0160] Optionally, the electronic device can display the focus window in the first partition and the corresponding background color in the second partition at the same time, or 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 in the two partitions at the same time. The embodiments of the present application do not limit this, and the specific strategy of the electronic device for controlling the screen display depends on whether the screen can only support refreshing the first partition and the second partition at the same time or can support refreshing the first partition and the second partition separately.

[0161] The partition display effect involved in S54-2 can also refer to the description of FIG. 3A in the foregoing UI embodiment, which will not be described here in detail.

[0162] S55-S56-2: Strategy 2, using the color value preconfigured by the electronic device as the background color of the second partition.

[0163] S55, if it is determined that the first application does not configure the background color of the second partition, it is determined whether the first application belongs to a first white list of the electronic device.

[0164] Specifically, the electronic device can preconfigure a default background color of the second partition for the application in the first white list, and therefore, the electronic device can detect whether the first application belongs to the first white list, if yes, use the color value preconfigured by the electronic device as the background color of the second partition for display (i.e., execute S56-1-S56-2 subsequently); if not, use the color value extracted intelligently as the background color of the second partition for display (i.e., execute S57 and the like subsequently).

[0165] The background colors of the second partition corresponding to different applications in the first white list can be the same or different, one application can correspond to one background color, or one application can correspond to different background colors according to different window levels, for example, the windows of the first-level interface of the application and the windows of the second-level interface can be configured with different background colors. The embodiments of the present application do not limit this.

[0166] S56-1, if the first application belongs to the first white list, the background color of the second partition corresponding to the first application is obtained from the configuration file of the first application.

[0167] Specifically, after determining that the first application belongs to the first whitelist, the background color of the second partition pre-configured by the electronic device is obtained from the configuration file of the first application. When the electronic device configures only one background color for the first application, the one background color can be used for any window of the first application as the focus window, and when the electronic device configures multiple background colors for the first application, the corresponding background color is further obtained based on the interface level of the first application corresponding to the current focus window. The latter mainly considers that the colors of different levels of interfaces of the same application are different, and thus the electronic device can pre-configure the same or similar background color according to different levels of interfaces.

[0168] Optionally, 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 the embodiments of the present application) or a color composed of multiple colors (i.e., the color obtained by combining the background base color with the background overlay color described in the embodiments of the present application). The background base color can be a single color in the Hue-Saturation-Brightness (HSB) color space, such as pink, yellow, green, or red, and the background overlay color can be a white color with a luminance gradient in the HSB color space, which is superimposed on the background base color and does not completely cover the original background base color, but can distinguish the first partition and the second partition through the effect of the luminance gradient, so that the user focuses on the main task in the first partition. The embodiments of the present application do not limit this.

[0169] S56-2, displaying the focus window of the first application in the first partition of the screen and displaying the background color configured by the electronic device in the second partition of the screen.

[0170] Specifically, after the electronic device switches the focus window, the switched focus window can be displayed in the first partition, thereby forming the user interface of the first application, and after 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.

[0171] Optionally, the electronic device can simultaneously display the focus window in the first partition and the corresponding background color in the second partition, or 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 simultaneously seeing the content switching in the two partitions. The embodiments of the present application do not limit this, and the specific determination depends on the strategy of the electronic device for controlling the screen display. The screen can support refreshing the first partition and the second partition at the same time, or can support refreshing the first partition and the second partition separately.

[0172] The partition display effect involved in S56-2 can also refer to the description of FIG. 3B in the foregoing UI embodiment, and details are not repeated here.

[0173] S57-S58-4: Strategy 3, using the background base color extracted by the electronic device intelligently and the background overlay color preset by the electronic device as the background color of the second partition.

[0174] S57, if the first application does not belong to the first whitelist, determining whether the first application belongs to a second whitelist of the electronic device.

[0175] Specifically, the electronic device can pre-configure the background overlay color of the second partition for the application in the second whitelist, which is used to overlay the background base color extracted from the focus window 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, use the background overlay color preset by the electronic device as the overlay layer of the background color of the second partition to display (i.e., execute S58-1-S58-4 subsequently); if it does not, use the intelligently extracted background base color as the background color of the second partition to display (i.e., execute S59-1-S59-2 subsequently).

[0176] Among them, the background overlay color of the second partition corresponding to different applications in the second whitelist 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, for example, the windows of the first interface of the application, the windows of the second interface, etc. can be configured with different background overlay colors, and the present application embodiment does not limit this.

[0177] S58-1, if the first application belongs to the second whitelist, obtaining the corresponding background overlay color of the second partition from the configuration file of the first application.

[0178] Specifically, after determining that the first application belongs to the second whitelist, the background overlay color of the second partition pre-configured by the electronic device is obtained from the configuration file of the first application. When the electronic device only configures one background overlay color for the first application, no matter which window of the first application is the focus window, the one background overlay color can be used, and when the electronic device configures multiple background overlay colors for the first application, the corresponding background overlay color is also obtained based on the interface level of the first application corresponding to the current focus window.

[0179] Optionally, the background overlay color of the second partition corresponding to each application pre-configured by the electronic device is white with luminance gradient or other color value with luminance gradient, which is overlaid on the background base color and neither completely covers the background base color nor distinguishes the first partition and the second partition through the effect of luminance gradient, so that the user focuses on the main task in the first partition, and the embodiments of the present application do not limit this.

[0180] S58-2, extracting the background base color of the corresponding second partition from the View corresponding to the focus window object.

[0181] Specifically, after determining that the first application belongs to the second whitelist, in addition to obtaining the background overlay color from the configuration file of the first application, the background base color is also extracted from the View in the corresponding focus window based on the focus window object, and the embodiments of the present application do not limit the order of the two steps.

[0182] The focus window object carries a window identifier, and the focus window drawn by each View is composed of various controls, texts, etc., and the electronic device can extract the color of the View of the focus window based on the window identifier as the background base color of the second partition.

[0183] Optionally, the View of the focus window can include many, and the colors of different Views can not be completely consistent, therefore, the electronic device can select the View in the focus window that meets the following conditions: the number of layers is within the top 10 layers, is visible to the user, occupies an area greater than 80% of the root view (DecorView), and the background color is not empty, and finally the color value same as or similar to the background color of the View is selected as the final background base color.

[0184] Optionally, a method of 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 background color of the View into an HSB color space, and then adjusting the value of the luminance B channel in the HSB color space, for example: the value of the luminance B channel is divided into multiple values by 0% to 100% luminance B, and is divided into 50% and 100%, and then the actual luminance B belonging to 0% to 50% is set to 50%, and the actual luminance B belonging to 50% to 100% is set to 100%. Optionally, the luminance B can be divided into more segments for adjustment, and the embodiments of the present application do not limit this. Or, the value of the saturation S channel in the HSB color space can also be adjusted, for example, the actual saturation S value greater than 40 is set to an upper limit value of 40. Or, the value of the hue H channel in the HSB color space can also be adjusted, and the embodiments of the present application do not limit the method of selecting a color value similar to the actual background color of the View as the background base color.

[0185] S58-3, superimposing the background base color and the background overlay color to obtain the background color of the second partition.

[0186] After the background base color is obtained in S58-2 and the background overlay color is obtained in S58-1, the final color obtained by covering the background base color with the background overlay color can be taken as the background color of the second partition. The background color obtained in this way not only ensures that the color value is similar to that in the first partition, thereby improving the user's visual experience, but also ensures that the brightness and saturation of the background color in the second partition are moderate, thereby reducing the impact on the key content in the first partition.

[0187] Optionally, the electronic device also determines the color value of the electronic device state information displayed in the second partition based on the finally obtained background color of the second partition, so that there is a certain contrast between them, thereby ensuring the readability of the displayed content in the second partition.

[0188] S58-4, displaying the focus window of the first application in the first partition of the screen and displaying the background color configured by the electronic device in the second partition of the screen.

[0189] Specifically, after the electronic device switches the focus window, the switched focus window can be displayed in the first partition, thereby forming the user interface of the first application, and after the electronic device obtains the background color of the second partition corresponding to the first application preconfigured by the electronic device, the corresponding background color can also be displayed in the second partition.

[0190] Optionally, the electronic device can display the focus window in the first partition and the corresponding background color in the second partition at the same time, or 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 simultaneously seeing the content switching in the two partitions. The embodiments of the present application do not limit this, and the specific determination depends on the strategy of the electronic device controlling the screen display. The screen can only support refreshing the first partition and the second partition at the same time, or can support refreshing the first partition and the second partition separately.

[0191] The partition display effect involved in S58-4 can also refer to the description of FIG. 3C in the foregoing UI embodiment, which will not be described here in detail.

[0192] S59-1-S59-2: Strategy 4, taking the background base color intelligently extracted by the electronic device as the background color of the second partition.

[0193] S59-1, if the first application does not belong to the second whitelist, obtaining the background base color of the corresponding second partition from the View in the corresponding focus window based on the focus window object.

[0194] S59-1 is the same as the foregoing S58-2, and as to the description of S59-1, reference can be made to the foregoing description of S58-2, which will not be repeated here.

[0195] S59-2, displaying the focus window of the first application in the first partition of the screen and displaying the background color configured by the electronic device in the second partition of the screen.

[0196] S59-2 is similar to the foregoing S58-4, and the difference between S59-2 and S58-4 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 superimposed color preset by the electronic device, and as to the description of S59-2, reference can be made to the foregoing description of S58-4, which will not be repeated here.

[0197] As to the partition display effect involved in S59-2, reference can also be made to the foregoing description of FIG. 3D in the UI embodiment, which will not be repeated here.

[0198] It can be understood that in the screen partition display method described in the foregoing FIG. 5, the four screen partition display strategies are sequentially determined in the order of priority from high to low, that is, the order of application self-configuration, electronic device pre-configuration, electronic device pre-configuration superimposed with intelligent extraction and only intelligent extraction, to determine which condition is met, and then the corresponding strategy is adopted to control the screen partition display effect. Alternatively, other priority orders other than the priority order shown in FIG. 5 can be used to sequentially determine which strategy is used to control the screen partition display effect, and the embodiments of the present application do not limit this.

[0199] Based on the foregoing introduction of the screen partition display method flow shown in FIG. 5, the OS interaction flow of the screen partition display method involved in the present application will be further introduced in combination with FIG. 6.

[0200] FIG. 6 exemplarily shows an OS interaction flow diagram of a screen partition display method. Specifically, the following steps are included:

[0201] The software modules of the electronic device 100 involved in the OS interaction include but are not limited to: the first application, the WMS, the LetterBox, the Task task management module, the ViewRootImpl, the file analysis, the View management framework and the like, and as to the detailed introduction of these modules, reference can be made to the introduction of the software architecture of the electronic device 100 hereinafter, which will not be repeated here.

[0202] Stage 1 (S61-S68): Triggering to obtain the background color of the second partition.

[0203] S61, the first application obtains the first operation event.

[0204] Specifically, after the user inputs the first operation for switching to the interface of the first application, the first application of the electronic device can obtain the first operation event.

[0205] Optionally, the first application described in the present application can be any one of the aforementioned application A, application B, application C or application D, and correspondingly, the first operation can be the operation on the icon of application A in the desktop shown in FIG. 3A, or can also be the operation for switching to the interface of application B as described in FIG. 3B, or can also be the operation for switching to the interface of application C as described in FIG. 3C, or can also be the operation for switching to the interface of application D as described in FIG. 3D, and the like, which is not limited in the embodiments of the present application.

[0206] S62, the first application notifies the WMS that the first activity of the first application is set to the Resumed state through the AMS.

[0207] Specifically, after the first application obtains the aforementioned first operation event, the first application can start the first activity (Activity) of the first application by executing the onStart() method. The first activity can be the main activity (Main Activity) of the first application or a non-main activity that was started when the last foreground operation was performed. After starting the first activity, the AMS can manage the life cycle of the first activity. When the first activity enters the Resumed state, the AMS will coordinate with other modules to sequentially perform the tasks of drawing, rendering and displaying the first window corresponding to the first activity, and then display the first window to form the first interface visible to the user. When the first activity enters the Resumed state, the other activities before switching to the first application enter the Paused state. The AMS also notifies the WMS that the first activity is set to the Resumed state, so that the WMS switches the focus window based on this.

[0208] Optionally, when the first application is application A, the first activity of the first application started by the AMS can be the activity corresponding to the user interface 32 in FIG. 3A as described above. When the first application is application B, the first activity of the first application started by the AMS can be the activity corresponding to the user interface 34 in FIG. 3B as described above. When the first application is application C, the first activity of the first application started by the AMS can be the activity corresponding to the user interface 36 in FIG. 3C as described above. When the first application is application D, the first activity of the first application started by the AMS can be the activity corresponding to the user interface 38 in FIG. 3D as described above.

[0209] S63, the WMS sets the first window of the first activity as the focus window.

[0210] Specifically, after learning that the first activity is set to the Resumed state, the WMS indicates that the user wants to focus on the interface corresponding to the first activity, and thus needs to set the first window of the first activity as the focus window, i.e., set the first window to the visible state, so as to ensure that the first window is displayed on the top in the future, and thus ensure that the user can see the first interface formed by the first window after display.

[0211] S64, the WMS notifies the LetterBox to refresh the background color of the second partition.

[0212] Specifically, after the WMS sets the first window as the focus window, since the first window is subsequently displayed in the first partition, the WMS also needs to adjust the background color of the second partition according to the window changes of the first partition. Specifically, the WMS can notify the LetterBox to refresh the background color of the second partition.

[0213] The LetterBox provides a refresh mechanism for an application display mode. Specifically, some application programs need to maintain the consistency and functionality of the interface on devices of different sizes, but some devices (such as foldable devices) have different screen sizes and aspect ratios from traditional devices, so when the interface design of an application is only for a traditional standard-sized screen, display compatibility problems will occur. In order to solve this problem, the LetterBox can fill part of the area in the screen (such as the second partition) to ensure that the application interface will not be distorted or stretched due to the difference in device screen.

[0214] S65, the LetterBox registers a listening service for the completion of drawing the first window with the Task task management module.

[0215] Specifically, after receiving the notification of the WMS to refresh the background color of the second partition, the LetterBox needs to wait for the completion of drawing the first window in the first partition before completing the refresh task of the second partition based on the objects of the first window. Therefore, the LetterBox also needs to register a listening service for the completion of drawing the focus window with the Task task management module.

[0216] The Task task management module can be used to manage and execute the task of drawing the first window.

[0217] S66, the Task task management module returns the drawing success to the LetterBox, carrying the first window object.

[0218] Specifically, after the Task task management module detects and completes the drawing of the first window, it returns the drawing success information to the LetterBox based on the service registered by the LetterBox, and also carries the first window object after the drawing success.

[0219] The content contained in the first window object can refer to the foregoing description, which will not be described here.

[0220] S67, the LetterBox returns the first window object to the WMS.

[0221] Specifically, the LetterBox needs to match the first window in the first partition when refreshing the background color of the second partition, so the LetterBox also needs to obtain the background color matched with the first window to refresh the second partition. Therefore, the LetterBox returns the first window object to the WMS, so that the WMS obtains the background color of the corresponding second partition based on the first window object.

[0222] S68, the WMS requests the ViewRootImpl to obtain the background color of the second partition, carrying the first window object.

[0223] Specifically, after receiving the first window object returned by the LetterBox, the WMS triggers the ViewRootImpl to request the WMS to obtain the background color of the second partition.

[0224] The ViewRootImpl is a top-level class responsible for managing the view hierarchy structure, serving as the root node (parent class) of all views (Views). The ViewRootImpl manages the View drawing process, that is, the ViewRootImpl is responsible for triggering the measurement, layout, and drawing of the View, to ensure that the View is correctly displayed on the screen. The ViewRootImpl communicates with the WMS through an internal Binder service to complete the real-time refreshing and displaying of the window.

[0225] In particular, in the embodiments of the present application, a plurality of screen partition display strategies are pre-stored in the ViewRootImpl, which are used to determine the background color of the second partition, and then the background color is returned to the WMS.

[0226] Stage 2-1 (S71-S72): Obtain the background color of the second partition by using strategy 1 (i.e., application self-configuration).

[0227] S71, the ViewRootImpl determines the background color of the second partition pre-configured by the first application based on the first window object.

[0228] Specifically, after receiving the first window object, the ViewRootImpl determines whether the first window object includes a corresponding attribute value indicating the background color of the second partition. When the corresponding attribute value exists, it is determined that the first application has self-configured the background color of the second partition, and then the background color self-configured by the first application is sent to the WMS, that is, S72 is executed subsequently.

[0229] 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.

[0230] Optionally, when the first application is the aforementioned application A, 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.

[0231] S72, ViewRootImpl returns the background color of the second partition, which is configured by the first application, to WMS.

[0232] Specifically, after ViewRootImpl obtains the background color of the second partition configured by the first application from the property value of the first window object, it also needs to return it to WMS.

[0233] Phase 2-2 (S81-S85): Use strategy 2 (i.e., electronic device pre-configuration) to obtain the background color of the second partition.

[0234] S81, ViewRootImpl determines the background color of the second partition that the first application has not configured itself based on the first window object.

[0235] Specifically, 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.

[0236] Optionally, when the first application is the aforementioned application B, 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.

[0237] S82, ViewRootImpl requests the background color of the second partition from the file parsing module based on the first window object.

[0238] Specifically, the ViewRootImpl can send a request to the parsing module based on the package name of the first application carried in the first window object, and the request can carry the package name of the first application, and the file parsing module can obtain the background color of the second partition corresponding to the first application based on the package name.

[0239] S83, if the file parsing module determines that the first application to which the first window belongs belongs to the first white list, the file parsing module obtains the preconfigured background color of the second partition.

[0240] Specifically, the first white list can be preconfigured in the file parsing module, and the applications in the first white list belong to the applications for which the electronic device has preconfigured the corresponding second partition background color. Therefore, the file parsing module can first determine whether the first application belongs to the first white list, and if it belongs, it is determined that the second screen partition display is realized in the manner of strategy 2, which includes obtaining the background color of the second partition from the analysis file of the first application.

[0241] S84, the file parsing module returns the background color of the second partition to the ViewRootImpl.

[0242] Specifically, the file parsing module can return the identification of strategy 2 carrying the background color of the second partition to the ViewRootImpl, and the identification of strategy 2 can be used to instruct the ViewRootImpl to control the display of the second partition by taking the background color of the second partition as the final background color.

[0243] S85, the ViewRootImpl returns the background color of the second partition preconfigured by the electronic device to the WMS.

[0244] Stage 2-3 (S91-S99): Obtain the background color of the second partition in strategy 3 (electronic device preconfigured superposition intelligent extraction).

[0245] S91, the ViewRootImpl determines that the first application does not configure the background color of the second partition based on the first window object.

[0246] Specifically, after the ViewRootImpl receives the first window object, it is determined whether the first window object includes a corresponding attribute value indicating the background color of the second partition. When there is no corresponding attribute value, it is determined that the first application does not configure the background color of the second partition, and then the background color obtained by superimposing the background superposition color and the intelligent extraction background base color preconfigured by the electronic device is sent to the WMS, that is, S92-S99 is executed subsequently.

[0247] S92, the ViewRootImpl requests the file parsing module to obtain the background color of the second partition based on the first window object.

[0248] Specifically, 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.

[0249] S93, if 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.

[0250] Specifically, 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.

[0251] Optionally, 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.

[0252] Optionally, when the first application is the aforementioned application C, the first window object does not carry the corresponding attribute value, and the electronic device only has a preset background overlay color. Therefore, ViewRootImpl will use strategy 3 to obtain the background color of the second partition for application C.

[0253] S94, the file parsing module returns the background overlay color of the second partition to ViewRootImpl.

[0254] Specifically, 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.

[0255] S95, ViewRootImpl requests the background base color of the second partition from the View management framework based on the first window.

[0256] Specifically, 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.

[0257] S96, the View management framework determines the background base color based on the View of the first window.

[0258] Specifically, the first window drawn is composed of various Views, which can be various controls, texts, etc. The View management framework can traverse the Views in the first window to extract color values therefrom as the background base color of the second partition.

[0259] Optionally, since the Views of the first window can be numerous, the colors of different Views can not be completely consistent, and therefore the electronic device can select a first View that satisfies the following conditions to extract the background base color therefrom: the number of layers to which the View belongs is 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.

[0260] Optionally, there can be zero, one or multiple Views that satisfy the foregoing conditions. When there is no View (also referred to as the first View) that satisfies the foregoing conditions, the View management framework can extract a color value from the application navigation bar / status bar as the background base color. When there is only one View, the View management framework can extract a color value from the one View as the background base color. When there are multiple Views, the View management framework can select a View with the largest area from the multiple Views to extract a color value therefrom as the background base color, or the View management framework can extract color values from the multiple Views respectively, fuse the color values, and obtain a color value as the background base color.

[0261] Optionally, the method of extracting the background color from the View specifically includes: first converting the actual color value of the background color of the View into an HSB color space, and then adjusting the value of the brightness B channel in the color space, for example: the value of the brightness B channel is divided into multiple values by the range of 0% to 100% brightness B, for example, divided into 50% and 100%, and then the actual brightness B belonging to 0% to 50% is set to 50%, and the actual brightness B belonging to 50% to 100% is set to 100%. Optionally, the brightness B can be divided into more segments for adjustment, and the embodiments of the present application do not limit this. Alternatively, the value of the saturation S channel in the HSB color space can also be adjusted, for example, the actual saturation S greater than 40 is set to an upper limit value of 40. Alternatively, the value of the hue H channel in the HSB color space can also be adjusted, and the embodiments of the present application do not limit the method of selecting a color value close to the actual background color of the View as the background base color.

[0262] S97, the View management framework returns the background base color of the second partition to the ViewRootImpl.

[0263] S98, the ViewRootImpl superimposes the background overlay color on the background base color to obtain the background color of the second partition.

[0264] Specifically, after obtaining the background base color in S94 and the background overlay color in S97, the final color obtained by covering the background overlay color on the background base color can be taken as the background color of the second partition. The background color obtained in this way not only ensures that the color value is similar to that in the first partition, improving the user's visual experience, but also ensures that the brightness and saturation of the background color in the second partition are moderate, reducing the impact on the key content in the first partition.

[0265] S99, the ViewRootImpl returns the superimposed background color of the second partition to the WMS.

[0266] Stage 2-4 (S11-S18): Obtain the background color of the second partition using strategy 4 (only intelligent color picking).

[0267] S11, the ViewRootImpl determines based on the first window object that the first application does not configure the background color of the second partition by itself.

[0268] S12, the ViewRootImpl requests the file parsing module to obtain the background color of the second partition based on the first window object.

[0269] S13, the file parsing module determines that the first application to which the first window belongs does not belong to the first whitelist nor the second whitelist.

[0270] For related descriptions of S11-S13, please refer to the foregoing S91-S93, which will not be repeated here.

[0271] Optionally, the first whitelist and the second whitelist stored in the file parsing module can be the same list or different lists, as long as there is an indication in the list that the specific application adopts strategy 2 or strategy 3.

[0272] Optionally, when the first application is the aforementioned application D, the first window object does not carry the corresponding attribute value, and the electronic device does not have a preset corresponding background color, nor a preset corresponding background overlay color, so the ViewRootImpl will adopt strategy 4 to obtain the background color of the second partition for the application D.

[0273] S14, the file parsing module returns the identification of strategy 4 to the ViewRootImpl.

[0274] Specifically, the file analysis module can also return an identifier of policy 4 to the ViewRootImpl, which can be used to instruct the ViewRootImpl to extract the background base color from the first window, and then control the second partition display with the background base color as the final background color.

[0275] S15, the ViewRootImpl requests the View management framework to obtain the background base color of the second partition based on the first window.

[0276] S16, the View management framework determines the background base color based on the View of the first window.

[0277] S17, the View management framework returns the background base color of the second partition to the ViewRootImpl.

[0278] For related descriptions of S15-S17, please refer to the foregoing S95-S97, which will not be repeated here.

[0279] S18, the ViewRootImpl returns the background base color of the second partition to the WMS.

[0280] Stage 3 (S21-S23): refresh the first window in the first partition and refresh the background color in the second partition.

[0281] S21, the WMS returns the background color of the second partition to the LetterBox.

[0282] Specifically, after the WMS obtains the background color of the second partition through any one of the foregoing stage 2-1 to stage 2-4 screen partition strategies, the background color is returned to the LetterBox, so that the LetterBox uses the background color to draw the content of the second partition.

[0283] S22, after the surface flinger synthesizes the image data, it is sent to the display driver to realize the refresh of the first window in the first partition of the screen.

[0284] Specifically, before the foregoing S66, the Task task management module has started to execute the task of drawing the first window. When the drawing of the first window is completed, the data of the drawn first window is written into the corresponding Buffer, and the surface flinger can read the image data in the buffer, then synthesize the image data and send it to the display driver. The display driver controls the first partition of the screen to refresh the first window, and then presents the user with a visual application interface.

[0285] Optionally, after the first window is refreshed and displayed, the presented user- visible application interface can be any one of the interfaces shown in FIGS. 3A-3D as previously described.

[0286] S23, after the image data is synthesized by the surface flinger, the image data is sent to the display driver to achieve refreshing and displaying the background color in the second partition of the screen.

[0287] Specifically, after S21, the LetterBox starts to perform drawing tasks in the second partition, and after the drawing of the second partition is completed, the data of the drawn second partition is written into the corresponding Buffer, and the surface flinger can read the image data in the buffer and then send the synthesized image data to the display driver. The display driver controls the second partition of the screen to refresh and display the corresponding background color, thereby presenting a user- visible user interface.

[0288] Optionally, after the first window is refreshed and displayed, the presented user- visible application interface can be any one of the interfaces shown in FIGS. 3A-3D as previously described.

[0289] Optionally, the surface flinger can synthesize image data based on the data of the first window and the content of the second partition at the same time, and then send the image data to the display driver to achieve refreshing and displaying the first partition and the second partition at the same time. Alternatively, the surface flinger can synthesize image data based on the data of the first window and then send the image data to the display driver to achieve refreshing and displaying the interface of the application in the first partition of the screen, and synthesize image data based on the content of the second partition and then send the image data to the display driver to achieve refreshing and displaying the corresponding background color in the second partition of the screen. The embodiments of the present application do not limit this, and the specific implementation can depend on whether the screen of the electronic device supports partial refreshing by partition.

[0290] The method flow shown in FIG. 6 is only applicable to how to achieve screen partition display when the first application sets the light color mode. If the first application also supports the dark color mode, it is further necessary to determine whether the current display mode of the first application is the light color mode or the dark color mode in the process of achieving screen partition display. If it is the light color mode, the method flow shown in FIG. 6 can be executed. If it is the dark color mode, the background color of the second partition is directly defaulted as black or other dark colors.

[0291] In a specific implementation manner, in any step after the execution of the foregoing S68 and before the execution of the foregoing S72, or in any step after the execution of the foregoing S68 and before the execution of the foregoing S85, or in any step after the execution of the foregoing S68 and before the execution of the foregoing S99, or in any step after the execution of the foregoing S68 and before the execution of the foregoing S18, the 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, to determine the display mode currently set by the first application. If the display mode of the first application is the dark mode, the background color returned by the ViewRootImpl to the WMS is black or dark, rather than the background color obtained by the four strategies introduced in the foregoing FIG. 6. If the display mode of the first application is the light mode, the background color returned by the ViewRootImpl to the WMS is the background color obtained by the corresponding one of the four strategies introduced in the foregoing FIG. 6.

[0292] Next, the morphology and hardware architecture of the electronic device 100 involved in the present application will be introduced. The electronic device 100 can be a portable terminal device running an Android operating system or other operating systems, such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, etc.

[0293] FIG. 7 shows a schematic diagram of the hardware architecture of the electronic device 100.

[0294] As shown in FIG. 7, the electronic device 100 can 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 can include a pressure sensor 180A, a touch sensor 180K, etc.

[0295] ​It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0296] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0297] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0298] The memory can also be provided in the processor 110, used to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access, reducing the waiting time of the processor 110, thus improving the efficiency of the system.

[0299] In the embodiments of the present application, the processor 110 can be used to execute the screen partition display method provided by the present application, specifically as described in the foregoing FIG. 5-FIG. 6, which will not be described here.

[0300] In some embodiments, the processor 110 can include one or more interfaces. The interface can include a universal serial bus (USB) interface and the like. The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect to other electronic devices, such as AR devices and the like.

[0301] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or a combination of multiple interface connection methods in the above embodiments.

[0302] The electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0303] The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use a liquid crystal display (LCD). The display screen panel can also be manufactured using organic light-emitting diodes (OLED), active-matrix organic light-emitting diodes (AMOLED), flexible light-emitting diodes (FLED), miniled, microLed, micro-oled, quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include 1 or N display screens 194, and N is a positive integer greater than 1.

[0304] In the embodiments of the present application, the specific structure of the display screen 194 can be the screen structure shown in FIG. 2 as previously introduced, and after the processor 110 applies the screen partition display method provided in the present application, the display screen 194 can display the effects shown in FIGS. 3A-4D as previously introduced, which will not be described herein again.

[0305] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The internal memory 121 can be used to store computer-executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image / video playing function, etc.), and the like. The data storage area can store data (such as audio data, a phone book, etc.) created during the use of the electronic device 100, and the like.

[0306] The external memory interface 120 can be used to connect an external non-volatile memory, to realize the expansion of 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 realize the data storage function. For example, files such as music, videos, etc. are saved in the external non-volatile memory.

[0307] In the embodiments of the present application, the aforementioned memory can be used to store the implementation methods of the aforementioned four screen partition display strategies, for example, including the first white list, the second white list, and the preset applications and corresponding background colors, or the applications and corresponding background base colors, and the like.

[0308] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0309] The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 together form a touch screen, also referred to as a "touch panel". The touch sensor 180K is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.

[0310] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0311] FIG. 8 is a software architecture of the electronic device 100 according to an embodiment of the present application.

[0312] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, a system library, and a kernel layer.

[0313] The application layer can include a series of application packages.

[0314] As shown in FIG. 8, the application package can include applications A, B, C, D, a camera, a gallery, a calendar, a call, a map, navigation, WLAN, Bluetooth, and the like. The first application can be one of the applications A, B, C, and D, and the second application can also be one of the applications A, B, C, and D, and the first application is different from the second application.

[0315] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0316] As shown in FIG. 8, the application framework layer can include an activity manager service (AMS), a surface flinger (SF), a LetterBox, a windows manager service (WMS), a view system service, and the like.

[0317] The activity manager is responsible for managing the creation, start, pause, recovery, and destruction of the Activity in the application program, and the like, and the switching between the foreground and the background, and the like.

[0318] The SF is mainly responsible for the composition and display of the screen content. Specifically, the SF can use OpenGL and Hardware Composer to combine the window data after drawing into image data, and then display.

[0319] The LetterBox provides a refresh mechanism for the application display mode. Specifically, some application programs need to maintain the consistency and functionality of the interface on devices of different sizes, but some devices (such as foldable devices) have different screen sizes and aspect ratios from traditional devices, so when the interface design of the application is only for the traditional standard size screen, display compatibility problems will occur. In order to solve this problem, the LetterBox can fill part of the area in the screen (such as the second partition) to ensure that the application interface will not be distorted or stretched due to the difference in device screen. In the embodiments of the present application, the specific functions that the LetterBox can provide can refer to the related methods involved in FIGS. 5-6 introduced in the foregoing, which will not be described here.

[0320] The window manager is used to manage the window program. The window manager can obtain the size of the display screen, judge whether there is a status bar, lock the screen, intercept the screen, and the like.

[0321] The view system includes visual controls, such as controls that display text, controls that display pictures, and the like. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.

[0322] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0323] The core library contains two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.

[0324] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.

[0325] The system library can include multiple functional modules. For example: surface manager, media library, three-dimensional graphics processing library (such as: OpenGL ES), two-dimensional (2D) graphics engine (such as: SGL), and the like.

[0326] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.

[0327] The media library supports multiple commonly used audio, video format playback and recording, and static image files and the like. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.

[0328] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0329] The 2D graphics engine is a drawing engine for 2D drawing.

[0330] The kernel layer is a layer between hardware and software. The kernel layer at least contains a display driver, which can receive image data sent by the surface flinger to control the screen to realize partition display.

[0331] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0332] The present application also provides an electronic device, which can include a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the method performed by the electronic device in any one of the above embodiments.

[0333] The present application also provides a chip system, which includes a processing circuit and an interface circuit, the interface circuit is used to receive computer instructions and transmit to the processing circuit, and the processing circuit is used to run the computer instructions to implement the method performed by the electronic device in any one of the above embodiments.

[0334] The present application also provides a chip system, which includes at least one processor for implementing the method performed by the electronic device in any one of the above embodiments. In a possible design, the chip system further includes a memory, which is used to save program instructions and data, and the memory is located in the processor or outside the processor.

[0335] The chip system can be composed of a chip, or can include a chip and other discrete devices.

[0336] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in the memory.

[0337] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be arranged separately from the processor, and the embodiments of the present application do not make any specific limitation. Exemplarily, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be arranged on different chips respectively, and the embodiments of the present application do not make any specific limitation on the type of the memory and the arrangement mode of the memory and the processor.

[0338] Exemplarily, the chip system can be a field programmable gate array (FPGA), can be an application specific integrated circuit (ASIC), can also be a system on chip (SoC), can also be a central processor unit (CPU), can also be a network processor (NP), can also be a digital signal processor (DSP), can also be a micro controller unit (MCU), can also be a programmable logic device (PLD) or other integrated chip.

[0339] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method executed by the electronic device in any one of the above embodiments.

[0340] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the method executed by the electronic device in any one of the above embodiments.

[0341] The embodiments of the application can be combined in any manner to achieve different technical effects.

[0342] In the above embodiments, all or part of the processes can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the processes can be implemented in the form of 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 described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

[0343] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above embodiments. The storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and other media that can store program codes.

[0344] In summary, the above only describes the embodiments of the technical scheme of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.

Claims

1. A screen partition display method, characterized by, The method is 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, and the second partition including a punch-hole area, and the method includes: when a first application is run, displaying a first window provided by the first application in the first partition, and displaying a first background in the second partition, a color value of the first background being the same as or similar to a color value of a first view in the first window; wherein the first view meets one or more of the following conditions: a layer number of the first view in the first window is Nth or above, the first view is in a visible state, an area of the first view is greater than a first value, or a background of the first view is not empty; receiving a first operation, and running a second application; when the second application is run, displaying a second window of the second application in the first partition, and displaying a second background in the second partition, a color value of the second background being the same as or similar to a color value of a second view in the second window.

2. The method of claim 1, wherein, The first background only contains a color element and does not contain a pattern element.

3. The method according to claim 1 or 2, characterized in that, The first window is used to display one of the following: a home page of a social application, a chat page of a social application, a setting page of a social application, a home page of a music application, a play interface of a music application, a setting interface of a music application, a home page of a video application, a play interface of a video application, a setting interface of a video application, a home page of a shopping application, a play interface of a shopping application, or a setting interface of a shopping application.

4. The method of any one of claims 1-3, wherein the color value of the first background is a first preset value configured by the first application.

5. The method of claim 4, wherein in a case where the first application is configured with the first preset value, the color value of the first background is the first preset value.

6. The method according to claim 4 or 5, characterized in that, 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, based on a first attribute value contained in the object of the first window, that the color value of the first background is a first preset value configured by the first application.

7. The method of any one of claims 1-3, wherein the color value of the first background is a second preset value configured by the electronic device.

8. The method of claim 7, wherein in a case where the first application is not configured with the first preset value and the electronic device is configured with the second preset value, the color value of the first background is the second preset value.

9. The method of claim 7 or 8, wherein the second preset value is obtained by superimposing a fourth color value on a third color value, the third color value being a solid color, and the fourth color value being a white color with gradual brightness.

10. The method according to any one of claims 7-9, characterized in that, The electronic device predefines a first white list, and predefines the second preset value corresponding to an application in the first white list, and the method further includes: Before the first partition displays the first window provided by the first application, the object of the first window is obtained by drawing the first window; Before the second partition displays the first background, it is determined that the first window does not contain a first attribute value corresponding to a color value of the first background, and it is determined that the first application belongs to the first whitelist, and then it is determined that the color value of the first background is the second preset value.

11. The method of any one of claims 1-3, wherein The color value of the first background is determined according to a third preset value configured by the electronic device and a color value of a first view in the first window.

12. The method of claim 11, wherein In a case where the first application does not configure a first preset value, the electronic device does not configure a second preset value, and the electronic device configures a third preset value, the color value of the first background is determined according to the third preset value configured by the electronic device and a color value of a first view in the first window.

13. The method of claim 11 or 12, wherein The color value of the first background is obtained by superimposing the third preset value on a third color value, the third color value being a solid color determined according to a color value of a first view in the first window, and the third preset value being a luminance gradient white color.

14. The method of claim 13, wherein The first view in the first window is a fourth color value; The third color value is determined by adjusting the luminance of the fourth color value, when the luminance of the fourth color value is greater than a second value and less than a third value, the luminance of the third color value is the third value, and when the luminance of the fourth color value is greater than or equal to the third value and less than a fourth value, the luminance of the third color value is the fourth value.

15. The method according to any one of claims 11-14, characterized in that, The electronic device preconfigures a first whitelist and a second whitelist, and preconfigures the second preset value corresponding to the application in the first whitelist and the third preset value corresponding to the application in the second whitelist, and the method further comprises: Before the first partition displays the first window provided by the first application, the object of the first window is obtained by drawing the first window; Before the second partition displays the first background, it is determined that the first window does not contain a first attribute value corresponding to a color value of the first background, and it is determined that the first application does not belong to the first whitelist and belongs to the second whitelist, and then it is determined that the color value of the first background is determined according to the third preset value and a color value of a first view in the first window.

16. The method of any one of claims 1-3, wherein The color value of the first background is determined according to a color value of a first view in the first window.

17. The method of claim 16, wherein In a case where the first application is not configured with the first preset value, the electronic device is not configured with the second preset value, and the electronic device is not configured with the third preset value, the color value of the first background is determined according to a color value of a first view in the first window.

18. The method of claim 16 or 17, wherein, the first view in the first window is a fourth color value; the color value of the first background is determined by adjusting the brightness of the fourth color value, when the brightness of the fourth color value is greater than a second value and less than a third value, the brightness of the color value of the first background is the third value, when the brightness of the fourth color value belongs to greater than or equal to the third value, and less than a fourth value, the brightness of the color value of the first background is the fourth value.

19. The method of any one of claims 16-18, wherein, The electronic device predefines a first whitelist and a second whitelist, and predefines the second preset value corresponding to the application in the first whitelist, and predefines the third preset value corresponding to the application in the second whitelist, and the method further comprises: Before displaying the first window provided by the first application in the first partition, the object of the first window is obtained by drawing the first window; Before displaying the first background in the second partition, it is determined that the first attribute value corresponding to the color value of the first background is not included in the object of the first window, and it is determined that the first application does not belong to the first whitelist and does not belong to the second whitelist, and the color value of the first background is determined according to the color value of the first view in the first window.

20. The method of any one of claims 1-19, wherein, Before displaying the first background in the second partition, the method further comprises: determining that the display mode of the first application is set to a light color mode.

21. The method of any one of claims 1-20, wherein, When displaying the first background in the second partition, the method further comprises: displaying the state information of the electronic device in the second partition.

22. The method of any one of claims 1-21, wherein, Before running the first application, the method further comprises: displaying the background of the desktop in the first partition and the second partition, displaying the application icon of the desktop in the first partition, and displaying the state information of the electronic device in the second partition.

23. The method of any one of claims 1-22, wherein, Before obtaining the first color value in the second partition corresponding to the first application, the method further comprises: detecting that the first window is switched to a focus window.

24. The method of any one of claims 1-23, wherein, The first screen is an outer screen of the electronic device.

25. An electronic device, comprising: comprising 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 implement the steps of the method of any one of claims 1-24.

26. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-24.

27. A computer program product comprising computer programs / instructions, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-24.