Status bar background color adjustment method, device and storage medium

By monitoring the offset distance of the application view and the target area color, dynamically adjusting the background color of the status bar, solving the problem of visual separation between the status bar and the APP and improving the user experience.

CN119781653APending Publication Date: 2025-04-08ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411917214.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When the background color of the status bar is inconsistent with the background color of the APP, it will cause the status bar and the APP to be separated from the visual effect, affecting the user's visual experience.

Method used

When a preset action occurs by listening to the view of the application, the view offset distance of the view is obtained, the target area in the view where the status bar of the display is located, the color corresponding to the target area, and the background color of the status bar is adjusted according to the color.

Benefits of technology

By adjusting the background color of the status bar to make it consistent with the application's view content, avoiding visual fragmentation and improving the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781653A_ABST
    Figure CN119781653A_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and storage medium for adjusting the background color of the status bar, the method comprising: obtaining the view offset distance of the view when a preset action occurs in the view of the application program is monitored; determining the target area in the view where the status bar of the display screen is located according to the view offset distance; determining the color corresponding to the target area, and adjusting the background color of the status bar according to the color corresponding to the target area. In this way, the background color of the status bar is adjusted by the color corresponding to the target area in the view where the status bar of the display screen is located, so as to avoid the status bar and the APP being separated from each other in terms of visual effect, and improve the user's visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for adjusting the background color of a status bar. Background Art

[0002] At present, the display screen of a terminal such as a smart phone generally includes a status bar (used to display an operator icon, a signal icon, a battery icon, etc.) and a virtual key bar (used to display a menu icon, a home icon, and a return icon). Among them, for the status bar, its background is generally set to a fixed color.

[0003] In order to meet the personalized needs of human-computer interaction, various APP themes such as voice assistants, video, and navigation are designed with two sets of theme background colors: night (dark) and day (light). When the background color of the status bar is inconsistent with the APP theme background color, the status bar and the APP will be visually separated, affecting the user's visual experience. Summary of the invention

[0004] In order to solve the technical problem that when the background color of the status bar is inconsistent with the background color of the APP theme, the status bar and the APP are visually separated, which affects the user's visual experience, the embodiment of the present application provides a method, device, electronic device and storage medium for adjusting the background color of the status bar. The specific technical solution is as follows:

[0005] In a first aspect of an embodiment of the present application, a method for adjusting the background color of a status bar is first provided, the method comprising:

[0006] When a preset action is detected in a view of the application, obtaining a view offset distance of the view;

[0007] Determining, according to the view offset distance, a target area in the view where the status bar of the display screen is located;

[0008] A color corresponding to the target area is determined, and a background color of the status bar is adjusted according to the color corresponding to the target area.

[0009] In an optional implementation, determining the target area in the view where the status bar of the display screen is located according to the view offset distance includes:

[0010] Determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located;

[0011] The determining the color corresponding to the target area and adjusting the background color of the status bar according to the color corresponding to the target area includes:

[0012] The color of the target content area is obtained, and the background color of the status bar is adjusted to the color of the target content area.

[0013] In an optional implementation, determining the target area in the view where the status bar of the display screen is located according to the view offset distance includes:

[0014] Determine, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located;

[0015] The target crosses content areas to represent that the status bar transitions from one content area to another content area;

[0016] The determining the color corresponding to the target area and adjusting the background color of the status bar according to the color corresponding to the target area includes:

[0017] A transition color corresponding to the target cross-content area is determined, and the background color of the status bar is adjusted to the transition color.

[0018] In an optional implementation, determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located includes:

[0019] Acquire a preset first distance range set, wherein the preset first distance range set includes at least one preset first distance range, and each of the preset first distance ranges corresponds to a corresponding content area in the view;

[0020] From at least one of the preset first distance ranges, searching for a target preset first distance range where the view offset distance is located;

[0021] Searching for a content area in the view corresponding to a preset first distance range of the target;

[0022] The content area in the view corresponding to the preset first distance range of the target is determined as the target content area in the view where the status bar of the display screen is located.

[0023] In an optional implementation, determining, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located, includes:

[0024] Acquire a preset second distance range set, wherein the preset second distance range set includes at least one preset second distance range, and each of the preset second distance ranges corresponds to a corresponding cross-content area in the view;

[0025] Searching for a target preset second distance range where the view offset distance is located from at least one of the preset second distance ranges;

[0026] Finding a cross-content area in the view corresponding to a preset second distance range of the target;

[0027] The cross-content region in the view corresponding to the preset second distance range of the target is determined as the target cross-content region in the view where the status bar of the display screen is located.

[0028] In an optional implementation, the determining the transition color corresponding to the target cross-content area includes:

[0029] Obtaining a status bar height of the status bar, and determining a reference distance corresponding to the target cross-content area; wherein determining the reference distance corresponding to the target cross-content area comprises: determining a position of the target cross-content area in the view, and determining the reference distance corresponding to the target cross-content area according to the position;

[0030] Determine a color transition interval corresponding to the target cross-content area;

[0031] A transition color corresponding to the target cross-content area is determined according to the view offset distance, the status bar height, the reference distance, and the color transition interval.

[0032] In an optional implementation, determining the color transition interval corresponding to the target cross-content region includes:

[0033] Acquire a first color of the one content area and a second color of the other content area;

[0034] A color interval consisting of the first color and the second color is determined as a color transition interval corresponding to the target cross-content area.

[0035] In an optional implementation, determining the transition color corresponding to the target cross-content area according to the view offset distance, the status bar height, the reference distance, and the color transition interval includes:

[0036] Determine an offset distance according to the view offset distance, the reference distance, and the status bar height;

[0037] Determining a transition interval according to the status bar height;

[0038] A transition color corresponding to the target cross-content area is determined according to the offset distance, the transition interval, and the color transition interval.

[0039] In an optional implementation, determining the offset distance according to the view offset distance, the reference distance, and the status bar height includes:

[0040] Acquire a first difference between the reference distance and the height of the status bar;

[0041] Obtaining a second difference between the view offset distance and the first difference;

[0042] The second difference is determined as the offset distance.

[0043] In an optional implementation, determining the transition interval according to the status bar height includes:

[0044] Obtaining a preset first value, and obtaining a product of the status bar height and a preset second value;

[0045] A numerical interval consisting of the preset first numerical value and the product is determined as a transition interval.

[0046] In an optional implementation, determining the transition color corresponding to the target cross-content area according to the offset distance, the transition interval, and the color transition interval includes:

[0047] Calling an interpolation algorithm to perform interpolation processing according to the offset distance, the transition interval, and the color transition interval to obtain an interpolation color;

[0048] The interpolation color is determined as a transition color corresponding to the target cross-content area.

[0049] In a second aspect of the embodiments of the present application, a device for adjusting the background color of a status bar is further provided, the device comprising:

[0050] A distance acquisition module, used to acquire the view offset distance of the view when monitoring a preset action of the view of the application;

[0051] An area determination module, used to determine a target area in the view where the status bar of the display screen is located according to the view offset distance;

[0052] The color adjustment module is used to determine the color corresponding to the target area and adjust the background color of the status bar according to the color corresponding to the target area.

[0053] In an optional implementation, the region determination module is specifically configured to:

[0054] Determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located;

[0055] The color adjustment module is specifically used for:

[0056] The color of the target content area is obtained, and the background color of the status bar is adjusted to the color of the target content area.

[0057] In an optional implementation, the region determination module is specifically configured to:

[0058] Determine, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located;

[0059] The target crosses content areas to represent that the status bar transitions from one content area to another content area;

[0060] The color adjustment module specifically includes:

[0061] A transition color determination submodule, used to determine the transition color corresponding to the target cross-content area;

[0062] The color adjustment submodule is used to adjust the background color of the status bar to the transition color.

[0063] In an optional implementation, the region determination module is specifically configured to:

[0064] Acquire a preset first distance range set, wherein the preset first distance range set includes at least one preset first distance range, and each of the preset first distance ranges corresponds to a corresponding content area in the view;

[0065] From at least one of the preset first distance ranges, searching for a target preset first distance range where the view offset distance is located;

[0066] Searching for a content area in the view corresponding to a preset first distance range of the target;

[0067] The content area in the view corresponding to the preset first distance range of the target is determined as the target content area in the view where the status bar of the display screen is located.

[0068] In an optional implementation, the region determination module is specifically configured to:

[0069] Acquire a preset second distance range set, wherein the preset second distance range set includes at least one preset second distance range, and each of the preset second distance ranges corresponds to a corresponding cross-content area in the view;

[0070] Searching for a target preset second distance range where the view offset distance is located from at least one of the preset second distance ranges;

[0071] Finding a cross-content area in the view corresponding to a preset second distance range of the target;

[0072] The cross-content region in the view corresponding to the preset second distance range of the target is determined as the target cross-content region in the view where the status bar of the display screen is located.

[0073] In an optional implementation, the transition color determination submodule specifically includes:

[0074] A status bar height obtaining unit, used to obtain the status bar height of the status bar;

[0075] A reference distance determination unit, configured to determine a reference distance corresponding to the target cross-content region; wherein determining the reference distance corresponding to the target cross-content region comprises: determining a position of the target cross-content region in the view, and determining the reference distance corresponding to the target cross-content region according to the position;

[0076] A color transition interval determination unit, configured to determine a color transition interval corresponding to the target cross-content area;

[0077] A transition color determination unit is used to determine a transition color corresponding to the target cross-content area according to the view offset distance, the status bar height, the reference distance, and the color transition interval.

[0078] In an optional implementation, the color transition interval determination unit is specifically configured to:

[0079] Acquire a first color of the one content area and a second color of the other content area;

[0080] A color interval consisting of the first color and the second color is determined as a color transition interval corresponding to the target cross-content area.

[0081] In an optional implementation, the transition color determination unit specifically includes:

[0082] an offset distance determining subunit, configured to determine an offset distance according to the view offset distance, the reference distance and the status bar height;

[0083] A transition interval determination subunit, used to determine the transition interval according to the height of the status bar;

[0084] The transition color sub-determination unit is used to determine the transition color corresponding to the target cross-content area according to the offset distance, the transition interval and the color transition interval.

[0085] In an optional implementation manner, the offset distance determination subunit is specifically used to:

[0086] Acquire a first difference between the reference distance and the height of the status bar;

[0087] Obtaining a second difference between the view offset distance and the first difference;

[0088] The second difference is determined as the offset distance.

[0089] In an optional implementation manner, the transition interval determination subunit is specifically used to:

[0090] Obtaining a preset first value, and obtaining a product of the status bar height and a preset second value;

[0091] A numerical interval consisting of the preset first numerical value and the product is determined as a transition interval.

[0092] In an optional implementation, the transition color sub-determination unit is specifically configured to:

[0093] Calling an interpolation algorithm to perform interpolation processing according to the offset distance, the transition interval, and the color transition interval to obtain an interpolation color;

[0094] The interpolation color is determined as a transition color corresponding to the target cross-content area.

[0095] In a third aspect of the embodiments of the present application, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0096] Memory, used to store computer programs;

[0097] The processor is used to implement any status bar background color adjustment method described in the first aspect above when executing the program stored in the memory.

[0098] In a fourth aspect of the embodiments of the present application, a storage medium is further provided, wherein instructions are stored in the storage medium, and when the instructions are executed on a computer, the computer executes any of the status bar background color adjustment methods described in the first aspect above.

[0099] In a fifth aspect of the embodiments of the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for adjusting the background color of the status bar.

[0100] The technical solution provided in the embodiment of the present application obtains the view offset distance of the view when monitoring a preset action occurring in the view of the application, determines the target area in the view where the status bar of the display screen is located based on the view offset distance, determines the color corresponding to the target area, and adjusts the background color of the status bar based on the color corresponding to the target area.

[0101] By obtaining the view offset distance of the application's view, the target area in the view where the status bar of the display screen is located is determined according to the view offset distance, and the background color of the status bar is adjusted according to the color corresponding to the target area. In this way, the background color of the status bar is adjusted by the color corresponding to the target area in the view where the status bar of the display screen is located, thereby avoiding the visual separation of the status bar and the APP, and improving the user visual experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0103] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0104] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0105] Figure 1 A schematic diagram of an implementation flow of a method for adjusting the background color of a status bar shown in an embodiment of the present application;

[0106] Figure 2 This is a schematic diagram of an effect of adjusting the background color of the status bar according to the background color of the content area in the view where the status bar is located, shown in an embodiment of the present application;

[0107] Figure 3 This is a schematic diagram of an implementation flow of another method for adjusting the background color of the status bar shown in an embodiment of the present application;

[0108] Figure 4 This is a schematic diagram of an implementation flow of another method for adjusting the background color of the status bar shown in an embodiment of the present application;

[0109] Figure 5A schematic diagram of an implementation flow of a transition color determination method shown in an embodiment of the present application;

[0110] Figure 6 It is a structural schematic diagram of a status bar background color adjustment device shown in an embodiment of the present application;

[0111] Figure 7 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0112] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0113] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0114] like Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a method for adjusting the background color of a status bar provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:

[0115] S101, when monitoring that a preset action occurs in a view of an application, obtaining a view offset distance of the view.

[0116] In an embodiment of the present application, for an application displayed on a display screen, it is necessary to monitor whether the user performs actions such as scrolling or sliding on the view of the application. Among them, for example, a view scrolling component can be used, and a scrolling event, for example, can be set therein to monitor actions such as scrolling or sliding. Among them, the view scrolling component can be any component or program that can monitor scrolling or sliding actions. In an embodiment of the present application, the view scrolling component supports scrolling in vertical and horizontal directions. The content can be scrolled by dragging, scroll bar, or keyboard / mouse input. In another embodiment of the present application, the view scrolling component is also a scrollable view container, and when its subcomponents exceed the height or width of the container, the subcomponents are allowed to scroll in the vertical or horizontal direction.

[0117] Based on this, for example, for a view scrolling component, it is detected whether it generates a scrolling event, for example. If it is detected that it generates a scrolling event, it means that the user performs actions such as scrolling or sliding on the application's view, thereby monitoring actions such as scrolling of the application's view.

[0118] Thus, when a preset action (such as scrolling) is detected in the view of the application, the view offset distance of the view is obtained. The view offset distance of the view can be provided by the above-mentioned view scrolling component, for example. When a preset action occurs in the view of the application, the view scrolling component measures the view offset distance of the view.

[0119] It should be noted that the view offset distance is related to the preset action of the application's view. For example, if the application's view scrolls up and down, the view offset distance is the Y-axis view offset distance. If the application's view scrolls left and right, the view offset distance is the X-axis view offset distance. This embodiment of the application does not limit this.

[0120] S102: Determine a target area in the view where the status bar of the display screen is located according to the view offset distance.

[0121] In an embodiment of the present application, for the video offset distance of the application's view, the target area in the view where the status bar of the display screen is located can be determined based on the view offset distance, which means that as the preset action of the application's view occurs, the target area in the view where the status bar of the display screen is located changes.

[0122] For example, if the preset action is a scrolling action, then the target area in the view where the status bar of the display screen is located is determined based on the video offset distance of the application's view, which means that as the application's view scrolls, the target area in the view where the status bar of the display screen is located changes.

[0123] S103, determining a color corresponding to the target area, and adjusting the background color of the status bar according to the color corresponding to the target area.

[0124] In an embodiment of the present application, for a target area in a view where a status bar of a display screen is located, a color corresponding to the target area can be determined, thereby adjusting the background color of the status bar according to the color corresponding to the target area.

[0125] For example, for the target area in the view where the status bar of the display screen is located, the color corresponding to the target area can be determined: red, and thus the background color of the status bar can be adjusted according to the color corresponding to the target area, that is, the background color of the status bar is also adjusted to red.

[0126] In this way, the background color of the status bar is adjusted by the color corresponding to the target area in the view where the status bar of the display is located, so as to avoid the status bar and the APP being visually separated, thereby improving the user's visual experience.

[0127] Through the above description of the technical solution provided in the embodiment of the present application, when a preset action is detected in the view of the application, the view offset distance of the view is obtained, and based on the view offset distance, the target area in the view where the status bar of the display screen is located is determined, the color corresponding to the target area is determined, and based on the color corresponding to the target area, the background color of the status bar is adjusted.

[0128] By obtaining the view offset distance of the application's view, the target area in the view where the status bar of the display screen is located is determined according to the view offset distance, and the background color of the status bar is adjusted according to the color corresponding to the target area. In this way, the background color of the status bar is adjusted by the color corresponding to the target area in the view where the status bar of the display screen is located, thereby avoiding the visual separation of the status bar and the APP, and improving the user visual experience.

[0129] In addition, for the view of the application, there are four content areas, such as content area 1, content area 2, content area 3, and content area 4. The background colors of the four content areas are red, yellow, blue, and black, respectively, and the height of each content area is H. In an embodiment of the present application, taking 400 as an example, the user slides up and down on the view of the application, thereby monitoring the scrolling action of the view of the application, that is, after the view of the application is scrolled, the view offset distance of the view is obtained, and according to the view offset distance, it is determined that the status bar of the display screen is in content area 2, and according to the background color of the content area 2, the background color of the status bar is adjusted, that is, the background color of the status bar is adjusted to yellow, which is consistent with the background color yellow of the content area 2, such as Figure 2 shown.

[0130] In an embodiment of the present application, after adjusting the background color of the status bar according to the color corresponding to the target area, the method further includes:

[0131] Step 1, monitor the application, and when a preset action occurs in the view of the application, obtain the second view offset distance of the view; wherein the second view offset distance is the view offset distance obtained previously plus the view offset distance corresponding to the current preset action obtained this time.

[0132] In an embodiment of the present application, after adjusting the background color of the status bar according to the color corresponding to the target area last time, the application continues to be monitored. When a preset action (such as scrolling) is detected in the view of the application, the second view offset distance of the view is obtained.

[0133] It should be noted that the second view offset distance of the view refers to the view offset distance previously obtained plus the view offset distance corresponding to the current preset action obtained this time. For example, if the view offset distance previously obtained is y1, and the view offset distance corresponding to the current preset action obtained this time is y2, then the second view offset distance of the view is y1+y2.

[0134] Step 2: Determine a target area in the view where the status bar of the display screen is located according to the second view offset distance.

[0135] In an embodiment of the present application, for the second video offset distance of the application's view, the target area in the view where the status bar of the display screen is located can be determined based on the second view offset distance, which means that as the preset action of the application's view occurs, the target area in the view where the status bar of the display screen is located changes.

[0136] Step 3, determine the color corresponding to the target area, and adjust the background color of the status bar according to the color corresponding to the target area.

[0137] In an embodiment of the present application, for a target area in a view where a status bar of a display screen is located, a color corresponding to the target area can be determined, thereby adjusting the background color of the status bar according to the color corresponding to the target area.

[0138] For example, following the last Figure 2 In the first scrolling operation, the color corresponding to the target area is yellow. The background color of the status bar is adjusted according to the yellow color corresponding to the target area, that is, the background color of the status bar is also adjusted to yellow. This time, the blue color corresponding to the target area is determined. According to the blue color corresponding to the target area, the background color of the status bar is adjusted, that is, the background color of the status bar is also adjusted to blue.

[0139] In addition, for the view of the application, there are four content areas, such as content area 1, content area 2, content area 3, and content area 4. The background colors of the four content areas are red, yellow, blue, and black, respectively, and the height of each content area is H. In the embodiment of the present application, taking 400 as an example, the user slides up and down on the view of the application, thereby monitoring the scrolling action of the view of the application, that is, after the view of the application is scrolled, the view offset distance of the view is obtained, and according to the view offset distance, it is determined that the status bar of the display screen is in content area 2, and according to the background color of the content area 2, the background color of the status bar is adjusted, that is, the background color of the status bar is adjusted to yellow, which is consistent with the background color yellow of the content area 2, such as Figure 2 As shown. After adjusting the background color of the status bar to yellow according to the color corresponding to the target area last time, continue to monitor the application. When a preset action (such as scrolling) is detected in the view of the application, the second view offset distance of the view is obtained. The second view offset distance is the view offset distance obtained previously plus the view offset distance corresponding to the current preset action obtained this time. According to the second view offset distance, it is determined that the status bar of the display screen is in content area 3, and the background color of the status bar is adjusted according to the background color of the content area 3, that is, the background color of the status bar is adjusted to blue, which is consistent with the background color blue of the content area 3.

[0140] Based on this, Figure 3 FIG. 1 is a schematic diagram of an implementation flow of another method for adjusting the background color of the status bar provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:

[0141] S301, when monitoring that a preset action occurs in a view of an application, obtaining a view offset distance of the view.

[0142] In the embodiment of the present application, this step is similar to the above-mentioned step S101, and the embodiment of the present application will not be described one by one here.

[0143] S302: Determine a target content area in the view where the status bar of the display screen is located according to the view offset distance.

[0144] In the embodiment of the present application, for the view offset distance of the application's view, the target content area in the view where the status bar of the display screen is located can be determined according to the view offset distance. Figure 2 As shown, the content area 2 in the view where the status bar of the display screen is located is determined according to the view offset distance.

[0145] Among them, the determination of the target content area in the view where the status bar of the display screen is located can be specifically: obtaining a preset first distance range set, the preset first distance range set includes at least one preset first distance range, and each preset first distance range corresponds to a corresponding content area in the view of the application, which means that the preset first distance range corresponds to the content area in the view of the application, as shown in Table 1 below, Height refers to the height of the status bar, H refers to the height of the content area, and N is the total number of content areas included in the view of the application.

[0146] Preset first distance range Content Area ≤1*H-Height Content Area 1 >1*H+Height&<2*H-Height Content Area 2 >2*H+Height&<3*H-Height Content Area 3 >(i-1)*H+Height&<i*H-Height Content area i (i is 2, ..., N-1) …… …… >(N-1)*H+Height Content Area N

[0147] Table 1

[0148] Therefore, for the view offset distance of the application's view, the target preset first distance range where the view offset distance is located is searched from at least one preset first distance range included in the preset first distance range set, and the content area in the view corresponding to the target preset first distance range is searched, and the content area in the view corresponding to the target preset first distance range is determined as the target content area in the view where the status bar of the display screen is located.

[0149] For example, for the view offset distance y of the application's view, if y≤1*H-Height, you can look for content area 1 in the view corresponding to the target preset first distance range of "≤1*H-Height", and determine content area 1 as the target content area in the view where the status bar of the display is located, indicating that the status bar is in content area 1. At this time, the background color of the status bar should maintain the same background color as that of content area 1, that is, the background color of the status bar should be red.

[0150] S303, obtaining the color of the target content area, and adjusting the background color of the status bar to the color of the target content area.

[0151] In the embodiment of the present application, for the target content area, the color of the target content area can be obtained, and the background color of the status bar can be adjusted to the color of the target content area. Among them, the color of the target content area generally refers to the background color of the target content area.

[0152] In this way, the background color of the status bar is adjusted by the color corresponding to the target content area in the view where the status bar of the display is located, so as to avoid the status bar and the APP being visually separated, thereby improving the user's visual experience.

[0153] In addition, by adjusting the background color of the status bar according to the color corresponding to the target content area in the view where the status bar of the display screen is located, it can also help users better distinguish different content areas. For example, when reading the news content area, the background color of the status bar can be consistent with the news background color, and when watching the video content area, the background color of the status bar can be consistent with the video background color, so as to better distinguish different content areas.

[0154] It can also improve the readability and accessibility of the status bar. For example, when the background color of the status bar is darker, you can use the color corresponding to the brighter content area to adjust the background color of the status bar, and vice versa, to ensure that the status bar content is clearly visible and improve the readability and accessibility of the status bar.

[0155] In addition, for the view of the application, there are four content areas, such as content area 1, content area 2, content area 3, and content area 4. The background colors of the four content areas are red, yellow, blue, and black, respectively, and the height H of each content area is, for example, 400. The user slides up and down on the view of the application, thereby monitoring the scrolling action of the view of the application, that is, after the view of the application is scrolled, the view offset distance of the view is obtained, and according to the view offset distance, it is determined that the status bar of the display screen is in the cross-content area in the view. For the cross-content area, it is characterized that the status bar spans two content areas, that is, the status bar transitions from one content area to another content area, for example, the status bar transitions from content area 1 to content area 2, and the background color of the status bar should be switched from red to yellow. However, if the switch is made directly, it will cause abruptness and a sense of separation. For this reason, transition processing is required for the cross-content area, that is, the transition color corresponding to the target cross-content area is determined, and the background color of the status bar is adjusted to the transition color.

[0156] Based on this, Figure 4 FIG. 1 is a schematic diagram of an implementation flow of another method for adjusting the background color of the status bar provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:

[0157] S401, when monitoring that a preset action occurs in a view of an application, obtaining a view offset distance of the view.

[0158] In the embodiment of the present application, this step is similar to the above-mentioned step S101, and the embodiment of the present application will not be described one by one here.

[0159] S402: Determine a target cross-content area in the view where the status bar of the display screen is located according to the view offset distance.

[0160] In the embodiment of the present application, for the view offset distance of the view of the application, the target cross-content area in the view where the status bar of the display screen is located can be determined according to the view offset distance. Among them, for the target cross-content area, it can be understood that the status bar spans two content areas, that is, the status bar transitions from one content area to another content area, for example, the status bar spans content area 1 and content area 2, that is, the status bar transitions from content area 1 to content area 2.

[0161] Among them, for determining the target cross-content area in the view where the status bar of the display screen is located, specifically, it can be: obtaining a preset second distance range set, the preset second distance range set includes at least one preset second distance range, and each preset second distance range corresponds to the corresponding cross-content area in the view, which means that the preset second distance ranges correspond one-to-one to the cross-content area in the view, as shown in Table 2 below, Height refers to the height of the status bar, H refers to the height of the content area, M is the target cross-content area -1 when a preset action occurs in the view of the application, M<=N-1, and N is the total number of content areas included in the view of the application.

[0162] Preset second distance range Across content areas >1*H-Height&≤1*H+Height Cross content area 1 ≥2*H-Height&≤2*H+Height Cross content area 2 ≥i*H-Height&≤i*H+Height Cross content area …… …… ≥M*H-Height&≤M*H+Height Cross content area M

[0163] Table 2

[0164] Therefore, for the view offset distance of the application's view, the target preset second distance range in which the view offset distance is located is searched from at least one preset second distance range included in the preset second distance range set, the cross-content area in the view corresponding to the target preset second distance range is searched, and the cross-content area in the view corresponding to the target preset second distance range is determined as the target cross-content area in the view where the status bar of the display screen is located.

[0165] For example, for the view offset distance y of the application's view, if 1*H-Height<y≤1*H+Height, you can look for the cross-content area 1 in the view corresponding to the target preset second distance range of ">1*H-Height&≤1*H+Height", and determine the cross-content area 1 as the target cross-content area in the view where the status bar of the display screen is located, indicating that the status bar is scrolling from content area 1 to content area 2, and the background color of the status bar should be switched from red to yellow, but a direct switch will cause a sense of abruptness and fragmentation. For this reason, transition processing is required for the target cross-content area, that is, determining the transition color corresponding to the target cross-content area, and adjusting the background color of the status bar to the transition color.

[0166] S403: Determine a transition color corresponding to the target cross-content area, and adjust the background color of the status bar to the transition color.

[0167] In the embodiment of the present application, for the target cross-content area, the transition color corresponding to the target cross-content area can be determined, and the background color of the status bar can be adjusted to the transition color. Among them, for determining the transition color corresponding to the target cross-content area, it is generally necessary to refer to several parameters such as the status bar height, the reference distance corresponding to the target cross-content area, the color transition interval corresponding to the target cross-content area, and the view offset distance.

[0168] It should be noted that the status bar height is generally fixed, and the reference distance corresponding to the target cross-content area and the color transition interval corresponding to the target cross-content area are also fixed relative to the target cross-content area, while the view offset distance varies, so the transition color will change with the change of the view offset distance. The embodiments of the present application do not limit this.

[0169] In an embodiment of the present application, after obtaining the second view offset distance of the view, the method further includes:

[0170] Step 1: determine a second target cross-content area in the view where the status bar of the display screen is located according to the second view offset distance; wherein the second target cross-content area is a transition of the status bar corresponding to the second view offset distance from one content area to another content area.

[0171] In an embodiment of the present application, after adjusting the background color of the status bar last time, the application continues to be monitored. When a preset action (such as scrolling) is detected in the view of the application, the second view offset distance of the view is obtained, where the second view offset distance is the view offset distance obtained previously plus the view offset distance corresponding to the current preset action obtained this time.

[0172] For the second view offset distance of the view, a second target cross-content area in the view where the status bar of the display screen is located can be determined according to the second view offset distance, wherein the second target cross-content area is the transition of the status bar corresponding to the second view offset distance from one content area to another content area.

[0173] For example, following the last time according to the cross content area 1 (ie Figure 2 As shown, the status bar is scrolling from content area 1 to content area 2) corresponding to the transition color. After adjusting the background color of the status bar, continue to monitor the application. When the scrolling of the application's view is detected, the second view offset distance y of the view is obtained.

[0174] For the second view offset distance y of the view, if 2*H-Height≤y≤2*H+Height, and the end position corresponding to the last scroll is in content area 2, then the cross-content area 2 in the view corresponding to the preset second distance range of "≥2*H-Height&≤2*H+Height" can be searched, and the cross-content area 2 can be determined as the second target cross-content area in the view where the status bar of the display screen is located, indicating that the status bar is scrolling from content area 2 to content area 3.

[0175] Step 2: obtaining a target cross-content area according to the second target cross-content area.

[0176] In the embodiment of the present application, for the second target cross-content area in the view where the status bar of the display screen is located, the target cross-content area can be obtained according to the second target cross-content area.

[0177] Among them, the initial target cross-content area can be obtained according to the second target cross-content area, and the initial target cross-content area includes a source starting area and an ending area, wherein the source starting area is content area 1, and the ending area is the content area corresponding to the ending area of ​​the second target cross-content area, and the first ending area of ​​the target cross-content area corresponding to the last preset action is obtained, and the content area corresponding to the first ending area is used as the final starting area of ​​the target cross-content area, and the area composed of the final starting area and the ending area is used as the target cross-content area.

[0178] For example, if the second target cross-content area is cross-content area 2, it means that the status bar is scrolling from content area 2 to content area 3. The initial target cross-content area is obtained based on the second target cross-content area. The initial target cross-content area includes a source starting area and an ending area, wherein the source starting area is content area 1, and the ending area is content area 3 corresponding to the ending area in cross-content area 2.

[0179] Get the first end area of ​​the cross-content area 1 corresponding to the last scroll. The cross-content area 1 indicates that the status bar is scrolling from content area 1 to content area 2. Then the content area corresponding to the first end area is content area 2. Therefore, content area 2 corresponding to the first end area is used as the final starting area of ​​the target cross-content area, and the area composed of the final starting area and the end area is used as the target cross-content area, that is, the area composed of content area 2 and content area 3 is used as the target cross-content area.

[0180] Step 3: determine the transition color corresponding to the target cross-content area, and adjust the background color of the status bar to the transition color.

[0181] In the embodiment of the present application, for the target cross-content area, the transition color corresponding to the target cross-content area can be determined, and the background color of the status bar can be adjusted to the transition color. Among them, for determining the transition color corresponding to the target cross-content area, it is generally necessary to refer to several parameters such as the status bar height, the reference distance corresponding to the target cross-content area, the color transition interval corresponding to the target cross-content area, and the view offset distance.

[0182] For determining the transition color corresponding to the target cross-content area, you can refer to the following: Figure 5 As shown in the method. Figure 5 FIG. 1 is a schematic diagram of an implementation flow of a transition color determination method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:

[0183] S501, obtaining a status bar height of the status bar, and determining a reference distance corresponding to a target spanning content area.

[0184] In the embodiment of the present application, the status bar height can be obtained, and the status bar height can be represented by Height, for example, Height = 20. In addition, it is also necessary to determine the reference distance corresponding to the target cross-content area, and the reference distance can be represented by base.

[0185] Among them, for different cross-content regions, the corresponding reference distances are different, thereby determining the position of the target cross-content region in the view, and determining the reference distance corresponding to the target cross-content region according to the position.

[0186] For example, across content area 1, it indicates that the status bar spans across content area 1 and content area 2, that is, the status bar is scrolling from content area 1 to content area 2, then the position of across content area 1 in the view is determined, and based on the position, the reference distance 400 corresponding to across content area 1 is determined.

[0187] For another example, spanning content area 2 indicates that the status bar spans content area 2 and content area 3, that is, the status bar is scrolling from content area 2 to content area 3, so the position of spanning content area 2 in the view is determined, and based on the position, the reference distance 800 corresponding to spanning content area 1 is determined, and so on.

[0188] It should be noted that for the position of the target cross-content area in the view, you can look up its corresponding fixed value, and then multiply the fixed value by the height of the content area to get the reference distance corresponding to the target cross-content area. For example, for the cross-content area 1 mentioned above, the corresponding fixed value is 1, and the height of the corresponding content area is 400. Then the reference distance corresponding to the cross-content area 1 is 400*1=400. The processing for the cross-content area 2 is similar.

[0189] S502: Determine a color transition interval corresponding to a target cross-content region.

[0190] In the embodiment of the present application, for a target spanning content area, a color transition interval corresponding to the target spanning content area is determined, wherein the target spanning content area indicates that the status bar spans two content areas, that is, the status bar transitions from one content area to another content area.

[0191] Based on this, the first color of the above-mentioned one content area and the second color of the other content area are obtained, and the color interval composed of the first color and the second color is determined as the color transition interval corresponding to the target cross-content area. Here, the first color refers to the background color of the above-mentioned one content area, and similarly, the second color refers to the background color of the other content area.

[0192] For example, for the cross-content area 1, the status bar spans the content area 1 and the content area 2, that is, the status bar is scrolling from the content area 1 to the content area 2, then the background color red of the content area 1 and the background color yellow of the content area 2 are obtained, and the color interval [red, yellow] composed of red and yellow is determined as the color transition interval corresponding to the cross-content area 1, that is, colorrange = [red, yellow].

[0193] S503: Determine a transition color corresponding to the target cross-content area according to the view offset distance, the status bar height, the reference distance, and the color transition interval.

[0194] In an embodiment of the present application, for the view offset distance, status bar height, reference distance, and color transition interval obtained in the above steps, the transition color corresponding to the target cross-content area can be determined based on the view offset distance, status bar height, reference distance, and color transition interval.

[0195] Among them, the offset distance can be determined according to the view offset distance, the reference distance and the status bar height, the transition interval can be determined according to the status bar height, and then the transition color corresponding to the target cross-content area can be determined according to the offset distance, the transition interval and the color transition interval.

[0196] Specifically, a first difference between the reference distance and the status bar height is obtained, a second difference between the view offset distance and the first difference is obtained, and the second difference is determined as the offset distance, thereby achieving determination of the offset distance.

[0197] For example, the reference distance is represented by base, the status bar height is represented by Height, the view offset distance is represented by y, and the offset distance is represented by gap. Thus, a first difference between the reference distance and the status bar height is obtained, that is, base-Height, a second difference between the view offset distance and the first difference is obtained, that is, y-(base-Height), and the second difference is determined as the offset distance, that is, gap=y-(base-Height).

[0198] A preset first value is obtained, and the product of the status bar height and the preset second value is obtained, and a numerical interval consisting of the preset first value and the product of the status bar height and the preset second value is determined as a transition interval, thereby realizing the transition interval.

[0199] For example, the preset first value is 0 and the preset second value is 2, then the product of the status bar height and the preset second value is obtained, that is, Height*2, and the numerical interval composed of the preset first value and the product of the status bar height and the preset second value is determined as the transition interval, that is, inputrange=[0, Height*2].

[0200] In addition, in the embodiment of the present application, an interpolator, such as the polate-js library, the SciPy library, etc., can be used to calculate the transition color. Among them, the interpolator has an interpolation algorithm that can be used to calculate the transition color.

[0201] Based on this, an interpolation algorithm is called to perform interpolation processing according to the offset distance, transition interval and color transition interval to obtain an interpolated color, and the interpolated color is determined as the transition color corresponding to the target cross-content area.

[0202] For example, for the transition interval inputrange, it represents the input range of the interpolate function in the polate-js library. For the color transition interval colorrange, it represents the output range of the interpolate function. The interpolate function is called to perform interpolation processing according to the offset distance gap, the transition interval inputrange, and the color transition interval colorrange to obtain the interpolated color orange, and the interpolated color is determined as the transition color across content area 1.

[0203] In this way, the background color of the status bar is adjusted by the transition color corresponding to the target cross-content area in the view where the status bar of the display screen is located, thereby reducing the visual abruptness and making the view look more coordinated and beautiful, thereby improving the overall design quality and user satisfaction.

[0204] Corresponding to the above method embodiment, the present application embodiment also provides a status bar background color adjustment device, such as Figure 6 As shown, the device may include: a distance acquisition module 610 , a region determination module 620 , and a color adjustment module 630 .

[0205] The distance acquisition module 610 is used to acquire the view offset distance of the view when monitoring that a preset action occurs in the view of the application;

[0206] An area determination module 620, configured to determine a target area in the view where the status bar of the display screen is located according to the view offset distance;

[0207] The color adjustment module 630 is used to determine the color corresponding to the target area, and adjust the background color of the status bar according to the color corresponding to the target area.

[0208] In an optional implementation, the region determination module is specifically configured to:

[0209] Determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located;

[0210] The color adjustment module is specifically used for:

[0211] The color of the target content area is obtained, and the background color of the status bar is adjusted to the color of the target content area.

[0212] In an optional implementation, the region determination module is specifically configured to:

[0213] Determine, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located;

[0214] The target crosses content areas to represent that the status bar transitions from one content area to another content area;

[0215] The color adjustment module specifically includes:

[0216] A transition color determination submodule, used to determine the transition color corresponding to the target cross-content area;

[0217] The color adjustment submodule is used to adjust the background color of the status bar to the transition color.

[0218] In an optional implementation, the region determination module is specifically configured to:

[0219] Acquire a preset first distance range set, wherein the preset first distance range set includes at least one preset first distance range, and each of the preset first distance ranges corresponds to a corresponding content area in the view;

[0220] From at least one of the preset first distance ranges, searching for a target preset first distance range where the view offset distance is located;

[0221] Searching for a content area in the view corresponding to a preset first distance range of the target;

[0222] The content area in the view corresponding to the preset first distance range of the target is determined as the target content area in the view where the status bar of the display screen is located.

[0223] In an optional implementation, the region determination module is specifically configured to:

[0224] Acquire a preset second distance range set, wherein the preset second distance range set includes at least one preset second distance range, and each of the preset second distance ranges corresponds to a corresponding cross-content area in the view;

[0225] Searching for a target preset second distance range where the view offset distance is located from at least one of the preset second distance ranges;

[0226] Finding a cross-content area in the view corresponding to a preset second distance range of the target;

[0227] The cross-content region in the view corresponding to the preset second distance range of the target is determined as the target cross-content region in the view where the status bar of the display screen is located.

[0228] In an optional implementation, the transition color determination submodule specifically includes:

[0229] A status bar height obtaining unit, used to obtain the status bar height of the status bar;

[0230] A reference distance determination unit, configured to determine a reference distance corresponding to the target cross-content region; wherein determining the reference distance corresponding to the target cross-content region comprises: determining a position of the target cross-content region in the view, and determining the reference distance corresponding to the target cross-content region according to the position;

[0231] A color transition interval determination unit, configured to determine a color transition interval corresponding to the target cross-content area;

[0232] A transition color determination unit is used to determine a transition color corresponding to the target cross-content area according to the view offset distance, the status bar height, the reference distance, and the color transition interval.

[0233] In an optional implementation, the color transition interval determination unit is specifically configured to:

[0234] Acquire a first color of the one content area and a second color of the other content area;

[0235] A color interval consisting of the first color and the second color is determined as a color transition interval corresponding to the target cross-content area.

[0236] In an optional implementation, the transition color determination unit specifically includes:

[0237] an offset distance determining subunit, configured to determine an offset distance according to the view offset distance, the reference distance and the status bar height;

[0238] A transition interval determination subunit, used to determine the transition interval according to the height of the status bar;

[0239] The transition color sub-determination unit is used to determine the transition color corresponding to the target cross-content area according to the offset distance, the transition interval and the color transition interval.

[0240] In an optional implementation manner, the offset distance determination subunit is specifically used to:

[0241] Acquire a first difference between the reference distance and the height of the status bar;

[0242] Obtaining a second difference between the view offset distance and the first difference;

[0243] The second difference is determined as the offset distance.

[0244] In an optional implementation manner, the transition interval determination subunit is specifically used to:

[0245] Obtaining a preset first value, and obtaining a product of the status bar height and a preset second value;

[0246] A numerical interval consisting of the preset first numerical value and the product is determined as a transition interval.

[0247] In an optional implementation, the transition color sub-determination unit is specifically configured to:

[0248] Calling an interpolation algorithm to perform interpolation processing according to the offset distance, the transition interval, and the color transition interval to obtain an interpolation color;

[0249] The interpolation color is determined as a transition color corresponding to the target cross-content area.

[0250] The present application also provides an electronic device, such as Figure 7As shown, it includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74.

[0251] A memory 73, for storing computer programs;

[0252] The processor 71 is used to execute the program stored in the memory 73 to implement the following steps:

[0253] When a preset action is detected in the view of an application, the view offset distance of the view is obtained; based on the view offset distance, a target area in the view where the status bar of the display screen is located is determined; a color corresponding to the target area is determined, and based on the color corresponding to the target area, a background color of the status bar is adjusted.

[0254] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0255] The communication interface is used for communication between the above electronic device and other devices.

[0256] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0257] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0258] In another embodiment provided in the present application, a storage medium is further provided, in which instructions are stored. When the instructions are executed on a computer, the computer executes any one of the status bar background color adjustment methods in the above embodiments.

[0259] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the status bar background color adjustment methods in the above embodiments.

[0260] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0261] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0262] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0263] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for adjusting the background color of a status bar, characterized in that: The method comprises: When a preset action is detected in a view of the application, obtaining a view offset distance of the view; Determining, according to the view offset distance, a target area in the view where the status bar of the display screen is located; A color corresponding to the target area is determined, and a background color of the status bar is adjusted according to the color corresponding to the target area.

2. The method according to claim 1, characterized in that The determining, according to the view offset distance, a target area in the view where the status bar of the display screen is located includes: Determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located; The determining the color corresponding to the target area and adjusting the background color of the status bar according to the color corresponding to the target area includes: The color of the target content area is obtained, and the background color of the status bar is adjusted to the color of the target content area.

3. The method according to claim 1, characterized in that The determining, according to the view offset distance, a target area in the view where the status bar of the display screen is located includes: Determine, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located; The target crosses content areas to represent that the status bar transitions from one content area to another content area; The determining the color corresponding to the target area and adjusting the background color of the status bar according to the color corresponding to the target area includes: A transition color corresponding to the target cross-content area is determined, and the background color of the status bar is adjusted to the transition color.

4. The method according to claim 2, characterized in that: The determining, according to the view offset distance, a target content area in the view where the status bar of the display screen is located includes: Acquire a preset first distance range set, wherein the preset first distance range set includes at least one preset first distance range, and each of the preset first distance ranges corresponds to a corresponding content area in the view; From at least one of the preset first distance ranges, searching for a target preset first distance range where the view offset distance is located; Searching for a content area in the view corresponding to a preset first distance range of the target; The content area in the view corresponding to the preset first distance range of the target is determined as the target content area in the view where the status bar of the display screen is located.

5. The method according to claim 3, characterized in that: The determining, according to the view offset distance, a target cross-content area in the view where the status bar of the display screen is located, includes: Acquire a preset second distance range set, wherein the preset second distance range set includes at least one preset second distance range, and each of the preset second distance ranges corresponds to a corresponding cross-content area in the view; Searching for a target preset second distance range where the view offset distance is located from at least one of the preset second distance ranges; Finding a cross-content area in the view corresponding to a preset second distance range of the target; The cross-content region in the view corresponding to the preset second distance range of the target is determined as the target cross-content region in the view where the status bar of the display screen is located.

6. The method according to claim 3, characterized in that: The determining the transition color corresponding to the target cross-content area includes: Obtaining a status bar height of the status bar, and determining a reference distance corresponding to the target cross-content area; wherein determining the reference distance corresponding to the target cross-content area comprises: determining a position of the target cross-content area in the view, and determining the reference distance corresponding to the target cross-content area according to the position; Determine a color transition interval corresponding to the target cross-content area; A transition color corresponding to the target cross-content area is determined according to the view offset distance, the status bar height, the reference distance, and the color transition interval.

7. The method according to claim 6, characterized in that The determining the color transition interval corresponding to the target cross-content area includes: Acquire a first color of the one content area and a second color of the other content area; A color interval consisting of the first color and the second color is determined as a color transition interval corresponding to the target cross-content area.

8. The method according to claim 6, characterized in that The determining, according to the view offset distance, the status bar height, the reference distance, and the color transition interval, a transition color corresponding to the target cross-content area includes: Determine an offset distance according to the view offset distance, the reference distance, and the status bar height; Determining a transition interval according to the status bar height; A transition color corresponding to the target cross-content area is determined according to the offset distance, the transition interval, and the color transition interval.

9. The method according to claim 8, characterized in that The determining the offset distance according to the view offset distance, the reference distance and the status bar height includes: Acquire a first difference between the reference distance and the height of the status bar; Obtaining a second difference between the view offset distance and the first difference; The second difference is determined as the offset distance.

10. The method according to claim 8, characterized in that The determining the transition interval according to the status bar height includes: Obtaining a preset first value, and obtaining a product of the status bar height and a preset second value; A numerical interval consisting of the preset first numerical value and the product is determined as a transition interval.

11. The method according to claim 8, characterized in that The determining, according to the offset distance, the transition interval, and the color transition interval, a transition color corresponding to the target cross-content area includes: Calling an interpolation algorithm to perform interpolation processing according to the offset distance, the transition interval, and the color transition interval to obtain an interpolation color; The interpolation color is determined as a transition color corresponding to the target cross-content area.

12. A device for adjusting the background color of a status bar, characterized in that: The device comprises: A distance acquisition module, used to acquire the view offset distance of the view when monitoring a preset action of the view of the application; An area determination module, used to determine a target area in the view where the status bar of the display screen is located according to the view offset distance; The color adjustment module is used to determine the color corresponding to the target area and adjust the background color of the status bar according to the color corresponding to the target area.

13. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.