The content of the invention
The present invention provides a kind of display interface display methods, display device and computer-readable recording medium, shielding are eachApplication program sets the foreground color of status bar in display interface or navigation bar, force according to status bar in each application program orThe background color of navigation bar sets corresponding foreground color.
The first aspect of the present invention, discloses a kind of display interface display methods, comprises the following steps:
S101:Judge whether the application program in an intelligent terminal produces a display refresh operation;
S102:When the application program in the intelligent terminal produces a display refresh operation, pass through an inverse algorithm baseThe foreground color of the status bar or navigation bar is calculated in the background color of status bar on display interface or navigation bar;
S103:The status bar or navigation bar are shown in the display interface of the intelligent terminal.
Preferably, in step S101, the display refresh operation includes following any operation:
1) start-up operation of any application program;
2) any application program performs modification operation to the color of status bar or navigation bar;
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation;
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
Preferably, step S102 comprises the following steps:
S102-1:Judge the status bar or navigation bar for pellucidity or opaque state;
S102-2:When the status bar or navigation bar are opaque state, the back of the body of the status bar or navigation bar is obtainedScape color;
S102-3:The foreground color of the status bar or navigation bar is set to the background face with the status bar or navigation barThe anti-tone of form and aspect;
S102-4:When the status bar or navigation bar are pellucidity, status bar or navigation to the application programThe display area on column performs shot operation, obtains a status bar sectional drawing or navigation bar sectional drawing;
S102-5:One sectional drawing background colour is calculated by a sampling algorithm to the status bar sectional drawing or navigation bar sectional drawingAdjust;
S102-6:The foreground color of the status bar or navigation bar is set to the color opposite with the sectional drawing background color toneAdjust.
Preferably, the step S102 is further comprising the steps of:
S102-7:When the status bar or navigation bar are pellucidity and the background color of the application program display interfaceFor Transparent color when, obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state;
S102-8:The foreground color of the status bar or navigation bar is set to opposite with the background color of the display windowTone.
Preferably, after S103, the display interface display methods is further comprising the steps of:
S104:Preserve the status bar of the application program or the foreground color of navigation bar;
S105:When the application program produces a display refresh operation again, according to the state preserved in step S104The foreground color of column or navigation bar shows the status bar or navigation bar.
The second aspect of the present invention, discloses a kind of display interface display device, including:
Judgment module, judges whether the application program in an intelligent terminal produces a display refresh operation;
Inverse computing module, is connected with the judgment module, when the judgment module judges the application in an intelligent terminalWhen program produces a display refresh operation, pass through background color of the inverse algorithm based on status bar on display interface or navigation barCalculate the foreground color of the status bar or navigation bar;
First display module, is connected with the inverse computing module, shown in the display interface of the intelligent terminal described inStatus bar or navigation bar.
Preferably, when the judgment module judges whether the application program produces a display refresh operation, the displayRefresh operation includes following any operation:
1) start-up operation of any application program;
2) any application program performs modification operation to the color of status bar or navigation bar;
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation;
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
Preferably, the inverse computing module includes:
Pellucidity judging unit, judges the status bar or navigation bar for pellucidity or opaque state;
First background color acquiring unit, is connected with the pellucidity judging unit, when the pellucidity judges listWhen member judges the status bar or navigation bar for opaque state, the background color of the status bar or navigation bar is obtained;
First color setting unit, is connected with the first background color acquiring unit, by the status bar or navigation barForeground color be set to the tone opposite with the background color of the status bar or navigation bar;
Sectional drawing unit, is connected with the pellucidity judging unit, when the pellucidity judging unit judges the shapeWhen state column or navigation bar are pellucidity, the display area of status bar or navigation bar to the application program performs sectional drawing behaviourMake, obtain a status bar sectional drawing or navigation bar sectional drawing;
Computing unit is sampled, is connected with the sectional drawing unit, the status bar sectional drawing or navigation bar sectional drawing is adopted by oneA sectional drawing background color tone is calculated in sample algorithm;
Second color setting unit, is connected with the sampling computing unit, by the prospect face of the status bar or navigation barColor is set to the tone opposite with the sectional drawing background color tone.
Preferably, the inverse computing module further includes:
Second background color acquiring unit, is connected with the pellucidity judging unit, when the pellucidity judges listMember judges the background color that the status bar or navigation bar are pellucidity and the application program display interface when being Transparent color,Obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state;
3rd color setting unit, is connected with the second background color acquiring unit, by the status bar or navigation barForeground color be set to the tone opposite with the background color of the display window.
Preferably, the display interface display device further includes:
Preserving module, is connected with the inverse computing module, before the status bar or navigation bar that preserve the application programScape color;
Second display module, is connected with the preserving module, when the application program produces a display refresh operation againWhen, show the status bar or navigation bar according to the status bar or the foreground color of navigation bar that are preserved in the preserving module.
The third aspect of the present invention, discloses a kind of computer-readable recording medium, is stored thereon with computer program, instituteState when computer program is executed by processor and realize following steps:
S106:Judge whether the application program in an intelligent terminal produces a display refresh operation;
S107:When the application program in the intelligent terminal produces a display refresh operation, pass through an inverse algorithm baseThe foreground color of the status bar or navigation bar is calculated in the background color of status bar on display interface or navigation bar;
S108:The status bar or navigation bar are shown in the display interface of the intelligent terminal.
Preferably, in step S106, the display refresh operation includes following any operation:
1) start-up operation of any application program;
2) any application program performs modification operation to the color of status bar or navigation bar;
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation;
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
Preferably, step S107 comprises the following steps:
S107-1:Judge the status bar or navigation bar for pellucidity or opaque state;
S107-2:When the status bar or navigation bar are opaque state, the back of the body of the status bar or navigation bar is obtainedScape color;
S107-3:The foreground color of the status bar or navigation bar is set to the background face with the status bar or navigation barThe anti-tone of form and aspect;
S107-4:When the status bar or navigation bar are pellucidity, status bar or navigation to the application programThe display area on column performs shot operation, obtains a status bar sectional drawing or navigation bar sectional drawing;
S107-5:One sectional drawing background colour is calculated by a sampling algorithm to the status bar sectional drawing or navigation bar sectional drawingAdjust;
S107-6:The foreground color of the status bar or navigation bar is set to the color opposite with the sectional drawing background color toneAdjust.
Preferably, the step S107 is further comprising the steps of:
S107-7:When the status bar or navigation bar are pellucidity and the background color of the application program display interfaceFor Transparent color when, obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state;
S107-8:The foreground color of the status bar or navigation bar is set to opposite with the background color of the display windowTone.
Preferably, after S108, the computer program is further comprising the steps of:
S109:Preserve the status bar of the application program or the foreground color of navigation bar;
S110:When the application program produces a display refresh operation again, according to the state preserved in step S109The foreground color of column or navigation bar shows the status bar or navigation bar.
After employing above-mentioned technical proposal, compared with prior art, have the advantages that:
1. by the pressure inverse mechanism to status bar or navigation bar, the unification of system theme visual effect is maintained, is simplifiedDevelopment logic of the third party application to status bar or navigation bar;
2. status bar or navigation bar information keep being clearly visible to a user, user-interaction experience is improved;
3. pair a variety of different types of status bars and the correct inverse under different scenes;
4. application program is supported especially to set status bar color as characteristic and close forced regime column inverse.
Embodiment
The advantages of the present invention is further explained below in conjunction with attached drawing and specific embodiment.
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related toDuring attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar key element.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appendedThe example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
It is only merely for the purpose of description specific embodiment in the term that the disclosure uses, and is not intended to be limiting the disclosure." one kind " of singulative used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majorityForm, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapsContaining the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosureA little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing fromIn the case of disclosure scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to asOne information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determining ".
In the description of the present invention, it is to be understood that term " longitudinal direction ", " transverse direction ", " on ", " under ", "front", "rear",The orientation or position relationship of the instruction such as "left", "right", " vertical ", " level ", " top ", " bottom " " interior ", " outer " is based on attached drawing institutesThe orientation or position relationship shown, is for only for ease of the description present invention and simplifies description, rather than instruction or the dress for implying meaningPut or element there must be specific orientation, with specific azimuth configuration and operation, therefore it is not intended that to limit of the inventionSystem.
In the description of the present invention, unless otherwise prescribed with limit, it is necessary to explanation, term " installation ", " connected "," connection " should be interpreted broadly, for example, it may be the connection inside mechanical connection or electrical connection or two elements, canTo be to be connected directly, can also be indirectly connected by intermediary, for the ordinary skill in the art, can basisConcrete condition understands the concrete meaning of above-mentioned term.
In follow-up description, the suffix using such as " module ", " component " or " unit " for representing element is onlyBe conducive to the explanation of the present invention, itself do not have a specific meaning.Therefore, " module " can mixedly make with " component "With.
It is described aobvious to meet the flow diagram of display interface display methods in one embodiment of the present invention refering to Fig. 1Show that interface display method comprises the following steps:
S101:Judge whether the application program in an intelligent terminal produces a display refresh operation.
In the present embodiment, the display refresh operation must be produced by application program (i.e. APP), can be to the intelligent terminalDisplay interface refreshed, can be the start-up operation of application program, the switching of application program display interface, application program pairWallpaper is modified;The display refresh operation can also be modification behaviour of the application program to the color of status bar or navigation barMake, such as modification background color, modification foreground color etc..The display refresh operation that any application program produces can be used as this stepSuddenly the object judged, the display interface switching between different application fall within the category of display refresh operation.Due to respectively shouldThe class or the interface of method provided with program palpus call operation system realizes display function, such as View classes, Surface classes, becauseThis judges that the display refresh operation can be realized by being monitored to the interface of relevant class or method and show refresh operationJudgement.
S102:When the application program in the intelligent terminal produces a display refresh operation, pass through an inverse algorithm baseThe foreground color of the status bar or navigation bar is calculated in the background color of status bar on display interface or navigation bar.
When step S101 judges to set up, i.e., when the application program in described intelligent terminal produces a display refresh operation,Perform this step.This step performs inverse and calculates, and is counted according to the background color of status bar or navigation bar on the display interfaceCalculate the foreground color of the status bar or navigation bar.For visual angle, background color and the foreground color tool of display interfaceWhen having larger contrast, the content of prospect uses the progress font writing of black color most aobvious easily by user discrimination, such as on blank sheet of paperEye.When this step performs, the background color of the status bar or navigation bar is determined by the application program, from relevant class orMethod interface can obtain setting value of the application program to the background color of the status bar or navigation bar, such asIncrease field in LayoutParams and preserve the status bar of setting or the background color of navigation bar.Then passed through according to the setting valueOne inverse algorithm calculates the tone of the background color contrast maximum with the status bar or navigation bar as the status barOr the foreground color of navigation bar.The color of image is represented by pixel number in computer systems, such as common rgb pixelSystem, color, number range 0-255 are represented using trichromatic pixel number.The realization of the inverse algorithm, can incite somebody to action255 subtract the pixel number of the background color of the status bar or navigation bar, obtained pixel number be the status bar orThe pixel number of the foreground color of navigation bar.The realization of the inverse algorithm, can also be each by being preset in the intelligent terminalThe corresponding inverse of kind color, forms one group of correspondence, only need to be according to the background of status bar or navigation bar when carrying out inverse calculatingColor searches corresponding inverse in the correspondence.
The execution of this step is the aspect execution in operating system, shield each application program itself to the status bar orThe setting of navigation bar foreground color, realizes that the foreground color of unified status bar or navigation bar is set.Such as this step can be rightThe methods of Setstatusbar, Setvis, SetBackground or class are called, and are realized to before status bar or navigation barScape color is set.Since the display interface style that different application programs uses is different, for the background of status bar or navigation barColor sets also difference, and the operation of this step can obtain different foreground colors, to realize complementary picture effect, facilitates user's vision to knowNot.And for the identical background color that different application is set, identical foreground color can be obtained after the operation of this step, in factThe uniformity of existing visual effect;And this method operating system aspect perform, no matter each application program how to handle status bar orThe foreground color of navigation bar, this method eventually prospect according to the inverse algorithm in this step to the status bar or navigation barColor carry out inverse calculating, realize force inverse mechanism, while can make after inverse the background color of status bar or navigation bar andForeground color has larger contrast, and user can be made high-visible, improves user-interaction experience.
S103:The status bar or navigation bar are shown in the display interface of the intelligent terminal.
This step according to the status bar or navigation bar being calculated in step S102 by inverse algorithm prospect faceColor carries out the display of the status bar or navigation bar, displays for a user status bar or navigation bar with complementary picture effect.It is specific realNow, on the basis of step S102 is to correlation technique or class parameter setting by call the classes such as SystemUiVisibility orMethod therein realizes the display of display interface.After above-mentioned steps perform, system can be according to the background of status bar or navigation barColor carries out the foreground color that status bar or navigation bar is calculated in inverse, avoids each application program to status bar or navigation barForeground color carry out the different setting of style, maintain the unification of system theme visual effect.Simultaneously as system level isThrough realizing inverse function, third party application carries out exploitation without the foreground color calculating to status bar or navigation bar and setsPut, simplify development logic.
Further as the display interface display methods is improved, when step S102 is performed, the display refresh operationIncluding following any operation:
1) start-up operation of any application program:
The application program display interface of itself will necessarily be opened during application program launching on the basis of original display interface,Namely there is new display interface to produce, change display content.
2) any application program performs modification operation to the color of status bar or navigation bar:
Application program voluntarily can perform modification to the color of status bar or navigation bar, such as rightThe classes such as systemUiVisibility, setStatusBarColor, setBackground or method are called or parameter is repaiiedChange, you can as display refresh operation.Need to react to above-mentioned modification, by calculating the status bar or navigation barForeground color to adapt to the modification of background color.
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation:
This operation is not for application program, but the desktop or locking screen interface of the intelligent terminal have modified wallpaper,It is exactly that the main interface of operating system or the background patterns of locking screen interface are replaced, falls within display refresh operation, it is necessary to rightStatus bar or navigation bar carry out corresponding color synchronization modification.
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
This operation is initiated by application program, is just the operation that present invention needs force shielding, therefore application program itselfThe foreground color to status bar or navigation bar initiated is performed when inverse is reruned, it is necessary to perform the step S102 to the stateThe foreground color of column or navigation bar is unifiedly calculated, and the operation of reruning of the application program inverse of itself is not worked.
As long as the above-mentioned any operation of application program launching, this method are carried out forcing inverse, can so shield using journeyThe modification of the foreground color of ordered pair status bar or navigation bar, makes the authority of modification foreground color take back in system level.
Further as the display interface display methods is improved, after step S103, the display interface display sideMethod further includes step:
S104:Preserve the status bar of the application program or the foreground color of navigation bar.
This step preserves the foreground color of the status bar or navigation bar that are calculated in the step S02, for everyOne application program respectively preserves.It is achieved in that from the interface of relevant class or method and obtains the status bar or navigation barThe pixel number of foreground color and preservation.
S105:When the application program produces a display refresh operation again, according to the state preserved in step S104The foreground color of column or navigation bar shows the status bar or navigation bar.
When an application program produces a display refresh operation again, that is, the display brush judged in the step S101When new operation occurs again, without using being calculated in step S102 by inverse algorithm, it can directly invoke in step S104The foreground color of the status bar or navigation bar that preserve is shown, system resource is saved, without computing repeatedly.
This improvement embodiment is supported to remember the foreground color of status bar or navigation bar, avoids repetitive operation.At thisIn invention other embodiment, the foreground color of User Defined status bar or navigation bar may also allow for;May also set up operation byButton or switch, it is allowed to user opened for different application program selections force inverse function or close force inverse function withKeep original design.
Fig. 2 is the flow diagram of step S102 in Fig. 1, and the step S102 comprises the following steps:
S102-1:Judge the status bar or navigation bar for pellucidity or opaque state.
The status bar or navigation bar can be arranged to pellucidity by many application programs, that is, without background color,It is transparent, therefore the calculating of the foreground color of the status bar or navigation bar just loses basis and treated, it is necessary to distinguish.This stepRapid execution, can obtain in the onCreate methods of Activity classes and allow the transparent window attribute of status bar, so as to judge instituteIt is pellucidity or opaque state to state status bar or navigation bar.
S102-2:When the status bar or navigation bar are opaque state, the back of the body of the status bar or navigation bar is obtainedScape color.
When step S102-1 judges the status bar or navigation bar for opaque state, this step is performed.This step obtainsThe background color of the status bar or navigation bar is taken, such as is realized by getStatusBarColor methods to background colorObtain.
S102-3:The foreground color of the status bar or navigation bar is set to the background face with the status bar or navigation barThe anti-tone of form and aspect.
This step performs inverse to the foreground color of the status bar or navigation bar and sets, and is obtained according in step S102-2The status bar or navigation bar background color carry out inverse calculating, the foreground color is set to and the background color phaseAnti- tone.Tone refers to the general inclination of picture color in piece image, is big color effect.Since which color is mutualFor opposite color it is difficult to accurately confirm, particularly in the state of image digitazation, color is embodied by pixel number, Neng GoutongThe expression that pixel number realizes trickle color distinction is crossed, inverse definition can not be carried out by unified standard.Therefore this stepAs long as it is opposite to ensure tone, it is ensured that the background color and foreground color have the colour contrast readily identified.
S102-4:When the status bar or navigation bar are pellucidity, status bar or navigation to the application programThe display area on column performs shot operation, obtains a status bar sectional drawing or navigation bar sectional drawing.
When step S102-1 judges the status bar or navigation bar for pellucidity, this step is performed.Due to the shapeThe background color of state column or navigation bar is basis that is transparent, can not being calculated as inverse, therefore considers to select the status bar or leadThe color for the display interface that boat column is covered calculates basis as inverse.This step performs shot operation, to the application programStatus bar or the display area of navigation bar perform shot operation, obtain a status bar sectional drawing or navigation bar sectional drawing.
S102-5:One sectional drawing background colour is calculated by a sampling algorithm to the status bar sectional drawing or navigation bar sectional drawingAdjust.
The status bar sectional drawing or navigation bar sectional drawing embody the color style of the intrinsic display interface of the application program, andSuch display interface is even often with pattern, irregular colour.In order to obtain single color so as to inverse, it is necessary to the shapeState column sectional drawing or navigation bar sectional drawing are sampled, and are realized by a sampling algorithm.When the sampling algorithm is realized, the shape is chosenMultiple pixels of diverse location on state column sectional drawing or navigation bar sectional drawing, then calculate the pixel value average of these pixels, willThe pixel value average is as sectional drawing background color tone.
S102-6:The foreground color of the status bar or navigation bar is set to the color opposite with the sectional drawing background color toneAdjust.
This step performs inverse to the foreground color of the status bar or navigation bar and sets, and is obtained according in step S102-5Sectional drawing background color tone carry out inverse calculating, the foreground color is set to the tone opposite with the sectional drawing background color tone.
This improvement embodiment carries out correct inverse for different types of status bar or navigation bar, makes status bar or navigation barForeground color can be adapted with the background color of display interface, such as when status bar or navigation bar are pellucidity, choosingStatus bar or the background color of navigation bar corresponding region is taken to calculate basis as inverse, for instantly popular pellucidityColumn or immersion status bar can make correct inverse.
Refering to Fig. 3, for the flow diagram of the supplement step of step S102 in Fig. 2 in another embodiment, the stepS102 is further comprising the steps of:
S102-7:When the status bar or navigation bar are pellucidity and the background color of the application program display interfaceFor Transparent color when, obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state.
This step further segments the status bar or navigation bar for the situation of pellucidity, i.e., described application program, can not be by carrying out sectional drawing to the display area of status bar or navigation bar come real when the background color of display interface is also Transparent colorExisting background color obtains, and must continually look for next layer and be in the display window of dispaly state, and choose the background of the display windowColor.Multiple display windows, that is, window are often run on the intelligent terminal, such as is each in foreground or backstageThe application program of operation has the display window of oneself.These display windows can Layering manifestation, currently front stage operation shouldWith the display interface of program in the superiors, when the background color of the currently display interface of the application program of front stage operation isDuring light colour, continue to find the display window in dispaly state to lower floor and the display window is obtained by corresponding class or methodBackground color setting.
S102-8:The foreground color of the status bar or navigation bar is set to opposite with the background color of the display windowTone.
This step performs inverse to the foreground color of the status bar or navigation bar and sets, and is obtained according in step S102-7Display window background color carry out inverse calculating, the foreground color is set to the background color phase with the display windowAnti- tone.
Display interface display methods in the present invention in application, the display area of the status bar or navigation bar according to respectively shouldChanged with the dispaly state of program, for example, during the intelligent terminal transverse screen, split screen when, the status bar or navigation bar also can phasesGround change display location is answered, to keep the dispaly state of opposite crests or opposing floor portion.The present invention can be individually used for status barForeground color setting, the foreground color of navigation bar still sets by each application program;Also the prospect to navigation bar can be individually used forColor settings, the foreground color of status bar are still set by each application program;Also can be at the same time to the prospect face of status bar and navigation barColor carries out unified setting, setting of the shielding application program to the foreground color of status bar and navigation bar.The present invention can also be in systemSet in interface and operation button is set, it is allowed to which user is configured the status bar of each application program or the foreground color of navigation barSelection, for certain applications program, the foreground color of status bar or navigation bar when may be selected not force to run it is setPut, voluntarily set by application program, keep the original pattern of Android operation system of Google's issue.
It is described aobvious to meet the structure diagram of display interface display device 10 in one embodiment of the present invention refering to Fig. 4Show that interface display apparatus 10 includes:
- judgment module 11
The judgment module 11 judges whether the application program in an intelligent terminal produces a display refresh operation.It is described to sentenceThe relevant class of display function or the interface of method that disconnected module 11 provides operating system are monitored, and are realized and are shown refresh operationJudgement.
- inverse computing module 12
The inverse computing module 12 is connected with the judgment module 11, when the judgment module 11 judges an intelligent terminalWhen interior application program produces a display refresh operation, by an inverse algorithm based on status bar on display interface or navigation barBackground color calculates the foreground color of the status bar or navigation bar.The inverse computing module 12 is obtained from the judgment module 11Judging result is taken, when judging result is set up, is obtained from the interface of the relevant class of the foreground color of status bar or navigation bar or methodSetting value of the application program to the background color of the status bar or navigation bar is taken, it is then anti-by one according to the setting valueColor algorithm is calculated as the status bar or leads with the tone of the status bar or the background color contrast maximum of navigation barThe foreground color on boat column.The inverse computing module 12 can be obtained by the pixel number to background color by 255 subtractionsInverse, can also carry out inverse acquisition according to the correspondence of default a variety of colors.
The inverse computing module 12 is arranged in operating system, is not operated in application program, is shielded and each is applied journeySetting of the sequence itself to the status bar or navigation bar foreground color, realizes that the foreground color of unified status bar or navigation bar is setPut.
- the first display module 13
First display module 13 is connected with the inverse computing module 12, is shown in the display interface of the intelligent terminalShow the status bar or navigation bar.First display module 13 obtains the status bar from the inverse computing module 12 or leadsThe foreground color on boat column is set, and the aobvious of the status bar or navigation bar is carried out according to the foreground color of the status bar or navigation barShow, display for a user status bar or navigation bar with complementary picture effect.
Further as the display interface display device 10 is improved, and the display interface display device 10 further includes:
- preserving module 14
The preserving module 14 is connected with the inverse computing module 12, preserves status bar or the navigation of the application programThe foreground color on column.The preserving module 14 obtains the status bar being calculated or navigation from the inverse computing module 12The foreground color on column, and be stored in the intelligent terminal, preserve a foreground color for each application program is corresponding.
- the second display module 15
Second display module 15 is connected with the preserving module 14, when the application program produces a display brush againDuring new operation, show the status bar according to the status bar or the foreground color of navigation bar that are preserved in the preserving module 14 or leadNavigate column.
Further as the display interface display device 10 is improved, and the judgment module 11 judges the application programWhen whether producing a display refresh operation, the display refresh operation includes following any operation:
1) start-up operation of any application program;
2) any application program performs modification operation to the color of status bar or navigation bar;
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation;
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
Refering to Fig. 5, for the structure diagram of inverse computing module 12 in Fig. 4, the inverse computing module 12 includes:
- pellucidity judging unit 121
The pellucidity judging unit 121 judges the status bar or navigation bar for pellucidity or opaque state.The pellucidity judging unit 121 can obtain in the onCreate methods of Activity classes allows the transparent window category of status barProperty, so as to judge the status bar or navigation bar for pellucidity or opaque state.
- the first background color acquiring unit 122
The first background color acquiring unit 122 is connected with the pellucidity judging unit 121, when the transparenceWhen state judging unit 121 judges the status bar or navigation bar for opaque state, the back of the body of the status bar or navigation bar is obtainedScape color.The first background color acquiring unit 122 can be realized to background color by getStatusBarColor methodsObtain.
- the first color setting unit 123
The first color setting unit 123 is connected with the first background color acquiring unit 122, by the status barOr the foreground color of navigation bar is set to the tone opposite with the background color of the status bar or navigation bar.First color is setThe background color that unit 123 obtains the status bar or navigation bar from the first background color acquiring unit 122 is put, passes through oneThe foreground color of the status bar or navigation bar is calculated in embedded inverse algorithm.
- sectional drawing unit 124
The sectional drawing unit 124 is connected with the pellucidity judging unit 121, when the pellucidity judging unit121 when judging the status bar or navigation bar for pellucidity, the viewing area of status bar or navigation bar to the application programDomain performs shot operation, obtains a status bar sectional drawing or navigation bar sectional drawing.
- sampling computing unit 125
The sampling computing unit 125 is connected with the sectional drawing unit 124, to the status bar sectional drawing or navigation bar sectional drawingOne sectional drawing background color tone is calculated by a sampling algorithm.It is described sampling computing unit 125 choose the status bar sectional drawing orMultiple pixels of diverse location on navigation bar sectional drawing, then calculate the pixel value average of these pixels, by the pixel valueAverage is as sectional drawing background color tone.
- the second color setting unit 126
The second color setting unit 126 is connected with the sampling computing unit 125, by the status bar or navigation barForeground color be set to the tone opposite with the sectional drawing background color tone.The second color setting unit 126 is from the samplingComputing unit 125 obtains the sectional drawing background color tone, and carries out inverse calculating, obtains the color opposite with the sectional drawing background color toneAdjust as the status bar or the foreground color of navigation bar.
Further as the display interface display device 10 is improved, and the inverse computing module 12 further includes:
- the second background color acquiring unit 127
The second background color acquiring unit 127 is connected with the pellucidity judging unit 121, when the transparenceState judging unit 121 judges the status bar or navigation bar for pellucidity and the background color of the application program display interfaceFor Transparent color when, obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state.
- the three color setting unit 128
The 3rd color setting unit 128 is connected with the second background color acquiring unit 127, by the status barOr the foreground color of navigation bar is set to the tone opposite with the background color of the display window.The 3rd color setting unit128 obtain the background color of the display window from the second background color acquiring unit 127, and carry out inverse calculating, obtainTo the tone opposite with the background color of the display window as the status bar or the foreground color of navigation bar.
Refering to Fig. 6, to meet described in one embodiment of the present invention computer program on computer-readable recording mediumFlow diagram, be stored with computer program on the computer-readable recording medium, the computer program is by processorFollowing steps are realized during execution:
S106:Judge whether the application program in an intelligent terminal produces a display refresh operation;
S107:When the application program in the intelligent terminal produces a display refresh operation, pass through an inverse algorithm baseThe foreground color of the status bar or navigation bar is calculated in the background color of status bar on display interface or navigation bar;
S108:The status bar or navigation bar are shown in the display interface of the intelligent terminal.
Further as the computer program is improved, and the computer program is further comprising the steps of:
S109:Preserve the status bar of the application program or the foreground color of navigation bar;
S110:When the application program produces a display refresh operation again, according to the state preserved in step S109The foreground color of column or navigation bar shows the status bar or navigation bar.
Further as the computer program is improved, and in step S106, the display refresh operation includes followingOne operation:
1) start-up operation of any application program;
2) any application program performs modification operation to the color of status bar or navigation bar;
3) desktop of the intelligent terminal or locking screen interface perform wallpaper modification operation;
4) any application program performs the foreground color of the status bar or navigation bar inverse and reruns operation.
Refering to Fig. 7, the flow diagram for being step S107 in Fig. 6, the step S107 comprises the following steps:
S107-1:Judge the status bar or navigation bar for pellucidity or opaque state;
S107-2:When the status bar or navigation bar are opaque state, the back of the body of the status bar or navigation bar is obtainedScape color;
S107-3:The foreground color of the status bar or navigation bar is set to the background face with the status bar or navigation barThe anti-tone of form and aspect;
S107-4:When the status bar or navigation bar are pellucidity, status bar or navigation to the application programThe display area on column performs shot operation, obtains a status bar sectional drawing or navigation bar sectional drawing;
S107-5:One sectional drawing background colour is calculated by a sampling algorithm to the status bar sectional drawing or navigation bar sectional drawingAdjust;
S107-6:The foreground color of the status bar or navigation bar is set to the color opposite with the sectional drawing background color toneAdjust.
Refering to Fig. 8, for the flow diagram of the supplement step of step S107 in Fig. 7 in another embodiment, the stepS107 is further comprising the steps of:
S107-7:When the status bar or navigation bar are pellucidity and the background color of the application program display interfaceFor Transparent color when, obtain the background color that next layer in the intelligent terminal display interface is in the display window of dispaly state;
S107-8:The foreground color of the status bar or navigation bar is set to opposite with the background color of the display windowTone.
The method and step of above computer program is consistent with the implementation of the display interface display methods in the present invention, noRepeat again.
It should be noted that the embodiment of the present invention has preferable implementation, and not the present invention is made any type ofLimitation, any one skilled in the art change or are modified to possibly also with the technology contents of the disclosure above equivalent effectiveEmbodiment, as long as without departing from the content of technical solution of the present invention, makees above example according to technical spirit of the inventionAny modification or equivalent variations and modification, in the range of still falling within technical solution of the present invention.