Display control method, device, electronic device and computer readable storage medium

By receiving the full page color consistency instruction and adding a color layer to the top layer of the shared application view, the problem of large development volume when changing the full page color in the existing technology and large changes to the original code is solved, and high-performance full page color consistency display is achieved.

CN116483495BActive Publication Date: 2025-03-04CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310418860.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-19
Publication Date
2025-03-04
Estimated Expiration
2043-04-19

AI Technical Summary

Technical Problem

When changing the color of the entire page, the existing technology has large development volume and large changes to the original code, low performance and prone to errors.

Method used

By receiving the full page color consistency instructions, obtain the top layer of the shared application view, create the top layer of the collection storage, traverse the collection and add color layers, and display the color layer and the top layer of the view at the same time, reducing traversal of the existing view levels.

Benefits of technology

It reduces the amount of calculation and code changes, improves the performance of the color consistent instructions for the full page of shared applications, is simple to operate, and has fewer changes to the original code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483495B_ABST
    Figure CN116483495B_ABST
Patent Text Reader

Abstract

The present application relates to the field of interactive design technology, and provides a display control method, device, electronic device, and computer-readable storage medium. The method includes: receiving a full page color consistency instruction, the full page color consistency instruction is used to indicate that the display page color of the shared application is consistent; determining the content of the full page color consistency instruction; if the content of the full page color consistency instruction is an open instruction, obtaining the top layer of the shared application view; creating a collection, storing the top layer of the shared application view in the form of an array to the collection; based on the full page color consistency instruction, traversing the array in the collection, adding a color layer to the top layer of the view, and displaying the color layer and the top layer of the shared application view on the display page of the shared application at the same time. Through the method provided by the present application, a color layer is added to the top layer of the shared application view, with high performance and small changes to the original code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of interactive design technology, and in particular to a display control method, device, electronic device, and computer-readable storage medium. Background Art

[0002] In existing technology, when a terminal controls the color consistency of all pages, each control contained in the terminal display window is individually processed and adjusted to achieve a consistent color scheme across the entire page. For example, three-color channel calculations are performed on each image, the background color and text color are recalculated for each control, and bitmap processing and calculations are performed on each element in the web view. However, this method requires a significant amount of development and computation, has low performance, is prone to errors, and requires significant changes to the original code. Summary of the Invention

[0003] In view of this, the embodiments of the present application provide a display control method, device, electronic device and computer-readable storage medium to solve the problem in the prior art of large development workload and large changes to the original code when changing the color of the entire page.

[0004] According to a first aspect of an embodiment of the present application, a display control method is provided, including:

[0005] Receive a full page color consistency instruction, the full page color consistency instruction is used to instruct the shared application to display page colors consistently, and the full page color consistency instruction includes color parameters and display parameters;

[0006] Determine the content of the color consistency instruction for all pages;

[0007] If the content of the command for consistent color for all pages is an open command, obtain the top layer of the shared application view;

[0008] Create a collection and store the top level of the shared application view in the collection in array form;

[0009] Based on the full page color consistency instruction, traverse the array in the collection, add a color layer to the top layer of the shared application view, and display the color layer and the top layer of the shared application view on the display page of the shared application at the same time.

[0010] According to a second aspect of the embodiments of the present application, a display control device is provided, comprising:

[0011] a receiving module configured to receive a full page color consistency instruction, the full page color consistency instruction being used to instruct the shared application to display pages with consistent colors, the full page color consistency instruction including color parameters and display parameters;

[0012] A determination module configured to determine the content of the full page color consistency instruction;

[0013] An acquisition module is configured to acquire the top layer of the shared application view if the content of the instruction for consistent color of all pages is an opening instruction;

[0014] The storage module is configured to create a collection and store the top level of the shared application view in the collection in an array form;

[0015] The display module is configured to traverse the array in the collection based on the full page color consistency instruction, add a color layer to the top layer of the shared application view, and display the color layer and the top layer of the shared application view on the display page of the shared application at the same time.

[0016] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0017] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.

[0018] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: through the display control method involved in the present application, a full page color consistency instruction is received, wherein the full page color consistency instruction is used to indicate that the display page of the shared application is consistent in color, and the full page color consistency instruction includes color parameters and display parameters. After the shared application receives the full page color consistency instruction, it determines the content of the instruction. If the content of the full page color consistency instruction is an open instruction, it obtains the top layer of the shared application view, creates a collection, and stores the top layer of the shared application view in the form of an array to the collection. According to the full page color consistency instruction, the array in the collection is traversed, which does not involve traversal of the existing view hierarchy, reducing the amount of calculation and code changes. Compared with the prior art, the performance of the full page color consistency instruction of the shared application is improved. In addition, the operation is simple, and the code changes to the original shared application display page are small, which greatly reduces the amount of calculation and development. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a schematic diagram of an application scenario of an embodiment of the present application;

[0021] Figure 2 This is a flow diagram of a display control method provided by an embodiment of the present application. Figure 1 ;

[0022] Figure 3 This is a flow diagram of a display control method provided by an embodiment of the present application. Figure 2 ;

[0023] Figure 4 is a schematic diagram of a display control device provided in an embodiment of the present application;

[0024] Figure 5 Schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0026] A display control method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0027] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include terminal devices 101, 102 and 103, a server 104 and a network 105.

[0028] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with a display screen and supporting communication with the server 104, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers; when the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices described above. The terminal devices 101, 102, and 103 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present application are not limited to this. Furthermore, various applications can be installed on the terminal devices 101, 102, and 103, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0029] Server 104 can be a server that provides various services, such as a backend server that receives requests sent by terminal devices that establish communication connections with it. The backend server can receive and analyze the requests sent by the terminal devices, and generate processing results. Server 104 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center, and the embodiments of the present application are not limited thereto.

[0030] It should be noted that the server 104 can be either hardware or software. When the server 104 is hardware, it can be various electronic devices that provide various services to the terminal devices 101, 102, and 103. When the server 104 is software, it can be multiple software or software modules that provide various services to the terminal devices 101, 102, and 103, or it can be a single software or software module that provides various services to the terminal devices 101, 102, and 103. This embodiment of the present application does not limit this.

[0031] The network 105 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.

[0032] It should be noted that the specific types, quantities and combinations of the terminal devices 101, 102 and 103, the server 104 and the network 105 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0033] Figure 2 It is a flow chart of a display control method provided in an embodiment of the present application. Figure 2 The display method can be Figure 1 The terminal device or server executes. Figure 2 As shown, the display control method includes the following steps:

[0034] S201, receiving a color consistency instruction for all pages.

[0035] S202, determining the content of the instruction for consistent color of all pages;

[0036] S203: If the content of the instruction for consistent color of all pages is an opening instruction, obtain the top layer of the shared application view.

[0037] S204 , creating a collection, and storing the top level of the shared application view in the collection in array form.

[0038] S205 , based on the full page color consistency instruction, traverse the array in the collection, add a color layer on the top layer of the shared application view, and display the color layer and the top layer of the shared application view on the display page of the shared application at the same time.

[0039] In step S201, a full page color consistency instruction is received, and the shared application is instructed to display the page color consistently based on the color parameters and display parameters included in the instruction. A shared application is an application that can be collaborated or shared across different terminal devices. For example, a mobile phone and a tablet are terminal devices. If a user simultaneously launches an application on both the mobile phone and the tablet and sends a full page color consistency instruction, the application on both the mobile phone and the tablet will synchronously execute the instruction, resulting in a consistent display page across the terminals running the shared application.

[0040] In step S202, the instruction content corresponding to the full page color consistency instruction is determined, wherein the full page color consistency instruction includes an open instruction and a close instruction, the open instruction is used to instruct the shared application to execute the full page color consistency instruction, and the close instruction is used to instruct the shared application to stop executing the full page color consistency instruction.

[0041] In step S203, if the full page color consistency instruction is determined to be an on instruction, the top layer of the shared application view on the terminal device is obtained, where the top layer of the shared application view can be understood as the root window.

[0042] In step S204, a set is created in the memory for storing the top layer of the shared application view. The display pages of the shared application on different terminal devices may be the same or different, and there may be one or more root windows.

[0043] In an exemplary embodiment of the present application, by accessing the singleton method shared application sharedApplication provided in the UI application UIApplication for providing control and coordination during the running of the iOS program, the connected screen connectedScenes attribute in the sharedApplication return value is obtained. This attribute is expressed as an array, representing all current scenes of the iOS application, such as applications on mobile phones and tablets. Among them, each element in the connectedScenes attribute represents an object for managing windows, called a UI window screen UIWindowScene object, also called a UI root window screen object, and each object represents a scene. The array obtained by the connectedScenes attribute is traversed to obtain the root window attribute of each UIWindowScene object, and the root window set under each scene returned by the traversal is added to the created set to form a root window set, which is stored in the form of an array.

[0044] In step S205, the collection created in local memory is traversed to obtain the top layer of each shared application view. A color layer, as indicated by the full page color consistency instruction, is added to the top layer of the shared application view. The color layer and the application view are simultaneously displayed on the terminal's display interface. It is understood that the color layer is located on the top layer of the original application. The color layer is an abstract concept with various specific implementations.

[0045] The present application embodiment uses two implementation methods, setting the color layer to gray and adding a color layer on top of the shared application view, as examples for specific description:

[0046] In the first method, the color layer is implemented by the UIView view of the basic elements that make up the screen, specifically:

[0047] Create an instance of UIView. In this embodiment, the name of the created instance is view. Set its background color backgroundColor to the gray color value specified by the full page color consistency instruction. Get the attribute layer layer of UIView, and then get the attribute contents of layer. The attribute contents of layer is a picture. The specific content of the picture is the user-visible content in the control. Add a filter effect to the picture through the Core Image (a technology for processing and analyzing static images and videos) framework of iOS, and then set the picture processed by iOS Core Image to the contents attribute. Call the system function addSubView() on the root window to add a color layer set to gray. AddSubView() is the initialization program of the shared application. It is a function for adding a subview to the parent view. In this embodiment of the application, the parent view is the top layer of the shared application view, and the subview is the color layer.

[0048] Among them, the filter effect can be added in the full page color consistency instruction and set in the display parameters included in the full page color consistency instruction.

[0049] In the second method, the color layer is implemented by a rectangular area CALayer with visible content, specifically:

[0050] Create a CALayer instance. In this embodiment, the name of the created instance is layer. For example, set the backgroundColor property of the layer to the gray color value specified by the full page color consistency instruction. For the compositingFilter property of the layer property, find a suitable filter in the Core Image framework of iOS, and assign the filter method to the compositingFilter property. When the assignment is successful, it means that the effect of the filter has been adopted. For example, select the bloomBlendMode filter. The filter uses the background color backgroundColor and its own contents to perform filter calculations to obtain a specific assignment. Access the layer property of the root window and call the system function addSubLayer() on the layer property to add a color layer set to gray. Among them, addSubLayer() is a map that is overlaid in the view. In the embodiment of the present application, it is to overlay a color layer on the top layer of the shared application view.

[0051] The technical solution provided in the embodiment of the present application uses the content of the full page color consistency instruction as the opening instruction, adds a color layer at the top level of the shared application view, and does not require traversing the existing shared application view hierarchy layer by layer, thereby reducing the amount of calculation and code changes, ensuring the high performance of the shared application, and at the same time being able to add the color layer to the same or different root windows of the shared application on different terminal devices, so as to achieve synchronous changes and improve the user experience.

[0052] Through the technical solution provided in the embodiment of the present application, the shared application can be instructed to turn on full page color consistency through the turn-on instruction of the full page color consistency instruction, and also includes a turn-off instruction that can turn off full page color consistency.

[0053] In some embodiments, when determining the instruction for consistent color of all pages, the method further includes:

[0054] If the color consistency instruction for all pages is a closed instruction, traverse the array in the collection and remove the color layer.

[0055] The shared application has executed the opening instruction of the full page color consistency instruction, has created a collection for storing root windows in local memory, and has added a color layer at the top level of the shared application view. When a closing instruction is received, the collection is traversed and the system's remove layer method is called for each root window in the collection.

[0056] In the embodiment of the present application, there are two methods for calling the system to remove layers, and the two methods for removing layers correspond one to one to the two methods for adding a color layer to the top layer of the application view.

[0057] If you added a color layer using the first method, when removing the layer, access the root window's subViews property, which is an array representing all subviews of the root window. Traverse the subViews array to identify the layer to which you added the color layer, and call the system function removeFromSuperView() on that layer to remove it. The removeFromSuperView() function removes the current view from its parent view and the root window, and also removes it from the responder chain for event-related operations.

[0058] If you add a color layer according to the second method, when removing the layer, access the sublayers property in the layer property of the root window. The sublayers property is in array form, representing all sublayers of the root window. Traverse the sublayers property, confirm the corresponding layer to which the color layer is added, and call the system function removeFromSuperView() on the layer to remove the layer.

[0059] In another embodiment of the present application, if a closing instruction for the full page color consistency instruction is received when the shared application is started, step S203, step S204 and step S205 are not executed.

[0060] According to the technical solution provided in the embodiment of the present application, the added layer can be identified according to the closing instruction of the full page color consistency instruction, and the added color layer can be removed in a targeted manner by executing the removal method, or the operation of adding the color layer can be not executed, thereby reducing the amount of calculation and code changes, ensuring the high performance of the shared application, and improving the user experience.

[0061] Through the technical solution provided in the embodiments of the present application, there are multiple ways to receive color consistency instructions for all pages, which is more flexible.

[0062] In some embodiments, before receiving the instruction to make all pages consistent in color, the method further includes:

[0063] In response to the start of the shared application, the server interface is accessed, the server instruction is received, and the full page color consistency instruction is generated according to the server instruction.

[0064] The server provides an interface for enabling and disabling color consistency across all pages. In response to the launch of a shared application, the shared application creates a color layer and accesses the server interface to obtain the server's color consistency across all pages instruction. If the server's color consistency across all pages instruction is enabled, the instruction is executed. If the server does not send a color consistency across all pages instruction, no action is taken.

[0065] At any time during the life cycle of the shared application, the server's full page color consistency instruction can be requested, thereby adding or removing color layers according to the content of the full page color consistency instruction.

[0066] According to the technical solution provided in the embodiment of the present application, by obtaining the full page color consistency instruction from the server and configuring the terminal from the server, the flexibility of displaying the shared application on the terminal display page can be improved.

[0067] In some embodiments, before receiving the instruction to make all pages consistent in color, the method further includes:

[0068] In response to the instruction sent by the user, an instruction for consistent color of all pages is generated.

[0069] A page is provided in the shared application for users to choose to turn on / off the instruction of consistent color for all pages. The page also provides one or more effects such as specific color values, transparency, etc. for consistent color for all pages.

[0070] The terminal receives a full-page color consistency instruction sent by the user on the page and determines the instruction and the current shared application's operating environment. If the full-page color consistency instruction sent by the user is an enable instruction, and the current shared application's operating environment is in a full-page color consistency OFF state, full-page color consistency is enabled. If the full-page color consistency instruction sent by the user is a disable instruction, and the current shared application's operating environment is in a full-page color consistency ON state, full-page color consistency is disabled.

[0071] According to the technical solution provided in the embodiment of the present application, users can freely configure the color consistency of all pages, choose to turn it on / off, and freely adjust the color and transparency and other effects to enhance the user experience.

[0072] In some embodiments, before receiving the instruction to make all pages consistent in color, the method further includes:

[0073] In response to the startup of the shared application meeting a preset condition, a full page color consistency instruction is generated.

[0074] A configuration file is saved in the release package of the shared application. The configuration file pre-sets various parameters for color consistency across all pages of the shared application, including an on / off function, preset color values, and instructions for color consistency across all pages. For example, if the configuration file stipulates that color consistency across all pages is automatically turned on and set to gray on May 12th of each year, in response to the startup of the shared application, it is detected that the current shared application is in the time zone of May 12th, then a gray color layer is generated on the top layer of the shared application view, and the gray color layer and the shared application view are simultaneously displayed on the display page of the terminal. The shared application page viewed by the user in the time zone of May 12th is gray.

[0075] Continuing with the above example, if the shared application is detected to be out of the time zone on May 12th, the added gray color layer is removed, and the top layer of the original shared application view is displayed on the terminal's display page. The configuration file can communicate with the server. In response to the server's update of the full page color consistency instruction, the latest configuration file corresponding to the full page color consistency instruction is synchronously or asynchronously requested from the server and stored locally, silently replacing the pre-update configuration file stored on the hard disk or memory.

[0076] According to the technical solution provided in the embodiment of the present application, it is possible to flexibly configure the display page of the terminal according to the preset conditions in the local configuration file and maintain silent updates of the configuration file. The configuration file can improve the flexibility of the shared application in sending instructions for consistent color for all pages, thereby facilitating unified management of the shared application.

[0077] In some embodiments, further comprising:

[0078] The color layers are uniformly marked, and in response to the content of the consistent instruction of all color pages being a close instruction, the marked color layers are removed.

[0079] If you add a color layer to a shared application using the first method and tag the added layer, to remove the added color layer, call the viewWithTag() method on the root window to obtain the added color layer, and then call removeFromSuperView() on the added color layer to directly remove it. The tag for the added color layer can be a number, a word, or other uniform symbol.

[0080] In an exemplary embodiment, a color layer is added by the first method and is marked with the number 5. When the full page color consistency instruction is received as a close instruction, the viewWithTag() method is called on the root window to remove the layer marked with 5.

[0081] If you add a color layer to a shared application using the second method and tag the added layer with a key-value pair, you can remove the added color layer using the valueForKey() method to remove the tagged color layer. The key-value tagging method can use setValue(_,forKeyPath:) and the tag can be any tag.

[0082] In an exemplary embodiment, a color layer is added through the second method, and the color layer is named xlayer. Taking a and b as labels, when adding a color layer, the method xlayer.setValue(a,forKeyPath:b) is added to the added color layer. When removing the added color layer, the layers marked "a" and "b" are removed through the valueForKey() method.

[0083] According to the technical solution provided in the embodiment of the present application, when removing an added window, there is no need to traverse all subviews of the root window, which reduces the amount of calculation, ensures the high performance of the shared application, and improves the user experience.

[0084] Figure 3 This is a flow chart of a display control method provided by an embodiment of the present application. Figure 3As shown, after receiving the full page color consistency instruction, the content of the instruction is judged. If it is an open instruction, the top layer of the shared application view is obtained to form a collection. The array in the collection is traversed according to the full page color consistency instruction, and a color layer is added to the top layer of the shared application view through the UIView or CALayer method. If the content of the instruction is a close instruction and the color layer is added through the UIView method, the array of the subViews attribute is traversed, and the layer is removed by calling removeFromSuperView(), or the added color layer is marked when adding the layer, and viewWithTag() is called to remove the layer. If the content of the instruction is a close instruction and the color layer is added through the CALayer method, the sublayers attribute in the layer attribute of the root window is accessed to determine the added color graphic, and removeFromSuperView() is called to remove the layer, or a key-value pair is used to mark the color layer when adding it, and the valueForKey() method is called to remove the added color layer when removing the color layer.

[0085] In some embodiments, the full page color consistency instruction includes display control parameters, color parameters and all display parameters are determined based on user instructions, or based on server instructions, or based on files pre-configured in the terminal.

[0086] The full page color consistency instruction supports the configuration of any color and transparency, and also supports the execution of the instruction on part of the display page, and supports the partial execution of the instruction on the current display page. Among them, the specific configuration data can be determined based on the instruction sent by the user, or the server interface data, or by reading the configuration file pre-configured by the application. For example, if the user changes the full page color consistency instruction to white and the transparency to 50%, the full bright page color consistency instruction will add a color layer based on the white and 50% transparency changed by the user.

[0087] In an embodiment of the present application, the display control method provided is to add a color layer on the root view to implement the color consistency instruction for the entire page, so the shape and size of the color layer can be adjusted and set.

[0088] The method for executing the full page color consistency instruction on some display pages is as follows:

[0089] Mark the display pages that need to execute the full page color consistency instruction. For easy management, the marked display pages can be stored in a memory collection. When a shared application enters the marked display page, the execution of the turn-on / turn-off instruction is determined based on the activation status of the full page color consistency instruction of the current shared application.

[0090] In an exemplary embodiment of the present application, taking the case where a display page that requires execution of a full page color consistency instruction is marked and the current shared application is closed as an example, when the shared application enters the marked page, the display page system function is called. The system function includes at least one of the following:

[0091] The view controller is about to layout sub-controllers using the function viewWillLayoutSubviews(); or the view controller has completed the layout of sub-controllers using the function viewDidLayoutSubviews(); or the view is about to enter the window period using the function viewWillAppear(); or the view has already entered the window period using the function viewDidAppear(). Rewrite the called functions and write the corresponding logic for the start instruction.

[0092] Similarly, if the current shared application is in the open state, the calling function is rewritten and the corresponding logic of the closing instruction is written.

[0093] The method for executing the full page color consistency instruction on a part of the currently displayed page is as follows:

[0094] Adjust the shape of the added color layer according to the requirements of the shared application. The color layer can be adjusted to any shape and placed at any position on the display page. Different display pages can also be cropped into different color layer shapes. For example, on page A, the color layer settings are consistent with the position, width, and length of the terminal screen. That is, after the shared application opens the full page color consistency instruction, the display page fully implements the full page color consistency instruction.

[0095] On page B, the added color layer is set to a circle and located in the center of the displayed page. The full page color consistency instruction is only executed in the circular part;

[0096] On page C, the color layer is set to the shape of a face. It is necessary to execute the full page color consistency instruction for the face part, and add the iOS Core Image framework (a technology that provides processing and analysis for static images and videos) on the display page to provide a face recognition filter to obtain the position, width and height of the face on the current screen. In the embodiment of the present application, the acquired face position information is referred to as rect, and rect is used to store parameters that appear in pairs. The added color layer is adjusted to the position and size of rect, and the full page color consistency instruction is executed. Among them, one or more facial organs can also be set as rect separately, and the full page color consistency instruction is executed. If the mosaic filter and blur filter provided by Core Image are added to the added color layer, a mosaic or blur effect of the face can also be achieved;

[0097] On page D, you need to add a logo watermark according to business needs. Add iOS's Core Image filter to the added color layer and set the filter to the watermark shape. When adding a color layer to the shared application, add it to the currently displayed page.

[0098] According to the technical solution provided in the embodiment of the present application, it is possible to execute full-page color consistency instructions according to user customization, server updates, or preset conditions, thereby improving the flexibility of shared applications in applying full-page color consistency instructions, improving user experience, and facilitating management by shared application developers.

[0099] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0100] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0101] Figure 4 Schematic diagram of a display control device provided in an embodiment of the present application. Figure 4 As shown, the display control device 400 includes a receiving module 401, a determining module 402, an acquiring module 403, a storing module 404, and a display module 405:

[0102] The receiving module 401 is configured to receive a full page color consistency instruction, the full page color consistency instruction is used to instruct the display page of the shared application to have consistent color, and the full page color consistency instruction includes color parameters and display parameters;

[0103] The determination module 402 is configured to determine the content of the instruction for consistent color of all pages;

[0104] The acquisition module 403 is configured to acquire the top layer of the shared application view if the content of the full page color consistency instruction is an enable instruction;

[0105] The storage module 404 is configured to create a collection and store the top level of the shared application view in the collection in an array format;

[0106] The display module 405 is configured to traverse the array in the collection based on the full page color consistency instruction, add a color layer to the top layer of the shared application view, and display the color layer and the top layer of the shared application view on the display page of the shared application at the same time.

[0107] In some embodiments, the display control device 400 is further configured to:

[0108] If the content of the instruction for consistent color for all pages is a close instruction, traverse the array in the collection and remove the color layer.

[0109] In some embodiments, before receiving the instruction to make all pages consistent in color, the receiving module 401 is configured to:

[0110] In response to the start of the shared application, accessing the server interface and receiving instructions from the server;

[0111] Generate color consistency instructions for all pages based on the server's instructions.

[0112] In some embodiments, before receiving the instruction to make all pages consistent in color, the receiving module 401 is further configured to:

[0113] In response to the instruction sent by the user, an instruction for consistent color of all pages is generated.

[0114] In some embodiments, before receiving the instruction to make all pages consistent in color, the receiving module 401 is further configured to:

[0115] In response to the startup of the shared application meeting a preset condition, a full page color consistency instruction is generated.

[0116] In some embodiments, the display control device 400 is further configured to:

[0117] Mark the color layers uniformly, and in response to the full page color consistency instruction being a close instruction, remove the marked color layers.

[0118] In some embodiments, the color parameters and display parameters are determined based on user instructions, or based on instructions from a server, or based on a file pre-configured in the terminal.

[0119] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0120] Figure 5 Schematic diagram of the electronic device 5 provided in the embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable by the processor 501. When the processor 501 executes the computer program 503, the steps of the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0121] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include but is not limited to a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 This is merely an example of the electronic device 5 and does not limit the electronic device 5 . The electronic device 5 may include more or fewer components than shown in the figure, or different components.

[0122] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0123] The memory 502 can be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 502 can also be an external storage device of the electronic device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. The memory 502 can also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0124] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0125] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0126] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A display control method, characterized in that: The method comprises: receiving a color consistency instruction for all pages, wherein the color consistency instruction for all pages is used to indicate that the display page color of the shared application is consistent, and the color consistency instruction for all pages includes a color parameter and a display parameter; Determining the content of the full page color consistency instruction; If the content of the full page color consistency instruction is an opening instruction, obtaining the top layer of the shared application view, the top layer of the shared application view is the root window; Create a collection, and store the top layer of the shared application view in the collection in an array form; Based on the full page color consistency instruction, traverse the array in the collection, add a color layer on the top layer of the shared application view, and display the color layer and the top layer of the shared application view on the display page of the shared application at the same time; The step of adding a color layer on top of the shared application view includes: Calling a first system function on the root window to add a subview on the parent view, where the parent view is the top layer of the shared application view and the subview is a color layer; or, A second system function is called on the root window to cover the color layer on the top layer of the shared application view.

2. The method according to claim 1, characterized in that The method further comprises: If the content of the full page color consistency instruction is a close instruction, the array in the collection is traversed to remove the color layer.

3. The method according to claim 1, characterized in that Before receiving the full page color consistency instruction, the method includes: In response to the start of the shared application, accessing a server interface and receiving a command from the server; Based on the instruction of the server, the full page color consistency instruction is generated.

4. The method according to claim 1, characterized in that: Before receiving the full page color consistency instruction, the method further includes: In response to an instruction sent by a user, the full page color consistency instruction is generated.

5. The method according to claim 1, characterized in that Before receiving the full page color consistency instruction, the method further includes: In response to the startup of the shared application satisfying a preset condition, the full page color consistency instruction is generated.

6. The method according to claim 1, characterized in that The method further comprises: The color layers are uniformly marked, and in response to the full page color consistency instruction being a closing instruction, the marked color layers are removed.

7. The method according to any one of claims 1 to 6, characterized in that The color parameter and the display parameter are determined based on a user instruction, or based on an instruction from a server, or based on a file pre-configured in a terminal.

8. A display control device, characterized in that: include: A receiving module is configured to receive a full page color consistency instruction, wherein the full page color consistency instruction is used to indicate that the display page color of the shared application is consistent, and the full page color consistency instruction includes a color parameter and a display parameter; A determination module is configured to determine the content of the full page color consistency instruction; an acquisition module, configured to acquire the top layer of the shared application view if the content of the full page color consistency instruction is an opening instruction, wherein the top layer of the shared application view is a root window; A storage module, configured to create a collection, and store the top layer of the shared application view in the collection in an array form; a display module configured to traverse the array in the collection, add a color layer on the top layer of the shared application view, and simultaneously display the color layer and the top layer of the shared application view on the display page of the shared application; Adding a color layer on the top layer of the shared application view includes: calling a first system function on the root window to add a child view on the parent view, wherein the parent view is the top layer of the shared application view, and the child view is the color layer; or, calling a second system function on the root window to cover the color layer on the top layer of the shared application view.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Watermark generation method and device

    CN109784011A