CN107038037A - Display mode switching method and device - Google Patents

Display mode switching method and device Download PDF

Info

Publication number
CN107038037A
CN107038037A CN201710365350.1A CN201710365350A CN107038037A CN 107038037 A CN107038037 A CN 107038037A CN 201710365350 A CN201710365350 A CN 201710365350A CN 107038037 A CN107038037 A CN 107038037A
Authority
CN
China
Prior art keywords
application program
picture
screen
user interface
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710365350.1A
Other languages
Chinese (zh)
Other versions
CN107038037B (en
Inventor
王辰汐
高承星
颜征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710365350.1A priority Critical patent/CN107038037B/en
Publication of CN107038037A publication Critical patent/CN107038037A/en
Application granted granted Critical
Publication of CN107038037B publication Critical patent/CN107038037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure discloses a kind of display mode switching method and device, belongs to field of mobile terminals.Methods described includes:Obtain the first display pattern of operating system;When the first display pattern of operating system is Night, the second display pattern of the application program shown on screen is switched to by Night by predetermined way;Wherein, predetermined way includes:The first dvielement in the user interface of application program is converted into predetermined tone, and/or, the figure layer of predetermined transparency is added on the second dvielement in the user interface of application program, predetermined tone is tone corresponding with Night.The manual adjustable extent for solving screen intensity is limited; even if minimum brightness is arrived in regulation manually; white or light areas and the dark light environment shown on screen still suffers from higher contrast; so as to the problem of damaging user's eyesight; the contrast between reduction screen exit rays and dark surrounds is reached; reducing light stimulates, and protects the effect of user's eyesight.

Description

Display mode switching method and device
Technical Field
The present disclosure relates to the field of mobile terminals, and in particular, to a display mode switching method and apparatus.
Background
When the mobile phone is used at night, because the light environment at night is dark, too high contrast can be formed between the light of the mobile phone screen and the dark light environment, so that the mobile phone screen can cause great stimulation to the eyes of a user and damage the eyesight of the user.
In order to reduce the impairment of the screen light to vision when the user is using the phone at night, some applications provide a night mode. The night mode is a display mode suitable for use in a low-light environment, compared to the normal mode, but some applications do not provide the night mode, and for these applications which do not provide the night mode, the terminal usually reduces the contrast between the screen light and the ambient light environment by turning down the screen brightness, so as to reduce the irritation of the screen to the eyes.
Because the manual adjustable range of screen brightness is limited, even if the manual adjustable range is adjusted to the minimum brightness, the screen light and the dark light environment still have high contrast, and in addition, for the white or light-colored area displayed on the screen, the emitted light still can cause great stimulation to eyes, thereby damaging the eyesight of a user.
Disclosure of Invention
In order to solve the problem that due to the fact that the manual adjustable range of the screen brightness is limited, the screen brightness is adjusted to the lowest brightness in real time manually, and high contrast still exists between a white or light-colored area displayed on the screen and a dark light environment, and accordingly eyesight of a user is damaged, the disclosure provides a display mode switching method and a display mode switching device. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a display mode switching method, the method including:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
Optionally, the set of the first type element and the second type element forms a user interface of the application program, and there is or does not exist an intersection between the first type element and the second type element.
Optionally, the predetermined manner includes: converting a first type element in a user interface of the application program into a predetermined hue;
the switching the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner includes:
converting a picture in a user interface of the application program into the predetermined tone;
and/or the presence of a gas in the gas,
and converting the characters in the user interface of the application program into a preset color, wherein the preset color is a color belonging to the preset hue.
Optionally, the converting the picture in the user interface of the application program into the predetermined color tone includes:
detecting a picture type of a picture in a user interface of the application program, wherein the picture type comprises: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
when the picture in the user interface of the application program belongs to the first picture type, converting the picture into the preset tone according to a first color matrix;
when the picture in the user interface of the application program belongs to the second picture type, converting the picture into the preset tone according to a second color matrix;
wherein the first color matrix and the second color matrix are different.
Optionally, the predetermined manner includes: adding an image layer with preset transparency on a second type element in the user interface of the application program;
the switching the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner includes:
detecting a picture type of a picture in a user interface of the application program, wherein the picture type comprises: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
when a picture in the user interface of the application program belongs to the first picture type, adding a layer with first transparency on the picture;
when the picture in the user interface of the application program belongs to the second picture type, adding a layer with a second transparency on the picture;
the first transparency is different from the second transparency, the value range of the first transparency and the second transparency is 0-1, 0 represents complete transparency, and 1 represents opacity.
Optionally, the predetermined manner further includes: and adjusting the backlight brightness of the screen to a brightness value corresponding to the night mode.
Optionally, the brightness value corresponding to the night mode is smaller than the minimum value of the manually adjustable range of the backlight brightness of the screen.
Optionally, the method further includes:
when detecting that the illumination intensity is smaller than a first threshold value, switching a first display mode of the operating system to the night mode;
or,
and when the illumination intensity is detected to be smaller than the first threshold value, displaying a prompt message on the screen, wherein the prompt message is used for prompting a user to start the night mode of the operating system.
Optionally, the method further includes:
detecting whether the application program supports a night mode in the application;
and when the application program does not support the night mode in the application, executing the step of switching the second display mode of the application program which is displayed on the screen to the night mode in a preset mode.
Optionally, the detecting whether the application program supports the intra-application night mode includes:
reading a preset identifier in a header file of the application program, wherein the value of the preset identifier is used for indicating whether the application program supports a night mode in the application;
and when the value of the preset identification is a first value, determining that the application program does not support the night mode in the application.
According to a second aspect of the embodiments of the present disclosure, there is provided a display mode switching apparatus applied in an operating system, the apparatus including:
an acquisition module configured to acquire a first display mode of the operating system;
a first switching module configured to switch a second display mode of an application program being displayed on a screen to a night mode in a predetermined manner when the first display mode of the operating system acquired by the acquisition module is the night mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
Optionally, the set of the first type element and the second type element forms a user interface of the application program, and there is or does not exist an intersection between the first type element and the second type element.
Optionally, the predetermined manner includes: converting a first type element in a user interface of the application program into a predetermined hue;
the first switching module is further configured to:
converting a picture in a user interface of the application program into the predetermined tone;
and/or the presence of a gas in the gas,
and converting the characters in the user interface of the application program into a preset color, wherein the preset color is a color belonging to the preset hue.
Optionally, the first switching module includes:
a first detection sub-module configured to detect a picture type of a picture in a user interface of the application, the picture type including: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
a first conversion sub-module configured to convert a picture in a user interface of the application program into the predetermined hue according to a first color matrix when the first detection sub-module detects that the picture belongs to the first picture type;
a second conversion sub-module configured to convert the picture in the user interface of the application program into the predetermined hue according to a second color matrix when the first detection sub-module detects that the picture belongs to the second picture type;
wherein the first color matrix and the second color matrix are different.
Optionally, the predetermined manner includes: adding an image layer with preset transparency on a second type element in the user interface of the application program;
the first switching module includes:
a second detection sub-module configured to detect a picture type of a picture in a user interface of the application, the picture type including: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
a first adding submodule configured to add a layer with a first transparency on a picture in a user interface of the application program when the second detecting submodule detects that the picture belongs to the first picture type;
a second adding submodule configured to add a layer with a second transparency to the picture when the second detecting submodule detects that the picture in the user interface of the application program belongs to the second picture type;
the first transparency is different from the second transparency, the value range of the first transparency and the second transparency is 0-1, 0 represents complete transparency, and 1 represents opacity.
Optionally, the predetermined manner further includes: and adjusting the backlight brightness of the screen to a brightness value corresponding to the night mode.
Optionally, the brightness value corresponding to the night mode is smaller than the minimum value of the manually adjustable range of the backlight brightness of the screen.
Optionally, the apparatus further comprises:
a second switching module configured to switch a first display mode of the operating system to the night mode when detecting that the illumination intensity is less than a first threshold;
or,
a display module configured to display a prompt message on the screen when detecting that the illumination intensity is less than the first threshold, the prompt message being used to prompt a user to start the night mode of the operating system.
Optionally, the apparatus further comprises:
a detection module configured to detect whether the application program supports a nighttime mode within an application;
the first switching module is configured to switch a second display mode of an application program being displayed on a screen to a night mode in a predetermined manner when the application program does not support the night mode in the application.
Optionally, the detection module includes:
the reading submodule is configured to read a predetermined identifier in a header file of the application program, and the value of the predetermined identifier is used for indicating whether the application program supports an in-application night mode;
a determining submodule configured to determine that the application program does not support a night mode in the application when the value of the predetermined identifier is the first value.
According to a third aspect of the embodiments of the present disclosure, there is provided a display mode switching apparatus, the apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode by converting a first type element in a user interface into a preset tone and/or adding a layer with preset transparency on a second type element of the user interface; because the white or light-colored area on the user interface of the application program is changed by changing the tone or adding the layer, the contrast between the light emitted by the screen and the dark light environment is reduced, and the problem that the vision of a user is damaged because the manual adjustable range of the screen brightness is limited and the white or light-colored area displayed on the screen and the dark light environment have high contrast even if the manual adjustment is carried out to the lowest brightness is solved; the effects of reducing the contrast between the screen light and the dark environment, reducing the stimulation of the light to eyes and protecting the eyesight of a user are achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a display mode switching method according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a display mode switching method according to another exemplary embodiment;
FIG. 3 is a flowchart illustrating a display mode switching method according to yet another exemplary embodiment
FIG. 4 is a schematic diagram illustrating an operating system switching an application from a normal mode to a night mode in accordance with an illustrative embodiment;
fig. 5 is a block diagram illustrating a display mode switching apparatus according to an exemplary embodiment;
fig. 6 is a block diagram illustrating a display mode switching apparatus according to another exemplary embodiment;
fig. 7 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a display mode switching method according to an exemplary embodiment, where the display mode switching method is applied to an operating system on a terminal in the present embodiment as shown in fig. 1. The display mode switching method may include the following steps.
In step 101, a first display mode of an operating system is obtained.
In step 102, when the first display mode of the operating system is the night mode, the second display mode of the application program being displayed on the screen is switched to the night mode in a predetermined manner.
Wherein, predetermined mode includes: converting the first type elements in the user interface of the application program into preset tones, and/or adding layers with preset transparency on the second type elements in the user interface of the application program, wherein the preset tones are tones corresponding to night modes.
In summary, in the display mode switching method provided in the embodiment of the present disclosure, when the first display mode of the operating system is the night mode, the second display mode of the application program being displayed on the screen is switched to the night mode by converting the first type element in the user interface into the predetermined color tone and/or adding the layer with the predetermined transparency to the second type element in the user interface; because the white or light-colored area on the user interface of the application program is changed by changing the tone or adding the layer, the contrast between the light emitted by the screen and the dark light environment is reduced, and the problem that the vision of a user is damaged because the manual adjustable range of the screen brightness is limited and the white or light-colored area displayed on the screen and the dark light environment have high contrast even if the manual adjustment is carried out to the lowest brightness is solved; the effects of reducing the contrast between the screen light and the dark environment, reducing the stimulation of the light to eyes and protecting the eyesight of a user are achieved.
Fig. 2 is a flowchart illustrating a display mode switching method according to another exemplary embodiment, and as shown in fig. 2, this embodiment illustrates the display mode switching method applied in an operating system on a terminal. The display mode switching method may include the following steps.
In step 201, when the illumination intensity is detected to be less than the first threshold value, the first display mode of the operating system is switched to the night mode.
In one possible implementation, when detecting that the illumination intensity of the surrounding environment is smaller than the first threshold, the operating system automatically switches the first display mode of the operating system to the night mode to reduce the contrast between the screen light and the environment with weak illumination intensity.
The first display mode is a system level display mode.
The night mode is a display mode suitable for a light intensity smaller than a predetermined threshold value.
In another possible implementation manner, a switch of the first display mode is provided in the operating system, and a user may manually control the switch to determine the first display mode of the operating system. The first display mode represents being active for both the operating system and each application running on top of the operating system.
Such as: the operating system provides a global night mode switch for a user, and a key of ". Sui _ night _ mode _ enabled", a code with a value of 0 or 1, is added to a program corresponding to a set resource, wherein,. Sui is the name of the operating system, a value of 1 indicates that the night mode of the operating system is started, a value of 0 indicates that the night mode of the operating system is stopped, and the default is closed. When the switch is switched, the value is also changed, and the operating system can determine the first display mode corresponding to the operating system according to the value of the night mode.
Optionally, when the operating system detects that the illumination intensity is smaller than the first threshold, a prompt message is displayed on the screen, where the prompt message is used to prompt the user to start the night mode of the operating system.
When the user sees the prompt message on the screen, the user can switch the first display mode of the operating system to the night mode by controlling the switch of the first display mode.
In step 202, a first display mode of an operating system is obtained.
The operating system may determine the current first display mode of the operating system by reading the value of the night mode.
In step 203, when the first display mode of the operating system is the night mode, whether the application program being displayed on the screen supports the night mode within the application is detected.
Optionally, the operating system detects whether the application program supports the nighttime mode in the application, and may:
in a first step, a predetermined identifier in a header file of an application program is read.
The value of the predetermined flag is used to indicate whether the application program supports the nighttime mode within the application.
And secondly, when the value of the preset identifier is the first value, determining that the application program does not support the night mode in the application.
Such as: the name of the predetermined identifier is: name ═ ui _ night _ mode ", the values are: the value "false" indicates that the application does not support the nighttime mode in the application, and the first value is false.
Optionally, if the value of the predetermined identifier is the second value, which indicates that the application program supports the night mode in the application, the application program stores the mode parameter related to the night mode, and the application program only needs to switch to the corresponding second display mode according to the mode parameter of the night mode provided by the application program according to the first display mode of the operating system. The correspondence means that the first display mode and the second display mode are both the night mode or both the normal mode.
The second display mode is an application-level display mode. The night mode is a display mode suitable for the illumination intensity being less than a first threshold value, and the normal mode is a display mode suitable for the illumination intensity being greater than a second threshold value, the first threshold value being the same as or different from the second threshold value.
In one possible implementation, if there is no predetermined identification in the header file of the application, the operating system directly determines that the application does not support the nighttime mode within the application.
In step 204, when the application program does not support the night mode in the application, the second display mode of the application program being displayed on the screen is switched to the night mode in a predetermined manner.
The second display mode is an application-level display mode.
Optionally, the predetermined manner includes: converting the first type elements in the user interface of the application program into preset tones, and/or adding layers with preset transparency on the second type elements in the user interface of the application program. Wherein the predetermined color tone is a color tone corresponding to the night mode.
The collection of the first type elements and the second type elements form a user interface of the application program, and intersection exists or does not exist between the first type elements and the second type elements.
When the user interface of the application program only has the first type elements and does not have the second type elements, the first type elements form the user interface of the application program; when the user interface of the application program only has the second type elements and does not have the first type elements, the second type elements form the user interface of the application program.
Elements on the user interface include pictures, text, buttons, controls, backgrounds, and the like.
The first type element and the second type element may have an intersection, or the first type element and the second type element are the same, or the first type element is on the user interface, or the second type element is on the user interface.
Referring to fig. 3 in combination, if the predetermined manner includes: converting a first type element in the user interface of the application to a predetermined hue, step 204 may be replaced with steps 204a to 204 b.
In step 204a, when the application does not support the nighttime mode within the application, the picture in the user interface of the application is converted to a predetermined hue.
Hue refers to at least one color contained in the user interface of an application, such as: the background of the user interface is black, the button controls in the user interface are dark gray, and the text in the user interface is light gray. For different elements in the user interface, the application switches to the corresponding color according to the mode parameters of the night mode.
Referring to fig. 4 in combination, a user interface of the reading application is displayed on the screen 10, the user interface includes a title area 11 and a text area 12, when the second display mode of the reading application is the normal mode, the background color of the title area 11 is gray white, the background color of the text area 12 is white, and the text color is black, when the second display mode of the reading application is switched from the normal mode to the night mode, the background color of the title area 21 is changed into dark gray, the background color of the text area 22 is light gray, and the text color is gray.
Optionally, converting the picture in the user interface of the application program into a predetermined color tone may be implemented by the following steps:
in a first step, a picture type of a picture in a user interface of an application is detected.
The picture types include: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of a screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen.
And secondly, when the picture in the user interface of the application program belongs to the first picture type, converting the picture into a preset tone according to the first color matrix.
And thirdly, when the picture in the user interface of the application program belongs to a second picture type, converting the picture into a preset tone according to the second color matrix.
Wherein the second step and the third step are juxtaposed steps, and the first color matrix in the second step is different from the second color matrix in the third step.
Since the operating system cannot distinguish the role of each picture in the user interface when actually implemented, it is identified according to the size of the picture. Such as: and if the height multiplied by the width of the picture is equal to the size of the screen, determining the picture as the background.
The converted colors are different for different sizes of pictures in the user interface, and each picture converted color belongs to a predetermined hue. The color matrix is a 5 × 4 matrix, for example, the color matrix M is stored in a one-dimensional array [ a, b, c, d, e, f, g, h, I, j, k, l, M, n, o, p, q, r, s, t ], and is expressed as:
in the picture, the RGBA (red, green, blue, transparency) values determine the color effect presented by the picture, and the color effect of the picture can be changed according to the color matrix by multiplying the color matrix by the RGBA values of the picture.
In the color matrix, a first row parameter abcde determines a red component of a picture, a second row parameter fghij determines a green component of the picture, a third row parameter klmno determines a blue component of the picture, a fourth row parameter pqrst determines the transparency of the picture, and in addition, e in a fifth row parameter determines an offset of red, j determines an offset of green, o determines an offset of blue, and t determines an offset of transparency.
If the color of the picture is not changed, the color matrix is:
changing the color can be achieved directly by modifying the color offset of the fifth column, such as: let e be 100, the red component of the picture can be increased by 100.
In addition, the purpose of changing color components can be achieved by directly multiplying a certain color value by a certain coefficient. For example, if the color matrix is:
the green component is magnified by a factor of 2 and the picture appears green in effect.
In step 204b, when the application program does not support the night mode in the application, the text in the user interface of the application program is converted into a predetermined color, and the predetermined color is a color belonging to a predetermined hue.
And determining a color matrix of the color to be converted of the characters by adopting the same method for the characters in the user interface, and multiplying the color matrix and the characters to obtain the converted characters color.
Optionally, in actual implementation, the parameters of the color matrix can be changed by controlling the operating system through the cloud end, so that the effect of converting different elements into different colors is achieved.
Both of the steps 204a and 204b may be executed, or only one of the steps may be executed.
Referring to fig. 3 in combination, if the predetermined manner includes: step 204 may be replaced with steps 204c to 204e by adding layers of a predetermined transparency on the second type element in the user interface of the application.
In step 204c, when the application does not support the night mode within the application, a picture type of a picture in a user interface of the application is detected.
The picture types include: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of a screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen.
In step 204d, when the picture in the user interface of the application program belongs to the first picture type, a layer with a first transparency is added on the picture.
In step 204e, when the picture in the user interface of the application program belongs to the second picture type, adding a layer with a second transparency on the picture.
Step 204d and step 204e are parallel steps.
The first transparency is different from the second transparency, and the value range of the first transparency and the second transparency is 0 to 1, wherein 0 represents complete transparency, and 1 represents opacity.
For pictures in the user interface, layers with different transparencies are added according to different sizes of different pictures, namely, the processing degrees of the layers of the pictures with different sizes are different.
Optionally, when the night mode is implemented, the added layer is usually a black layer.
In practical applications, steps 204a to 204b and steps 204c to 204e are parallel schemes. When the night mode is implemented, only step 204a to step 204b may be executed, or only step 204c to step 204e may be executed.
Alternatively, the schemes in steps 204a to 204b and steps 204c to 204e may be implemented in a mixture. The night mode can be implemented in different ways for different elements in the user interface of the application program. Such as: in the communication application program, the background picture of the user interface is converted into a preset tone, and the picture layer is added on the picture in the message sent between users. Since the pictures in the messages sent between the users need to be read by the users, if the colors are converted, the pictures lose readability, the contrast between the pictures and a dark light environment is reduced by increasing the image layers, and the readability of the pictures is kept.
Optionally, the predetermined manner further includes: the backlight brightness of the screen is adjusted to a brightness value corresponding to the night mode.
Optionally, the brightness value corresponding to the night mode is smaller than the minimum value of the manually adjustable range of the backlight brightness of the screen.
Since the manual adjustable range of the backlight brightness of the screen is limited, even if the brightness value is adjusted to the minimum value of the manual adjustable range, the contrast between the light of the screen and the dark environment light is still large, so the operating system can adjust the brightness value below the minimum value of the manual adjustable range to reduce the backlight brightness of the screen. Such as: the brightness value is adjusted to 10% below the minimum value of the manually adjustable range.
Optionally, when the first display mode of the operating system is switched to the normal mode, the operating system also switches the second display mode of the application program being displayed on the screen to the normal mode.
The process of switching the second display mode to the normal mode corresponds to the process of switching the second display mode to the night mode, and is a reciprocal process. Such as: when the second display mode is switched to the night mode, the color is converted into the original color in a color conversion mode when the second display mode is switched to the normal mode; when the second display mode is switched to the night mode, the image layer is removed when the second display mode is switched to the normal mode by the mode of adding the image layer; when the second display mode is switched to the night mode, the brightness value is restored by reducing the brightness value when the second display mode is switched to the normal mode.
In summary, in the display mode switching method provided in the embodiment of the present disclosure, when the first display mode of the operating system is the night mode, the second display mode of the application program being displayed on the screen is switched to the night mode by converting the first type element in the user interface into the predetermined color tone and/or adding the layer with the predetermined transparency to the second type element in the user interface; because the white or light-colored area on the user interface of the application program is changed by changing the tone or adding the layer, the contrast between the light emitted by the screen and the dark light environment is reduced, and the problem that the vision of a user is damaged because the manual adjustable range of the screen brightness is limited and the white or light-colored area displayed on the screen and the dark light environment have high contrast even if the manual adjustment is carried out to the lowest brightness is solved; the effects of reducing the contrast between the screen light and the dark environment, reducing the stimulation of the light to eyes and protecting the eyesight of a user are achieved.
Aiming at step 201, when detecting that the illumination intensity is smaller than a first threshold value, the operating system switches the first display mode to the night mode, so that the operating system switches when the terminal is in a darker light environment, the contrast between the light of the screen and the dark light environment is reduced, the stimulation to the eyes of the user is reduced, and the eyesight of the user is protected.
In step 203 to step 204, when it is detected that the application does not support the night mode in the application, the application being displayed on the screen is processed in a predetermined manner, so that the application not supporting the night mode in the application can also exhibit the effect of the night mode, thereby reducing the contrast between the screen light and the dark light environment, reducing the stimulation to the eyes of the user, and protecting the eyesight of the user.
For steps 204a to 204b, the user interface is converted into a predetermined color tone, so that the original white or light color area on the user interface can be converted into a color tone corresponding to the night mode, thereby reducing the contrast between the screen light and the dark light environment, reducing the stimulation to the eyes of the user, and protecting the eyesight of the user.
For steps 204c to 204e, adding an image layer with a predetermined transparency to the second type element on the user interface of the application program, so that the readability of the picture in the user interface is not affected while the contrast between the screen light and the dark light environment is reduced.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 5 is a block diagram illustrating a display mode switching apparatus according to an exemplary embodiment, and the present embodiment is illustrated in the case where the display mode switching apparatus is applied to an operating system on a terminal, as shown in fig. 5. The display mode switching device includes but is not limited to: an acquisition module 310 and a first switching module 320.
The obtaining module 310 is configured to obtain a first display mode of the operating system.
The first switching module 320 is configured to switch the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner when the first display mode of the operating system acquired by the acquisition module 310 is the night mode.
Wherein, predetermined mode includes: converting the first type elements in the user interface of the application program into preset tones, and/or adding layers with preset transparency on the second type elements in the user interface of the application program, wherein the preset tones are tones corresponding to night modes.
To sum up, the display mode switching apparatus provided in the embodiment of the present disclosure switches, when the first display mode of the operating system is the night mode, the second display mode of the application program being displayed on the screen to the night mode by converting the first type element in the user interface into the predetermined color tone and/or adding the layer with the predetermined transparency on the second type element of the user interface; because the white or light-colored area on the user interface of the application program is changed by changing the tone or adding the layer, the contrast between the light emitted by the screen and the dark light environment is reduced, and the problem that the vision of a user is damaged because the manual adjustable range of the screen brightness is limited and the white or light-colored area displayed on the screen and the dark light environment have high contrast even if the manual adjustment is carried out to the lowest brightness is solved; the effects of reducing the contrast between the screen light and the dark environment, reducing the stimulation of the light to eyes and protecting the eyesight of a user are achieved.
Fig. 6 is a block diagram illustrating a display mode switching apparatus according to another exemplary embodiment, which is illustrated in fig. 6 as being applied to an operating system on a terminal. The display mode switching device includes but is not limited to: an acquisition module 410 and a first switching module 420.
An obtaining module 410 configured to obtain a first display mode of an operating system.
The first switching module 420 is configured to switch the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner when the first display mode of the operating system acquired by the acquisition module 410 is the night mode.
Wherein, predetermined mode includes: converting the first type elements in the user interface of the application program into preset tones, and/or adding layers with preset transparency on the second type elements in the user interface of the application program, wherein the preset tones are tones corresponding to night modes.
Optionally, the set of the first type element and the second type element forms a user interface of the application program, and there is or does not exist an intersection between the first type element and the second type element.
Optionally, the predetermined manner includes: converting a first type element in a user interface of an application to a predetermined hue, the first switching module 420 further configured to: converting a picture in a user interface of an application program into a preset tone; and/or converting the characters in the user interface of the application program into a preset color, wherein the preset color is a color belonging to a preset tone.
Optionally, the first switching module 420 includes: a first detection submodule 421, a first conversion submodule 422 and a second conversion submodule 423.
A first detecting submodule 421 configured to detect a picture type of a picture in a user interface of an application, where the picture type includes: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of a screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen.
A first converting submodule 422 configured to, when the first detecting submodule 421 detects that the picture in the user interface of the application program belongs to the first picture type, convert the picture into a predetermined tone according to the first color matrix.
A second converting submodule 423 configured to, when the first detecting submodule 421 detects that the picture in the user interface of the application program belongs to the second picture type, convert the picture into the predetermined tone according to the second color matrix.
Wherein the first color matrix and the second color matrix are different.
Optionally, the predetermined manner includes: adding an image layer with preset transparency on a second type element in the user interface of the application program, wherein the first switching module 420 comprises: a second detection submodule 424, a first augmentation submodule 425, and a second augmentation submodule 426.
A second detection submodule 424, configured to detect a picture type of a picture in a user interface of an application, where the picture type includes: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of a screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen.
A first adding submodule 425 configured to add an image layer of a first transparency on the picture when the second detecting submodule 424 detects that the picture in the user interface of the application program belongs to the first picture type.
A second adding submodule 426, configured to add an image layer with a second transparency on the picture when the second detecting submodule 424 detects that the picture in the user interface of the application program belongs to the second picture type.
The first transparency and the second transparency are different, the value range of the first transparency and the second transparency is 0-1, 0 represents complete transparency, and 1 represents opacity.
Optionally, the predetermined manner further includes: the backlight brightness of the screen is adjusted to a brightness value corresponding to the night mode.
Optionally, the brightness value corresponding to the night mode is smaller than the minimum value of the manually adjustable range of the backlight brightness of the screen.
Optionally, the display mode switching apparatus further includes: a second switching module 430 and a display module 440.
A second switching module 430 configured to switch the first display mode of the operating system to the night mode when detecting that the illumination intensity is less than the first threshold.
The display module 440 is configured to display a prompt message on the screen when the light intensity is detected to be less than the first threshold, wherein the prompt message is used for prompting the user to start the night mode of the operating system.
Optionally, the display module switching device further includes: a detection module 450.
A detection module 450 configured to detect whether the application supports a nighttime mode within the application.
A first switching module 420 configured to switch the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner when the application program does not support the night mode within the application.
Optionally, the detecting module 450 includes: a reading sub-module 451 and a determination sub-module 452.
The reading sub-module 451 is configured to read a predetermined flag in a header file of the application program, where a value of the predetermined flag is used to indicate whether the application program supports the nighttime mode in the application.
The determining submodule 452 is configured to determine that the application program does not support the night mode in the application when the value of the predetermined identifier is the first value.
To sum up, the display mode switching apparatus provided in the embodiment of the present disclosure switches, when the first display mode of the operating system is the night mode, the second display mode of the application program being displayed on the screen to the night mode by converting the first type element in the user interface into the predetermined color tone and/or adding the layer with the predetermined transparency on the second type element of the user interface; because the white or light-colored area on the user interface of the application program is changed by changing the tone or adding the layer, the contrast between the light emitted by the screen and the dark light environment is reduced, and the problem that the vision of a user is damaged because the manual adjustable range of the screen brightness is limited and the white or light-colored area displayed on the screen and the dark light environment have high contrast even if the manual adjustment is carried out to the lowest brightness is solved; the effects of reducing the contrast between the screen light and the dark environment, reducing the stimulation of the light to eyes and protecting the eyesight of a user are achieved.
Operating system switches into night mode with first display mode when detecting that illumination intensity is less than first threshold value for operating system just switches under the terminal is in darker light environment, reduces the contrast between the light of screen and the light environment of dark, reduces the stimulation to user's eyes, has protected user's eyesight.
When the fact that the application program does not support the night mode in the application is detected, the application program which is displayed on the screen is processed in a preset mode, the application program which does not support the night mode in the application can also show the effect of the night mode, therefore, contrast between screen light and a dark light environment is reduced, stimulation to eyes of a user is reduced, and the eyesight of the user is protected.
Through converting user interface into predetermined tone for the white or light color area originally on the user interface can convert the tone that corresponds with the night mode into, thereby reduces the contrast between screen light and the light environment of dark, reduces the stimulation to user's eyes, protects user's eyesight.
By adding the layer with the preset transparency to the second type of elements on the user interface of the application program, the readability of the picture in the user interface is not influenced while the contrast between the screen light and the dark light environment is reduced.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides a display mode switching apparatus, which can implement a display mode switching method provided by the present disclosure, and the display mode switching apparatus includes: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring a first display mode of an operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of the application program which is being displayed on the screen into the night mode in a preset mode;
wherein, predetermined mode includes: converting the first type elements in the user interface of the application program into preset tones, and/or adding layers with preset transparency on the second type elements in the user interface of the application program, wherein the preset tones are tones corresponding to night modes.
Fig. 7 is a block diagram illustrating a terminal according to an example embodiment. For example, the terminal 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, terminal 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the terminal 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 518 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the terminal 500. Examples of such data include instructions for any application or method operating on terminal 500, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 504 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as a Static Random Access Memory (SRAM), an electrically erasable Programmable Read-Only Memory (EEPROM), an erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk or an optical disk.
The power components 506 provide power to the various components of the terminal 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal 500.
The multimedia component 508 includes a screen providing an output interface between the terminal 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 500 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the terminal 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the terminal 500. For example, sensor assembly 514 can detect an open/closed state of terminal 500, relative positioning of components, such as a display and keypad of terminal 500, position changes of terminal 500 or a component of terminal 500, presence or absence of user contact with terminal 500, orientation or acceleration/deceleration of terminal 500, and temperature changes of terminal 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communications between the terminal 500 and other devices in a wired or wireless manner. The terminal 500 may access a WIreless network based on a communication standard, such as WIreless-Fidelity (Wi-Fi), 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the above display mode switching method.
In an exemplary embodiment, a computer-readable storage medium, such as the memory 504, is also provided, which comprises instructions executable by the processor 518 of the terminal 500 to implement the steps of the display mode switching method in the method embodiments shown in fig. 1, 2 and 3. For example, the non-transitory computer readable storage medium may be a ROM, a Random-Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (22)

1. A display mode switching method is applied to an operating system, and comprises the following steps:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
2. The method of claim 1, wherein the collection of the first type elements and the second type elements constitutes a user interface of the application, and wherein there is or is not an intersection between the first type elements and the second type elements.
3. The method of claim 1, wherein the predetermined manner comprises: converting a first type element in a user interface of the application program into a predetermined hue;
the switching the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner includes:
converting a picture in a user interface of the application program into the predetermined tone;
and/or the presence of a gas in the gas,
and converting the characters in the user interface of the application program into a preset color, wherein the preset color is a color belonging to the preset hue.
4. The method of claim 3, wherein converting the picture in the user interface of the application program to the predetermined hue comprises:
detecting a picture type of a picture in a user interface of the application program, wherein the picture type comprises: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
when the picture in the user interface of the application program belongs to the first picture type, converting the picture into the preset tone according to a first color matrix;
when the picture in the user interface of the application program belongs to the second picture type, converting the picture into the preset tone according to a second color matrix;
wherein the first color matrix and the second color matrix are different.
5. The method of claim 1, wherein the predetermined manner comprises: adding an image layer with preset transparency on a second type element in the user interface of the application program;
the switching the second display mode of the application program being displayed on the screen to the night mode in a predetermined manner includes:
detecting a picture type of a picture in a user interface of the application program, wherein the picture type comprises: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
when a picture in the user interface of the application program belongs to the first picture type, adding a layer with first transparency on the picture;
when the picture in the user interface of the application program belongs to the second picture type, adding a layer with a second transparency on the picture;
the first transparency is different from the second transparency, the value range of the first transparency and the second transparency is 0-1, 0 represents complete transparency, and 1 represents opacity.
6. The method of claim 1, wherein the predetermined manner further comprises: and adjusting the backlight brightness of the screen to a brightness value corresponding to the night mode.
7. The method of claim 6, wherein the brightness value corresponding to the night mode is less than a minimum value of a manually adjustable range of backlight brightness of the screen.
8. The method of any of claims 1 to 7, further comprising:
when detecting that the illumination intensity is smaller than a first threshold value, switching a first display mode of the operating system to the night mode;
or,
and when the illumination intensity is detected to be smaller than the first threshold value, displaying a prompt message on the screen, wherein the prompt message is used for prompting a user to start the night mode of the operating system.
9. The method of any of claims 1 to 7, further comprising:
detecting whether the application program supports a night mode in the application;
and when the application program does not support the night mode in the application, executing the step of switching the second display mode of the application program which is displayed on the screen to the night mode in a preset mode.
10. The method of claim 9, wherein detecting whether the application supports nighttime mode within an application comprises:
reading a preset identifier in a header file of the application program, wherein the value of the preset identifier is used for indicating whether the application program supports a night mode in the application;
and when the value of the preset identification is a first value, determining that the application program does not support the night mode in the application.
11. A display mode switching device applied to an operating system, the device comprising:
an acquisition module configured to acquire a first display mode of the operating system;
a first switching module configured to switch a second display mode of an application program being displayed on a screen to a night mode in a predetermined manner when the first display mode of the operating system acquired by the acquisition module is the night mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
12. The apparatus of claim 11, wherein a collection of the first type elements and the second type elements constitutes a user interface of the application, and wherein there is or is not an intersection between the first type elements and the second type elements.
13. The apparatus of claim 11, wherein the predetermined manner comprises: converting a first type element in a user interface of the application program into a predetermined hue;
the first switching module is further configured to:
converting a picture in a user interface of the application program into the predetermined tone;
and/or the presence of a gas in the gas,
and converting the characters in the user interface of the application program into a preset color, wherein the preset color is a color belonging to the preset hue.
14. The apparatus of claim 13, wherein the first switching module comprises:
a first detection sub-module configured to detect a picture type of a picture in a user interface of the application, the picture type including: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
a first conversion sub-module configured to convert a picture in a user interface of the application program into the predetermined hue according to a first color matrix when the first detection sub-module detects that the picture belongs to the first picture type;
a second conversion sub-module configured to convert the picture in the user interface of the application program into the predetermined hue according to a second color matrix when the first detection sub-module detects that the picture belongs to the second picture type;
wherein the first color matrix and the second color matrix are different.
15. The apparatus of claim 11, wherein the predetermined manner comprises: adding an image layer with preset transparency on a second type element in the user interface of the application program;
the first switching module includes:
a second detection sub-module configured to detect a picture type of a picture in a user interface of the application, the picture type including: the image processing device comprises a first picture type and a second picture type, wherein the height of the first picture type is equal to the pixel height of the screen or the width of the first picture type is equal to the pixel width of the screen, the height of the second picture type is smaller than the pixel height of the screen, and the width of the second picture type is smaller than the pixel width of the screen;
a first adding submodule configured to add a layer with a first transparency on a picture in a user interface of the application program when the second detecting submodule detects that the picture belongs to the first picture type;
a second adding submodule configured to add a layer with a second transparency to the picture when the second detecting submodule detects that the picture in the user interface of the application program belongs to the second picture type;
the first transparency is different from the second transparency, the value range of the first transparency and the second transparency is 0-1, 0 represents complete transparency, and 1 represents opacity.
16. The apparatus of claim 11, wherein the predetermined manner further comprises: and adjusting the backlight brightness of the screen to a brightness value corresponding to the night mode.
17. The apparatus of claim 16, wherein the brightness value corresponding to the night mode is less than a minimum of a manually adjustable range of backlight brightness for the screen.
18. The apparatus of any one of claims 11 to 17, further comprising:
a second switching module configured to switch a first display mode of the operating system to the night mode when detecting that the illumination intensity is less than a first threshold;
or,
a display module configured to display a prompt message on the screen when detecting that the illumination intensity is less than the first threshold, the prompt message being used to prompt a user to start the night mode of the operating system.
19. The apparatus of any one of claims 11 to 17, further comprising:
a detection module configured to detect whether the application program supports a nighttime mode within an application;
the first switching module is configured to switch a second display mode of an application program being displayed on a screen to a night mode in a predetermined manner when the application program does not support the night mode in the application.
20. The apparatus of claim 19, wherein the detection module comprises:
the reading submodule is configured to read a predetermined identifier in a header file of the application program, and the value of the predetermined identifier is used for indicating whether the application program supports an in-application night mode;
a determining submodule configured to determine that the application program does not support a night mode in the application when the value of the predetermined identifier is the first value.
21. A display mode switching apparatus, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
22. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of:
acquiring a first display mode of the operating system;
when the first display mode of the operating system is a night mode, switching a second display mode of an application program which is being displayed on a screen into the night mode in a preset mode;
wherein the predetermined manner comprises: converting the first type element in the user interface of the application program into a preset tone, and/or adding a layer with a preset transparency on the second type element in the user interface of the application program, wherein the preset tone is a tone corresponding to the night mode.
CN201710365350.1A 2017-05-22 2017-05-22 Display mode switching method and device Active CN107038037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710365350.1A CN107038037B (en) 2017-05-22 2017-05-22 Display mode switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710365350.1A CN107038037B (en) 2017-05-22 2017-05-22 Display mode switching method and device

Publications (2)

Publication Number Publication Date
CN107038037A true CN107038037A (en) 2017-08-11
CN107038037B CN107038037B (en) 2021-03-02

Family

ID=59539247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710365350.1A Active CN107038037B (en) 2017-05-22 2017-05-22 Display mode switching method and device

Country Status (1)

Country Link
CN (1) CN107038037B (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861675A (en) * 2017-09-21 2018-03-30 海南智媒云图科技股份有限公司 A kind of method and device of intelligence switching Night
CN108469976A (en) * 2018-03-13 2018-08-31 北京车和家信息技术有限公司 Mode switching method, mode-changeover device, mobile unit and vehicle
CN108924338A (en) * 2018-05-24 2018-11-30 珠海市魅族科技有限公司 Method for controlling mobile terminal, mobile terminal and storage medium
CN109614186A (en) * 2018-11-29 2019-04-12 深圳市酷达通讯有限公司 Application program color switching method, system and terminal device
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium
CN110618852A (en) * 2019-09-24 2019-12-27 Oppo广东移动通信有限公司 View processing method, view processing device and terminal equipment
CN110673906A (en) * 2019-08-19 2020-01-10 中至数据集团股份有限公司 Mode switching method and device, readable storage medium and mobile terminal
WO2020042735A1 (en) * 2018-08-29 2020-03-05 中兴通讯股份有限公司 Screen display control method and apparatus, device, and readable storage medium
CN110992869A (en) * 2019-12-24 2020-04-10 Oppo广东移动通信有限公司 Layer display method and related equipment
CN111223432A (en) * 2020-01-10 2020-06-02 北京小米移动软件有限公司 Method and device for controlling screen display
CN111475238A (en) * 2020-03-13 2020-07-31 五八有限公司 Page processing method and device, electronic equipment and storage medium
CN112486603A (en) * 2019-09-12 2021-03-12 北京搜狗科技发展有限公司 Interface adaptation method and device for adapting interface
CN112837661A (en) * 2021-01-29 2021-05-25 北京小米移动软件有限公司 Screen brightness adjusting method, screen brightness adjusting device and storage medium
CN113299250A (en) * 2021-05-14 2021-08-24 漳州万利达科技有限公司 Image display method and device and display equipment
CN113553127A (en) * 2020-04-23 2021-10-26 深圳市万普拉斯科技有限公司 Reading content processing method and device, computer equipment and storage medium
CN113556424A (en) * 2021-07-22 2021-10-26 山东浪潮通软信息科技有限公司 Mobile terminal skin switching method, design method and computer storage medium
CN113760419A (en) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 Method, apparatus, device and computer readable medium for displaying image
CN114077463A (en) * 2020-07-30 2022-02-22 北京搜狗科技发展有限公司 Input method interface display method and device and electronic equipment
CN114095603A (en) * 2021-11-11 2022-02-25 努比亚技术有限公司 Screen display characteristic regulation and control method and device and computer readable storage medium
CN114115657A (en) * 2021-11-23 2022-03-01 北京百度网讯科技有限公司 Display mode switching method, device, equipment and medium of cloud mobile phone
CN114138394A (en) * 2021-12-06 2022-03-04 北京得间科技有限公司 Night display mode processing method, electronic device and computer storage medium
CN114500735A (en) * 2022-04-15 2022-05-13 北京车智赢科技有限公司 Display processing method, computing device and readable storage medium
CN115484345A (en) * 2021-05-31 2022-12-16 华为技术有限公司 Display mode switching method and device, electronic equipment and medium
CN116737292A (en) * 2022-10-29 2023-09-12 荣耀终端有限公司 Display mode switching method, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622214A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method and device for realizing multiple-display mode universal icons
CN104252362A (en) * 2014-09-26 2014-12-31 可牛网络技术(北京)有限公司 Web page showing method and web page showing device
CN105528389A (en) * 2015-11-09 2016-04-27 上海二三四五网络科技有限公司 A logic control method and device based on mobile phone browser core
CN106469439A (en) * 2016-08-30 2017-03-01 乐视控股(北京)有限公司 The processing method and processing device of picture in a kind of Night
CN106484396A (en) * 2016-09-18 2017-03-08 北京京东尚科信息技术有限公司 Night changing method, device and terminal unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622214A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method and device for realizing multiple-display mode universal icons
CN104252362A (en) * 2014-09-26 2014-12-31 可牛网络技术(北京)有限公司 Web page showing method and web page showing device
CN105528389A (en) * 2015-11-09 2016-04-27 上海二三四五网络科技有限公司 A logic control method and device based on mobile phone browser core
CN106469439A (en) * 2016-08-30 2017-03-01 乐视控股(北京)有限公司 The processing method and processing device of picture in a kind of Night
CN106484396A (en) * 2016-09-18 2017-03-08 北京京东尚科信息技术有限公司 Night changing method, device and terminal unit

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861675A (en) * 2017-09-21 2018-03-30 海南智媒云图科技股份有限公司 A kind of method and device of intelligence switching Night
CN108469976A (en) * 2018-03-13 2018-08-31 北京车和家信息技术有限公司 Mode switching method, mode-changeover device, mobile unit and vehicle
CN108924338A (en) * 2018-05-24 2018-11-30 珠海市魅族科技有限公司 Method for controlling mobile terminal, mobile terminal and storage medium
WO2020042735A1 (en) * 2018-08-29 2020-03-05 中兴通讯股份有限公司 Screen display control method and apparatus, device, and readable storage medium
CN109614186A (en) * 2018-11-29 2019-04-12 深圳市酷达通讯有限公司 Application program color switching method, system and terminal device
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium
US12014663B2 (en) 2019-08-09 2024-06-18 Huawei Technologies Co., Ltd. Dark mode display interface processing method, electronic device, and storage medium
WO2021027649A1 (en) * 2019-08-09 2021-02-18 华为技术有限公司 Dark-mode display interface processing method, electronic device, and storage medium
CN110673906A (en) * 2019-08-19 2020-01-10 中至数据集团股份有限公司 Mode switching method and device, readable storage medium and mobile terminal
CN112486603A (en) * 2019-09-12 2021-03-12 北京搜狗科技发展有限公司 Interface adaptation method and device for adapting interface
CN110618852A (en) * 2019-09-24 2019-12-27 Oppo广东移动通信有限公司 View processing method, view processing device and terminal equipment
CN110618852B (en) * 2019-09-24 2023-12-29 Oppo广东移动通信有限公司 View processing method, view processing device and terminal equipment
CN110992869A (en) * 2019-12-24 2020-04-10 Oppo广东移动通信有限公司 Layer display method and related equipment
CN110992869B (en) * 2019-12-24 2022-11-22 Oppo广东移动通信有限公司 Layer display method and related equipment
CN111223432A (en) * 2020-01-10 2020-06-02 北京小米移动软件有限公司 Method and device for controlling screen display
CN111223432B (en) * 2020-01-10 2024-02-13 北京小米移动软件有限公司 Method and device for controlling screen display
CN111475238A (en) * 2020-03-13 2020-07-31 五八有限公司 Page processing method and device, electronic equipment and storage medium
CN111475238B (en) * 2020-03-13 2023-12-05 五八有限公司 Page processing method and device, electronic equipment and storage medium
WO2021213222A1 (en) * 2020-04-23 2021-10-28 深圳市万普拉斯科技有限公司 Method and apparatus for processing reading content, computer device and storage medium
CN113553127A (en) * 2020-04-23 2021-10-26 深圳市万普拉斯科技有限公司 Reading content processing method and device, computer equipment and storage medium
CN114077463A (en) * 2020-07-30 2022-02-22 北京搜狗科技发展有限公司 Input method interface display method and device and electronic equipment
CN113760419A (en) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 Method, apparatus, device and computer readable medium for displaying image
CN112837661A (en) * 2021-01-29 2021-05-25 北京小米移动软件有限公司 Screen brightness adjusting method, screen brightness adjusting device and storage medium
CN113299250B (en) * 2021-05-14 2022-05-27 漳州万利达科技有限公司 Image display method and device and display equipment
CN113299250A (en) * 2021-05-14 2021-08-24 漳州万利达科技有限公司 Image display method and device and display equipment
CN115484345A (en) * 2021-05-31 2022-12-16 华为技术有限公司 Display mode switching method and device, electronic equipment and medium
CN113556424A (en) * 2021-07-22 2021-10-26 山东浪潮通软信息科技有限公司 Mobile terminal skin switching method, design method and computer storage medium
CN114095603A (en) * 2021-11-11 2022-02-25 努比亚技术有限公司 Screen display characteristic regulation and control method and device and computer readable storage medium
CN114095603B (en) * 2021-11-11 2024-04-23 努比亚技术有限公司 Screen display characteristic regulation and control method, equipment and computer readable storage medium
CN114115657A (en) * 2021-11-23 2022-03-01 北京百度网讯科技有限公司 Display mode switching method, device, equipment and medium of cloud mobile phone
CN114115657B (en) * 2021-11-23 2024-04-02 北京百度网讯科技有限公司 Display mode switching method, device, equipment and medium of cloud mobile phone
CN114138394A (en) * 2021-12-06 2022-03-04 北京得间科技有限公司 Night display mode processing method, electronic device and computer storage medium
CN114500735A (en) * 2022-04-15 2022-05-13 北京车智赢科技有限公司 Display processing method, computing device and readable storage medium
CN116737292A (en) * 2022-10-29 2023-09-12 荣耀终端有限公司 Display mode switching method, electronic equipment and readable storage medium
CN116737292B (en) * 2022-10-29 2024-05-24 荣耀终端有限公司 Display mode switching method, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN107038037B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN107038037B (en) Display mode switching method and device
CN107992182B (en) Method and device for displaying interface image
CN106131441B (en) Photographing method and device and electronic equipment
CN108492767A (en) Prevent the method, apparatus and storage medium of display burn-in
CN111223432B (en) Method and device for controlling screen display
CN106953991A (en) Display mode switching method and device
CN111290723A (en) Display background adjusting method, device, terminal and storage medium
US10951816B2 (en) Method and apparatus for processing image, electronic device and storage medium
CN112116670A (en) Information processing method and device, electronic device and storage medium
CN112331158B (en) Terminal display adjusting method, device, equipment and storage medium
CN112905141B (en) Screen display method and device and computer storage medium
US10319342B2 (en) Method and device for adjusting display brightness
CN111835941B (en) Image generation method and device, electronic equipment and computer readable storage medium
CN109005360B (en) Light supplementing method and device for shooting environment and computer readable storage medium
US11617023B2 (en) Method for brightness enhancement of preview image, apparatus, and medium
CN116453459A (en) Screen display method and device, readable storage medium and electronic equipment
CN110874829B (en) Image processing method and device, electronic device and storage medium
CN111835977B (en) Image sensor, image generation method and device, electronic device, and storage medium
CN112087539A (en) Screen light adjusting method for terminal equipment and terminal equipment
CN110876015B (en) Method and device for determining image resolution, electronic equipment and storage medium
CN110876013B (en) Method and device for determining image resolution, electronic equipment and storage medium
EP4068271A1 (en) Method and apparatus for processing brightness of display screen
CN117354413A (en) Display control method, display control device, electronic equipment and readable storage medium
CN117369615A (en) Electronic equipment control method and device, storage medium and electronic equipment
CN118259854A (en) Display screen control method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant