CN111930461A - Android-based mobile terminal APP full page graying method and device - Google Patents

Android-based mobile terminal APP full page graying method and device Download PDF

Info

Publication number
CN111930461A
CN111930461A CN202010811648.2A CN202010811648A CN111930461A CN 111930461 A CN111930461 A CN 111930461A CN 202010811648 A CN202010811648 A CN 202010811648A CN 111930461 A CN111930461 A CN 111930461A
Authority
CN
China
Prior art keywords
page
graying
android
mobile terminal
pages
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
CN202010811648.2A
Other languages
Chinese (zh)
Other versions
CN111930461B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010811648.2A priority Critical patent/CN111930461B/en
Publication of CN111930461A publication Critical patent/CN111930461A/en
Application granted granted Critical
Publication of CN111930461B publication Critical patent/CN111930461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention provides a mobile terminal APP full page graying method and device based on Android, and the method comprises the following steps: acquiring graying switch parameters from an application database or a configuration file; judging whether the graying switch parameter meets a preset condition or not; if yes, classifying the mobile terminal APP full page, graying various pages respectively, classifying the pages by setting graying switch parameters, and graying various pages respectively, so that the full graying of the pages is realized, the system performance is not affected, and mistakes are prevented during graying of the system.

Description

Android-based mobile terminal APP full page graying method and device
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a mobile terminal APP full page graying method and device based on Android.
Background
In some special days, the lost people are burdened by the APP of all large websites and mobile terminals in the country in a network mode, and the APP gray display effect needs to be realized. At present, most of APP realization modes are relatively original, a unified and efficient realization method is not available, for example, most of APPs such as Taobao and Jingdong adopt home page gray scale and picture gray scale to realize gray scale, most of bank APPs adopt business personnel to manually maintain and replace home page pictures to realize gray scale for gray scale pictures, and the problems of large maintenance workload, incapability of supporting full replacement of all function pages of the APPs and the like exist.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides an Android-based mobile terminal APP full page graying method and device, electronic equipment and a computer-readable storage medium, which can at least partially solve the problems in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, a method for graying a full page of an APP of a mobile terminal based on Android is provided, which includes:
acquiring graying switch parameters from an application database or a configuration file;
judging whether the graying switch parameter meets a preset condition or not;
if yes, classifying the full number of pages of the mobile terminal APP, and graying various pages respectively.
Further, the page includes: c-end page, RN page and H5 page;
the graying of various pages respectively comprises the following steps:
drawing and rendering the C-end page and the sub-pages thereof by using a canvas technology;
utilizing a View drawing API to draw and render the RN page and the sub-page thereof;
the H5 page is grayed out by setting the cs filter of the top level dom element of the page.
Further, the rendering of the C-end page and its sub-pages by using canvas technology includes:
configuring a painting brush in the canvas by setting the color saturation of a color filter;
and calling the configured canvas to draw and render the C-end page and the sub-pages thereof.
Further, the rendering of the RN page and the sub-page thereof by using the View rendering API comprises the following steps:
configuring a brush in a View drawing API by setting the color saturation of a color filter;
and calling the configured View drawing API to draw and render the RN page and the sub-page thereof.
Further, graying the H5 page by setting the cs filter of the top-level dom element of the page includes:
acquiring a top-level dom element of the H5 page;
and setting the cs filter attribute of the top-layer dom element as a preset gray level conversion parameter in a CSS filter mode.
In a second aspect, a mobile terminal APP full page graying device based on Android is provided, including:
the graying switch parameter acquisition module is used for acquiring graying switch parameters from an application database or a configuration file;
the judging module is used for judging whether the graying switch parameter meets a preset condition or not;
the classification module is used for classifying the APP full page of the mobile terminal if the graying switch parameters meet preset conditions;
and the graying module is used for graying various pages respectively.
Further, the page includes: c-end page, RN page and H5 page;
the graying module includes:
the C-end graying unit is used for drawing and rendering the C-end page and the sub-pages thereof by utilizing a canvas technology;
the RN page graying unit is used for rendering the RN page and the sub-page thereof by using the View drawing API;
and the H5 page graying unit grays the H5 page by setting the cs filter of the top-level dom element of the page.
Further, the C-terminal graying unit includes:
the first painting brush setting subunit configures painting brushes in the canvas by setting the color saturation of the color filter;
and the C-end rendering subunit is used for calling the configured canvas to render and render the C-end page and the sub-page thereof.
Further, the RN page graying unit includes:
the second brush setting subunit configures brushes in the View drawing API by setting the color saturation of the color filter;
and the RN page drawing rendering subunit calls the configured View drawing API to draw and render the RN page and the sub-page thereof.
Further, the H5 page graying unit includes:
a top-level dom element obtaining subunit, for obtaining the top-level dom element of the H5 page;
and the H5 page graying subunit sets the cs filter attribute of the top-layer dom element as a preset grayscale conversion parameter in a CSS filter mode.
In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method for graying the full page of the APP at the mobile terminal based on the Android are implemented.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for Android-based mobile terminal APP full page graying.
The invention provides a mobile terminal APP full page graying method and device based on Android, wherein the method comprises the following steps: acquiring graying switch parameters from an application database or a configuration file; judging whether the graying switch parameter meets a preset condition or not; if yes, classifying the mobile terminal APP full page, graying various pages respectively, classifying the pages by setting graying switch parameters, and graying various pages respectively, so that the full graying of the pages is realized, the system performance is not affected, and mistakes are prevented during graying of the system.
It should be noted that the Android-based mobile terminal APP full page graying method and device provided by the invention can be used in the financial field, such as a bank client, and can also be used in any field other than the financial field, such as a shopping APP or a video APP, and the application field is not limited in the embodiment of the invention.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. In the drawings:
fig. 1 is a first flowchart of an Android-based mobile terminal APP full page graying method in an embodiment of the present invention;
fig. 2A is a schematic flowchart of a second method for graying an APP full page at a mobile terminal based on Android in the embodiment of the present invention;
FIG. 2B illustrates an android C end page graying effect;
FIG. 2C illustrates the RN page graying effect;
FIG. 2D illustrates the H5 page graying effect;
FIG. 3 shows the detailed steps of step S410 in FIG. 2A;
FIG. 4 shows the detailed steps of step S420 in FIG. 2A;
FIG. 5 shows the detailed steps of step S430 in FIG. 2A;
fig. 6 shows a flowchart of an exemplary Android-based mobile terminal APP full page graying method in an embodiment of the present invention;
FIG. 7 shows a process flow of graying a C-end page in an embodiment of the present invention;
FIG. 8 shows a process of graying an RN page in an embodiment of the present invention;
FIG. 9 illustrates a process flow for graying an H5 page in an embodiment of the present invention;
fig. 10 is a block diagram of a structure of an Android-based mobile terminal APP full page graying apparatus in the embodiment of the present invention;
fig. 11 shows a specific structure of a graying module;
fig. 12 shows a specific structure of the C-terminal graying unit;
FIG. 13 shows a specific structure of an RN page graying unit;
fig. 14 shows a specific structure of an H5 page graying unit;
fig. 15 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of this application and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The graying process is a process of converting a color image into a grayscale image. The color image is divided into three components of R, G and B, which respectively display various colors such as red, green and blue, and the graying is the process of making the components of R, G and B of the color image equal. The pixels with large gray values are brighter (the maximum pixel color value is 255, which is white), and conversely, darker (the minimum pixel color value is 0, which is black).
The principle of decolorizing gray images: when the three-color channels of the color RGB have the same value, i.e., R ═ G ═ B, the image is displayed in gray, and meanwhile, in order to ensure the brightness of the image, it is necessary to ensure that the result of R + G + B in the same channel is close to 1.
In App, we will use a color matrix for color processing, a 4 x 5 matrix, as follows:
Figure BDA0002631195000000051
the color matrix is applied to a specific color, the parameter matrix of the color is generally, each parameter represents R, B, G and transparency A, respectively, and the final color is calculated as follows:
Figure BDA0002631195000000052
the graying effect can be achieved by the above color matrix calculation. And calling a saturation API in the Android to realize color matrix calculation to achieve a gray level effect.
The invention provides an Android-based mobile terminal APP full page graying method, which can realize the entire APP page graying display of an Android system through a simple parameter or switch setting.
Fig. 1 is a first flowchart of an Android-based mobile terminal APP full page graying method in an embodiment of the present invention; as shown in fig. 1, the method may include the following:
step S100: acquiring graying switch parameters from an application database or a configuration file;
specifically, when a user logs in the APP, the system automatically obtains the graying switch parameters from the application database or the configuration file to judge whether graying processing needs to be performed on the APP.
Step S200: judging whether the graying switch parameters meet preset conditions or not;
if yes, go to step S300; otherwise, the flow ends.
For example, if the graying switch parameter flag is yes, the system automatically enters a graying processing flow to perform comprehensive graying processing on the pages of various levels of the APP, and if the graying switch parameter flag is no, the graying flow is ended, the graying flow is kept to be opened as it is, and graying processing is not performed.
Step S300: classifying the APP full page of the mobile terminal;
step S400: and graying the various pages respectively.
Those skilled in the art can understand that, based on different technical architectures, the developed page types are not unique, and the Android-based mobile terminal APP page includes: c-end page, RN (read native) page and H5 page; during graying, all pages of the whole APP are subjected to full graying treatment, including three different treatments of Android C-end page graying treatment, Android RN page graying treatment and H5 page graying, and the method relates to the technical fields of APP technology stacks (Android, RN, H5 and CSS) and the like.
And after the APP is subjected to gray level processing, all pages are comprehensively displayed in a gray level manner, and the desired gray level effect is achieved.
By setting graying switch parameters and classifying the pages, graying is respectively carried out on various pages, full graying of the pages is realized, the system performance is not influenced, and errors are prevented when the system is grayed. The method overcomes the defect of the graying of the APP of the common Android system in the industry, and supports the APPs developed by various development modes including native APP development, WebApp development, mixed APP development and the like.
In an alternative embodiment, the graying process comprises: android C end graying processing, android RN page graying processing and H5 page graying are automatically and respectively called corresponding processing flows to perform graying processing according to the classification of APP pages, so that various pages after graying are displayed in real time, see FIG. 2A, and the step S400 can comprise the following contents:
step S410: drawing and rendering the C-end page and the sub-pages thereof by using a canvas technology;
the android C-end page is processed in a unified mode, and all pages and pictures of the C-end of the whole android APP achieve gray display in a full mode. The graying display effect is shown in fig. 2B.
Step S420: utilizing a View drawing API to draw and render the RN page and the sub-page thereof;
the RN page of the android APP is processed in a unified mode, and the RN page and the picture of the whole android APP achieve gray display in a whole mode. The graying display effect is shown in fig. 2C.
Step S430: the H5 page is grayed out by setting the cs filter of the top level dom element of the page.
After the H5 page is grayed, the common CSS code for restoring display is called to graye all the H5 pages. The H5 page graying effect is shown in FIG. 2D.
In an alternative embodiment, referring to fig. 3, this step S410 may include the following:
step S411: configuring a painting brush in the canvas by setting the color saturation of a color filter;
when the gray control parameter meets the preset condition and needs to be grayed, calling a C-terminal gray public processing program, specifically:
firstly, a system painting brush Paint object is created, wherein the painting brush can be used for calling an android system drawing API, and the system can be rendered.
Then, a color filter colormatrix x color filter object is created, a parameter value of color saturation of the color filter is set to 0, and when the saturation is 0, graying of a display image can be realized.
And then, according to the set saturation of the color filter, the brush transmits the color filter with the set parameter value into the brush through a bottom layer API of the system, and the brush can be used for gray level drawing.
And finally, creating a system Canvas, rewriting draw and dispatchDraw of the system Canvas, and calling the set painting brush Paint through the Canvas to realize redrawing and rendering of the picture layout.
Step S412: and calling the configured canvas to draw and render the C-end page and the sub-pages thereof.
Specifically, a custom layout GrayFrameLayout class (a gray frame level) is created, a custom layout method is adopted to replace a system Activity root layout mode, the created canvas is called, and the layout picture of the client is drawn and rendered again, so that the home page and the sub-pages of the client are displayed in a gray mode according to the setting of a new canvas, and the gray effect is achieved.
In an alternative embodiment, referring to fig. 4, this step S420 may include the following:
step S421: configuring a brush in a View drawing API by setting the color saturation of a color filter;
when the gray control parameter meets the preset condition and graying is needed, calling an RN page gray public processing program, specifically:
first, a system brush Paint is created, which can be used to call an android system drawing API, and the system can be rendered.
Secondly, a color filter ColorMatrixColorFilter is created, the parameter value of the color saturation of the color filter is set to be 0, and when the saturation is 0, graying of a display image can be realized.
And finally, according to the set saturation of the color filter, the brush transmits the color filter with the set parameter value into the brush through a bottom API of the system, and the brush can be used for gray level drawing.
Step S422: and calling the configured View drawing API to draw and render the RN page and the sub-page thereof.
Specifically, when android View setting hardware is accelerated, a painting brush with a set saturation is introduced, a View drawing API is called by Activity DecorView to re-draw and render a client side picture, so that a home page and sub-pages of an RN page are displayed in a gray mode according to new setting, and a gray effect is achieved.
In an alternative embodiment, when the grayscale control parameter meets the preset condition and graying is required, the common grayscale CSS file of the application is called, specifically, referring to fig. 5, this step S430 may include the following steps:
step S431: acquiring a top-level dom element of the H5 page;
specifically, according to the characteristics of CSS styles, top-level dom elements of all H5 pages of the system are obtained;
step S432: and setting the cs filter attribute of the top-layer dom element as a preset gray level conversion parameter in a CSS filter mode.
And setting the cs filter attribute of the top-layer dom element as a grayscale (100%) in a CSS filter mode, and representing the whole page to be in gray display when the grayscale value is set to be 100%.
After the top-level dom elements of all the pages of H5 are set to the CSS filter attribute of gradycale (100%) by the common CSS file, all the pages of H5 are displayed in a grayed-out manner.
It is worth noting that the filter attribute applies a graphical effect such as blurring or color shifting to the element. Typically for adjusting the rendering of images, backgrounds and borders. The CSS standard contains some functions that have achieved a predefined effect. Wherein, the function of gradycale (amount) is to perform gray level conversion on the picture, and amount is the size of the conversion value, and may be number or percentage. When the value is 100%, the gradation is maximum. 0% is not different from the original. Values between 0% and 100% will cause the grey scale to change linearly. When an amuunt is empty, a 0 is automatically inserted.
In order to enable those skilled in the art to better understand the present invention, the following examples illustrate the mobile terminal APP full-page graying method based on Android provided in the embodiment of the present invention:
referring to fig. 6, the Android-based mobile terminal APP full page graying method includes:
step S101: opening the APP, and automatically reading a gray switch mark;
step S102: whether graying is performed or not;
if yes, go to step S103: if not, ending.
Step S103: carrying out graying treatment;
step S104: and displaying all pages and image gray levels of the APP.
Referring to fig. 7, the graying the C-end page includes:
step D101: creating a painting brush;
step D102: setting color saturation;
step D103: the brush calls a color filter;
step D104: rewriting a system canvas;
step D105: and re-arranging the system root.
Referring to fig. 8, graying the RN page includes:
step T101: creating a painting brush;
step T102: setting color saturation;
step T103: the brush calls a color filter;
step T104: and the view layer redraws the gray level page.
Referring to fig. 9, the graying of the H5 page includes:
step P101: entering application common CSS;
step P102: acquiring top-level dom elements of all H5 pages of the system;
step P103: setting cs filter attribute;
step P104: all H5 pages were displayed grayed out.
Based on the same inventive concept, the embodiment of the present application further provides an Android-based mobile terminal APP full-page graying apparatus, which can be used for implementing the method described in the above embodiment, as described in the following embodiment. Because the principle of the Android-based mobile terminal APP full page graying device for solving the problems is similar to that of the method, the implementation of the Android-based mobile terminal APP full page graying device can refer to the implementation of the method, and repeated parts are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 10 is a first structural block diagram of an Android-based mobile terminal APP full-page graying apparatus in the embodiment of the present invention. As shown in fig. 10, the mobile terminal APP full page graying apparatus based on Android specifically includes: the device comprises a graying switch parameter acquisition module 10, a judgment module 20, a classification module 30 and a graying module 40.
The graying switch parameter acquisition module 10 acquires graying switch parameters from an application database or a configuration file;
the judging module 20 judges whether the graying switch parameters meet preset conditions;
if the graying switch parameters meet the preset conditions, the classification module 30 classifies the APP full pages at the mobile terminal;
the graying module 40 grays each page.
By setting graying switch parameters and classifying the pages, graying is respectively carried out on various pages, full graying of the pages is realized, the system performance is not influenced, and errors are prevented when the system is grayed. The method overcomes the defect of the graying of the APP of the common Android system in the industry, and supports the APPs developed by various development modes including native APP development, WebApp development, mixed APP development and the like.
In an alternative embodiment, referring to fig. 11, the graying module comprises: a C-terminal graying unit 41, an RN page graying unit 42, and an H5 page graying unit 43.
The C-end graying unit 41 performs drawing rendering on the C-end page and the sub-pages thereof by using a canvas technology;
the RN page graying unit 42 utilizes the View drawing API to draw and render the RN page and the sub-page thereof;
the H5 page graying unit 43 grays the H5 page by setting the css filter of the top level dom element of the page.
In an alternative embodiment, referring to fig. 12, the C-terminal graying unit includes: a first-brush setting subunit 41a, and a C-terminal drawing rendering subunit 41 b.
The first-brush setting subunit 41a configures brushes in the canvas by setting the color saturation of the color filter;
the C-side rendering subunit 41b calls the configured canvas to render the C-side page and the sub-pages thereof.
In an alternative embodiment, referring to fig. 13, the RN page graying unit includes: a second-brush setting subunit 42a, and an RN page drawing rendering subunit 42 b.
The second brush setting subunit 42a configures brushes in the View drawing API by setting the color saturation of the color filter;
and the RN page drawing and rendering subunit 42b calls the configured View drawing API to draw and render the RN page and the sub-page thereof.
In an alternative embodiment, referring to fig. 14, the H5 page graying unit includes: a top level dom element acquisition sub-unit 43a and an H5 page graying sub-unit 43 b.
The top-level dom element obtaining subunit 43a obtains a top-level dom element of the H5 page;
the H5 page graying subunit 43b sets the cs filter attribute of the top-level dom element as a preset grayscale conversion parameter in a CSS filter manner.
The apparatuses, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. A typical implementation device is an electronic device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example, the electronic device specifically includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the steps of the method for Android-based mobile terminal APP full page graying are implemented.
Referring now to FIG. 15, shown is a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 15, the electronic apparatus 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, an embodiment of the present invention includes a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above-described method for mobile terminal APP full page graying based on Android.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A mobile terminal APP full page graying method based on Android is characterized by comprising the following steps:
acquiring graying switch parameters from an application database or a configuration file;
judging whether the graying switch parameters meet preset conditions or not;
if yes, classifying the full number of pages of the mobile terminal APP, and graying various pages respectively.
2. The Android-based mobile terminal APP full page graying method according to claim 1, wherein the page comprises: c-end page, RN page and H5 page;
the graying is respectively carried out on various pages, and the graying comprises the following steps:
drawing and rendering the C-end page and the sub-pages thereof by using a canvas technology;
utilizing a View drawing API to draw and render the RN page and the sub-page thereof;
the H5 page is grayed out by setting the cs filter of the top level dom element of the page.
3. The Android-based mobile terminal APP full page graying method according to claim 2, wherein the rendering of the C-terminal page and its sub-pages by canvas technology comprises:
configuring a painting brush in the canvas by setting the color saturation of a color filter;
and calling the configured canvas to draw and render the C-end page and the sub-pages thereof.
4. The Android-based mobile terminal APP full page graying method as claimed in claim 2, wherein the rendering of the RN page and its sub-pages by using the View rendering API comprises:
configuring a brush in a View drawing API by setting the color saturation of a color filter;
and calling the configured View drawing API to draw and render the RN page and the sub-page thereof.
5. The Android-based mobile terminal APP full page graying method of claim 2, wherein graying the H5 page by setting the cs filter of the top level dom element of the page comprises:
acquiring a top-level dom element of the H5 page;
and setting the cs filter attribute of the top-layer dom element as a preset gray level conversion parameter in a CSS filter mode.
6. The utility model provides a remove end APP full amount page graying device based on Android which characterized in that includes:
the graying switch parameter acquisition module is used for acquiring graying switch parameters from an application database or a configuration file;
the judging module is used for judging whether the graying switch parameters meet preset conditions or not;
the classification module is used for classifying the APP full page of the mobile terminal if the graying switch parameters meet preset conditions;
and the graying module is used for graying various pages respectively.
7. The Android-based mobile terminal APP full page graying device of claim 6, wherein the page comprises: c-end page, RN page and H5 page;
the graying module includes:
the C-end graying unit is used for drawing and rendering the C-end page and the sub-pages thereof by utilizing a canvas technology;
the RN page graying unit is used for rendering the RN page and the sub-page thereof by using the View drawing API;
and the H5 page graying unit grays the H5 page by setting the cs filter of the top-level dom element of the page.
8. The Android-based mobile terminal APP full page graying device of claim 7, wherein the C-terminal graying unit comprises:
the first painting brush setting subunit configures painting brushes in the canvas by setting the color saturation of the color filter;
and the C-end rendering subunit is used for calling the configured canvas to render and render the C-end page and the sub-page thereof.
9. The Android-based mobile terminal APP full page graying device of claim 7, wherein the RN page graying unit comprises:
the second brush setting subunit configures brushes in the View drawing API by setting the color saturation of the color filter;
and the RN page drawing rendering subunit calls the configured View drawing API to draw and render the RN page and the sub-page thereof.
10. The Android-based mobile terminal APP full page graying device of claim 7, wherein the H5 page graying unit comprises:
the top-level dom element obtaining subunit is used for obtaining the top-level dom element of the H5 page;
and the H5 page graying subunit sets the cs filter attribute of the top-layer dom element as a preset grayscale conversion parameter in a CSS filter mode.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the Android-based mobile terminal APP full page graying method of any one of claims 1 to 5 when executing the program.
12. A computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the method for Android-based mobile terminal APP full page graying according to any one of claims 1 to 5.
CN202010811648.2A 2020-08-13 2020-08-13 Mobile terminal APP full page graying method and device based on Android Active CN111930461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010811648.2A CN111930461B (en) 2020-08-13 2020-08-13 Mobile terminal APP full page graying method and device based on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010811648.2A CN111930461B (en) 2020-08-13 2020-08-13 Mobile terminal APP full page graying method and device based on Android

Publications (2)

Publication Number Publication Date
CN111930461A true CN111930461A (en) 2020-11-13
CN111930461B CN111930461B (en) 2023-09-15

Family

ID=73311665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010811648.2A Active CN111930461B (en) 2020-08-13 2020-08-13 Mobile terminal APP full page graying method and device based on Android

Country Status (1)

Country Link
CN (1) CN111930461B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237799A (en) * 2021-12-20 2022-03-25 湖南快乐阳光互动娱乐传媒有限公司 Graying method and device for designated area of page

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761079A (en) * 2013-12-12 2014-04-30 北京奇虎科技有限公司 Method and device for automatically graying page

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761079A (en) * 2013-12-12 2014-04-30 北京奇虎科技有限公司 Method and device for automatically graying page

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XUWENNENG: "android图片的灰度化处理", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/xuwenneng/article/details/52634979> *
攻城ALONE: "CSS实现网页变灰的效果", pages 1 - 4, Retrieved from the Internet <URL:https://www.cnblogs.com/aloneer/p/13452315.html> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237799A (en) * 2021-12-20 2022-03-25 湖南快乐阳光互动娱乐传媒有限公司 Graying method and device for designated area of page
CN114237799B (en) * 2021-12-20 2024-01-16 湖南快乐阳光互动娱乐传媒有限公司 Graying method and device for designated area of page

Also Published As

Publication number Publication date
CN111930461B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN109472839B (en) Image generation method and device, computer equipment and computer storage medium
CN115831061B (en) Ink screen display method, device, terminal equipment and storage medium
CN111090384B (en) Soft keyboard display method and device
US11481927B2 (en) Method and apparatus for determining text color
CN110838154A (en) Picture processing method and device
CN111930461B (en) Mobile terminal APP full page graying method and device based on Android
CN110880164B (en) Image processing method, device, equipment and computer storage medium
CN113053322B (en) Display optimization method of electronic ink screen and related device
CN110765384A (en) Resolution adaptation method of client, storage medium and terminal
CN112819691B (en) Image processing method, device, equipment and readable storage medium
CN105589667A (en) Method and device for screenshot of display image of display device
CN115509474A (en) Title display method, title display device, storage medium and electronic equipment
CN112686939A (en) Depth image rendering method, device and equipment and computer readable storage medium
CN112700456A (en) Image area contrast optimization method, device, equipment and storage medium
CN111949353A (en) iOS-based mobile terminal APP full page graying method and device
CN116052605A (en) Ink screen refreshing method and device, ink screen equipment and storage medium
CN113626129B (en) Page color determination method and device and electronic equipment
CN106296757A (en) A kind of image processing method and device
CN111068314B (en) NGUI resource rendering processing method and device based on Unity
CN114201627A (en) Display method, device and equipment for electronic ink screen and storage medium
CN111930462A (en) PC (personal computer) end full page graying method and device
CN114489910A (en) Video conference data display method, device, equipment and medium
US11217205B2 (en) Method and apparatus for rendering contents for vision accessibility
CN112162719A (en) Display content rendering method and device, computer readable medium and electronic equipment
CN107577488A (en) A kind of display methods, software UI interface display methods and device based on CFA processing

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