Nothing Special   »   [go: up one dir, main page]

CN109684020B - Theme switching method, device and computer readable storage medium - Google Patents

Theme switching method, device and computer readable storage medium Download PDF

Info

Publication number
CN109684020B
CN109684020B CN201811615170.5A CN201811615170A CN109684020B CN 109684020 B CN109684020 B CN 109684020B CN 201811615170 A CN201811615170 A CN 201811615170A CN 109684020 B CN109684020 B CN 109684020B
Authority
CN
China
Prior art keywords
theme
pack
resource
target application
switching
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.)
Active
Application number
CN201811615170.5A
Other languages
Chinese (zh)
Other versions
CN109684020A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201811615170.5A priority Critical patent/CN109684020B/en
Publication of CN109684020A publication Critical patent/CN109684020A/en
Application granted granted Critical
Publication of CN109684020B publication Critical patent/CN109684020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a theme switching method, equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program. The humanized theme switching scheme is realized, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.

Description

Theme switching method, device and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a theme switching method, apparatus, and computer readable storage medium.
Background
In the prior art, the theme switching or setting mode of the application program of the terminal device is complicated, for example, when the application program is faced with the need of switching between daytime and nighttime modes, the application program is usually realized by switching different theme.xml files, that is, two different sets of the me files need to be configured, the configuration mode is complicated, only a developer can understand the configuration mode, and the operation difficulty and the learning difficulty are relatively high for a designer and a common user. Therefore, in the prior art, the theme replacement scheme aiming at the application program is not perfect enough, the operation difficulty is high, and the user experience is poor.
Disclosure of Invention
In order to solve the above technical drawbacks in the prior art, the present invention provides a theme switching method, which includes:
receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack;
the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
redirecting the theme resource to a second theme pack through the theme framework;
and extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
Optionally, the receiving a theme switching broadcast sent by the target application, where the theme switching broadcast includes a mode field of a first theme pack, includes:
presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same resource information;
and receiving a theme switching instruction, and generating the theme switching broadcast through the target application program.
Optionally, the theme framework triggered by the theme switch broadcast intercepts a theme resource corresponding to the mode field, including:
Identifying a mode field of the first theme pack according to the theme switched broadcast;
determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
and intercepting a first theme resource corresponding to the mode field through the theme framework.
Optionally, the redirecting the theme resource to the second theme pack through the theme framework includes:
matching a second topic resource identical to the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
redirecting the theme resource to the second theme pack.
Optionally, the extracting the theme resource in the second theme pack and loading the theme resource into the target application includes:
extracting topic resources in the second topic package;
and loading the theme resource to the target application program in combination with the mode field.
The invention also proposes a theme switching device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program realizing when executed by said processor:
Receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack;
the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
redirecting the theme resource to a second theme pack through the theme framework;
and extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
Optionally, the computer program is implemented when executed by the processor:
presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same resource information;
and receiving a theme switching instruction, and generating the theme switching broadcast through the target application program.
Optionally, the computer program is implemented when executed by the processor:
identifying a mode field of the first theme pack according to the theme switched broadcast;
determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
and intercepting a first theme resource corresponding to the mode field through the theme framework.
Optionally, the computer program is implemented when executed by the processor:
matching a second topic resource identical to the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
redirecting the theme resource to the second theme pack;
extracting topic resources in the second topic package;
and loading the theme resource to the target application program in combination with the mode field.
The present invention also proposes a computer-readable storage medium having stored thereon a theme switching program which, when executed by a processor, implements the steps of the theme switching method as set forth in any one of the above.
The subject switching method, the device and the computer readable storage medium are implemented by receiving a subject switching broadcast sent by a target application program, wherein the subject switching broadcast comprises a mode field of a first subject packet; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program. The humanized theme switching scheme is realized, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flow chart of a first embodiment of the subject switching method;
FIG. 4 is a flow chart of a second embodiment of the subject matter switching method;
FIG. 5 is a flow chart of a third embodiment of the subject matter switching method;
FIG. 6 is a flow chart of a fourth embodiment of the subject matter switching method;
fig. 7 is a flowchart of a fifth embodiment of the subject switching method.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (PersonalDigital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Example 1
Fig. 3 is a flowchart of a first embodiment of the subject switching method. A theme switching method, the method comprising:
s1, receiving a theme switching broadcast sent by a target application program, wherein the theme switching broadcast comprises a mode field of a first theme pack;
s2, the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
s3, redirecting the theme resource to a second theme pack through the theme framework;
and S4, extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
In this embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
Specifically, in the present embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack. In this embodiment, the system layer receives the theme switching broadcast sent by the target application program, optionally, the user generates the theme switching broadcast by operating in the target application program, and the user may adjust the theme of the compensation application program in the system, thereby generating the theme switching broadcast.
Specifically, in this embodiment, the theme framework is triggered by the theme switch broadcast to intercept the theme resource corresponding to the mode field. The first theme includes a mode field corresponding to the target application program, and it can be understood that the mode field indicates information of the theme. In this embodiment, when a target application needs to switch a theme, a theme framework is invoked to intercept a theme resource corresponding to the mode field through a theme switching broadcast received by a system layer, where the theme resource includes a color value, a picture, and other resources affecting a color mode used in the target application.
Specifically, in this embodiment, the theme resource is redirected to the second theme pack through the theme framework. In this embodiment, after the theme resources of the first theme pack are intercepted, the theme resources of the second theme pack are replaced.
Specifically, in this embodiment, theme resources in the second theme pack are extracted and loaded into the target application. And loading the theme resources in the second theme pack to the target application program, so that the theme pack of the target application program is replaced. It can be appreciated that, after the target application program is switched to the second theme pack, if the target application program needs to be switched back to the first theme pack, the theme switch broadcast is sent to the theme framework, the theme framework intercepts the second theme pack and then relocates the second theme pack to the first theme pack, so that the target application program is switched back to the first theme pack from the second theme pack.
The method has the advantages that the theme switching broadcast sent by the target application program is received, wherein the theme switching broadcast comprises a mode field of a first theme pack; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program. The humanized theme switching scheme is realized, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example two
Fig. 4 is a flowchart of a second embodiment of the theme switching method according to the present invention, and based on the above embodiment, the receiving a theme switching broadcast sent by a target application, where the theme switching broadcast includes a mode field of a first theme pack, and includes:
s11, presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same resource information;
and S12, receiving a theme switching instruction, and generating the theme switching broadcast through the target application program.
In this embodiment, first, a second theme pack different from the first theme pack is preset in a system, where the first theme pack and the second theme pack have the same resource information; then, a theme switching instruction is received, and the theme switching broadcast is generated through the target application program.
Specifically, in the present embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack. In this embodiment, the system layer receives the theme switching broadcast sent by the target application program, optionally, the user generates the theme switching broadcast by operating in the target application program, and the user may adjust the theme of the compensation application program in the system, thereby generating the theme switching broadcast.
Optionally, a second theme pack different from the first theme pack is preset in the system, wherein the resource information of the first theme pack and the resource information of the second theme pack are partially the same and partially different, that is, when the replacement is triggered, part of the resources are not replaced;
optionally, a centralized configuration instruction of the user at the system layer is received, a theme switching instruction is sent to a plurality of target application programs through the system layer, and then the theme switching broadcast is generated through each target application program.
The method has the advantages that a second theme pack different from the first theme pack is preset in the system, wherein the first theme pack and the second theme pack have the same resource information; then, a theme switching instruction is received, and the theme switching broadcast is generated through the target application program. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example III
Fig. 5 is a flowchart of a third embodiment of the theme switching method according to the present invention, based on the foregoing embodiment, the theme resource corresponding to the mode field is intercepted by the theme switch broadcast triggering theme framework, including:
S21, identifying a mode field of the first theme pack according to the theme switched broadcast;
s22, determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
s23, intercepting a first theme resource corresponding to the mode field through the theme framework.
In this embodiment, first, a mode field identifying the first theme pack is broadcast according to the theme switched; then, determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack; and finally, intercepting a first theme resource corresponding to the mode field through the theme framework.
Specifically, in this embodiment, the theme framework is triggered by the theme switch broadcast to intercept the theme resource corresponding to the mode field. The first theme includes a mode field corresponding to the target application program, and it can be understood that the mode field indicates information of the theme. In this embodiment, when a target application needs to switch a theme, a theme framework is invoked to intercept a theme resource corresponding to the mode field through a theme switching broadcast received by a system layer, where the theme resource includes a color value, a picture, and other resources affecting a color mode used in the target application.
Optionally, if the resource information of the first theme pack is partially the same as or partially different from the resource information of the second theme pack, intercepting the first theme resource corresponding to the mode field through the theme framework, where the intercepted first theme resource includes the same part as the resource information, and discharging the part different from the resource information, thereby implementing local switching of the theme switching mode and saving system resource consumption.
The embodiment has the beneficial effects that the mode field of the first theme pack is identified through the theme switched broadcast; then, determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack; and finally, intercepting a first theme resource corresponding to the mode field through the theme framework. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example IV
Fig. 6 is a flowchart of a fourth embodiment of the theme switching method according to the present invention, based on the foregoing embodiment, the redirecting the theme resource to the second theme pack through the theme framework includes:
S31, matching a second topic resource which is the same as the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
s32, redirecting the theme resource to the second theme pack.
In this embodiment, first, a second topic resource identical to the mode field is matched in the system through the topic framework, where the second topic resource belongs to the second topic; the theme resource is then redirected to the second theme pack.
Specifically, in this embodiment, the theme resource is redirected to the second theme pack through the theme framework. In this embodiment, after the theme resources of the first theme pack are intercepted, the theme resources of the second theme pack are replaced.
Optionally, if the version of the target application program is upgraded, detecting whether the version upgrade changes the theme resource package, and if so, backing up the original theme resource package, so that the user can still switch back to the theme resource corresponding to the original version in the new version of the target application program.
The method has the advantages that the second theme resource which is the same as the mode field is matched in the system through the theme framework, wherein the second theme resource belongs to the second theme; the theme resource is then redirected to the second theme pack. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example five
Fig. 7 is a flowchart of a fifth embodiment of the theme switching method according to the present invention, based on the foregoing embodiment, the extracting theme resources in the second theme pack and loading the theme resources into the target application includes:
s41, extracting theme resources in the second theme pack;
s42, loading the theme resource to the target application program by combining the mode field.
In this embodiment, first, theme resources in the second theme pack are extracted; then, the theme resource is loaded into the target application in conjunction with the mode field.
Specifically, in this embodiment, theme resources in the second theme pack are extracted and loaded into the target application. And loading the theme resources in the second theme pack to the target application program, so that the theme pack of the target application program is replaced. It can be appreciated that, after the target application program is switched to the second theme pack, if the target application program needs to be switched back to the first theme pack, the theme switch broadcast is sent to the theme framework, the theme framework intercepts the second theme pack and then relocates the second theme pack to the first theme pack, so that the target application program is switched back to the first theme pack from the second theme pack.
Optionally, extracting a topic resource in the second topic package, where if the resource information of the first topic package and the resource information of the second topic package are partially the same and partially different, extracting a topic resource with the same resource information in the second topic package;
optionally, extracting the resource information editing preview interface of a part of the interactive interface in the target application program through the system layer, and displaying the visualized resource information replacing editing options to the user, thereby realizing the custom configuration of the theme pack of the target application program.
The beneficial effect of this embodiment is that by extracting the theme resources in the second theme pack; then, the theme resource is loaded into the target application in conjunction with the mode field. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example six
Based on the above embodiments, the present invention also proposes a theme switching device, the device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program implementing when executed by the processor:
Receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack;
the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
redirecting the theme resource to a second theme pack through the theme framework;
and extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
In this embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program.
Specifically, in the present embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack. In this embodiment, the system layer receives the theme switching broadcast sent by the target application program, optionally, the user generates the theme switching broadcast by operating in the target application program, and the user may adjust the theme of the compensation application program in the system, thereby generating the theme switching broadcast.
Specifically, in this embodiment, the theme framework is triggered by the theme switch broadcast to intercept the theme resource corresponding to the mode field. The first theme includes a mode field corresponding to the target application program, and it can be understood that the mode field indicates information of the theme. In this embodiment, when a target application needs to switch a theme, a theme framework is invoked to intercept a theme resource corresponding to the mode field through a theme switching broadcast received by a system layer, where the theme resource includes a color value, a picture, and other resources affecting a color mode used in the target application.
Specifically, in this embodiment, the theme resource is redirected to the second theme pack through the theme framework. In this embodiment, after the theme resources of the first theme pack are intercepted, the theme resources of the second theme pack are replaced.
Specifically, in this embodiment, theme resources in the second theme pack are extracted and loaded into the target application. And loading the theme resources in the second theme pack to the target application program, so that the theme pack of the target application program is replaced. It can be appreciated that, after the target application program is switched to the second theme pack, if the target application program needs to be switched back to the first theme pack, the theme switch broadcast is sent to the theme framework, the theme framework intercepts the second theme pack and then relocates the second theme pack to the first theme pack, so that the target application program is switched back to the first theme pack from the second theme pack.
The method has the advantages that the theme switching broadcast sent by the target application program is received, wherein the theme switching broadcast comprises a mode field of a first theme pack; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program. The humanized theme switching scheme is realized, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example seven
Based on the above embodiments, the computer program when executed by the processor implements:
presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same resource information;
and receiving a theme switching instruction, and generating the theme switching broadcast through the target application program.
In this embodiment, first, a second theme pack different from the first theme pack is preset in a system, where the first theme pack and the second theme pack have the same resource information; then, a theme switching instruction is received, and the theme switching broadcast is generated through the target application program.
Specifically, in the present embodiment, first, a theme switching broadcast transmitted by a target application is received, wherein the theme switching broadcast includes a mode field of a first theme pack. In this embodiment, the system layer receives the theme switching broadcast sent by the target application program, optionally, the user generates the theme switching broadcast by operating in the target application program, and the user may adjust the theme of the compensation application program in the system, thereby generating the theme switching broadcast.
Optionally, a second theme pack different from the first theme pack is preset in the system, wherein the resource information of the first theme pack and the resource information of the second theme pack are partially the same and partially different, that is, when the replacement is triggered, part of the resources are not replaced;
optionally, a centralized configuration instruction of the user at the system layer is received, a theme switching instruction is sent to a plurality of target application programs through the system layer, and then the theme switching broadcast is generated through each target application program.
The method has the advantages that a second theme pack different from the first theme pack is preset in the system, wherein the first theme pack and the second theme pack have the same resource information; then, a theme switching instruction is received, and the theme switching broadcast is generated through the target application program. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example eight
Based on the above embodiments, the computer program when executed by the processor implements:
identifying a mode field of the first theme pack according to the theme switched broadcast;
determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
and intercepting a first theme resource corresponding to the mode field through the theme framework.
In this embodiment, first, a mode field identifying the first theme pack is broadcast according to the theme switched; then, determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack; and finally, intercepting a first theme resource corresponding to the mode field through the theme framework.
Specifically, in this embodiment, the theme framework is triggered by the theme switch broadcast to intercept the theme resource corresponding to the mode field. The first theme includes a mode field corresponding to the target application program, and it can be understood that the mode field indicates information of the theme. In this embodiment, when a target application needs to switch a theme, a theme framework is invoked to intercept a theme resource corresponding to the mode field through a theme switching broadcast received by a system layer, where the theme resource includes a color value, a picture, and other resources affecting a color mode used in the target application.
Optionally, if the resource information of the first theme pack is partially the same as or partially different from the resource information of the second theme pack, intercepting the first theme resource corresponding to the mode field through the theme framework, where the intercepted first theme resource includes the same part as the resource information, and discharging the part different from the resource information, thereby implementing local switching of the theme switching mode and saving system resource consumption.
The embodiment has the beneficial effects that the mode field of the first theme pack is identified through the theme switched broadcast; then, determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack; and finally, intercepting a first theme resource corresponding to the mode field through the theme framework. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Example nine
Based on the above embodiments, the computer program when executed by the processor implements:
matching a second topic resource identical to the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
redirecting the theme resource to the second theme pack;
extracting topic resources in the second topic package;
and loading the theme resource to the target application program in combination with the mode field.
In this embodiment, first, a second topic resource identical to the mode field is matched in the system through the topic framework, where the second topic resource belongs to the second topic; the theme resource is then redirected to the second theme pack.
Specifically, in this embodiment, the theme resource is redirected to the second theme pack through the theme framework. In this embodiment, after the theme resources of the first theme pack are intercepted, the theme resources of the second theme pack are replaced.
Optionally, if the version of the target application program is upgraded, detecting whether the version upgrade changes the theme resource package, and if so, backing up the original theme resource package, so that the user can still switch back to the theme resource corresponding to the original version in the new version of the target application program.
In this embodiment, extracting a theme resource in the second theme pack; then, the theme resource is loaded into the target application in conjunction with the mode field.
Specifically, in this embodiment, theme resources in the second theme pack are extracted and loaded into the target application. And loading the theme resources in the second theme pack to the target application program, so that the theme pack of the target application program is replaced. It can be appreciated that, after the target application program is switched to the second theme pack, if the target application program needs to be switched back to the first theme pack, the theme switch broadcast is sent to the theme framework, the theme framework intercepts the second theme pack and then relocates the second theme pack to the first theme pack, so that the target application program is switched back to the first theme pack from the second theme pack.
Optionally, extracting a topic resource in the second topic package, where if the resource information of the first topic package and the resource information of the second topic package are partially the same and partially different, extracting a topic resource with the same resource information in the second topic package;
optionally, extracting the resource information editing preview interface of a part of the interactive interface in the target application program through the system layer, and displaying the visualized resource information replacing editing options to the user, thereby realizing the custom configuration of the theme pack of the target application program.
The beneficial effect of this embodiment is that by extracting the theme resources in the second theme pack; then, the theme resource is loaded into the target application in conjunction with the mode field. The method and the device realize a more humanized theme switching scheme, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
Examples ten
Based on the above embodiments, the present invention also proposes a computer-readable storage medium, on which a theme switching program is stored, which when executed by a processor, implements the steps of the theme switching method as set forth in any one of the above.
The subject switching method, the device and the computer readable storage medium are implemented by receiving a subject switching broadcast sent by a target application program, wherein the subject switching broadcast comprises a mode field of a first subject packet; then, the theme framework is triggered by the theme switching broadcast to intercept the theme resources corresponding to the mode field; then, redirecting the theme resource to a second theme pack through the theme framework; and finally, extracting the theme resources in the second theme pack and loading the theme resources into the target application program. The humanized theme switching scheme is realized, so that the theme switching mode in the application program is more direct and convenient, the use difficulty of a user is reduced, and the user experience is enhanced.
It should be noted that, in this document, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (5)

1. A method of theme switching, the method comprising:
receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack;
the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
redirecting the theme resource to a second theme pack through the theme framework;
extracting theme resources in the second theme pack and loading the theme resources into the target application program;
wherein,,
receiving, by a system layer, a theme switching broadcast sent by the target application, wherein the theme switching broadcast is generated by a user operating within the target application, or is generated by a user adjusting a theme of the target application within a system;
The theme resource comprises a color value and a picture resource used in the target application program;
presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same part and different parts of resource information;
receiving a centralized configuration instruction of a user in the system layer, sending a theme switching instruction to a plurality of target application programs through the system layer, and generating the theme switching broadcast through each target application program;
the method for triggering the theme framework to intercept the theme resources corresponding to the mode field by the theme switching broadcast includes:
identifying a mode field of the first theme pack according to the theme switched broadcast;
determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
intercepting a first theme resource corresponding to the mode field through the theme framework;
wherein,,
if the resource information of the first theme pack is partially the same as that of the resource information of the second theme pack and partially different from the resource information of the first theme pack, intercepting the first theme resource corresponding to the mode field through the theme framework, wherein the intercepted first theme resource comprises the same part as the resource information and excludes the part different from the resource information so as to realize the local switching of the theme switching mode;
The extracting the theme resource in the second theme pack and loading the theme resource into the target application program includes:
extracting topic resources in the second topic package;
loading the subject resource to the target application in combination with the mode field;
wherein,,
and extracting the theme resources in the second theme pack, wherein if the first theme pack is partially identical to the resource information of the second theme pack and partially different from the resource information of the second theme pack, extracting the theme resources with identical resource information in the second theme pack.
2. The theme switching method according to claim 1, wherein the redirecting the theme resource to the second theme pack through the theme framework includes:
matching a second topic resource identical to the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
redirecting the theme resource to the second theme pack.
3. A theme switching device, the device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program implementing when executed by the processor:
Receiving a theme switching broadcast transmitted by a target application, wherein the theme switching broadcast includes a mode field of a first theme pack;
the theme framework is triggered by the theme switching broadcast to intercept theme resources corresponding to the mode field;
redirecting the theme resource to a second theme pack through the theme framework;
extracting theme resources in the second theme pack and loading the theme resources into the target application program;
wherein,,
receiving, by a system layer, a theme switching broadcast sent by the target application, wherein the theme switching broadcast is generated by a user operating within the target application, or is generated by a user adjusting a theme of the target application within a system;
the theme resource comprises a color value and a picture resource used in the target application program;
presetting a second theme pack different from the first theme pack in a system, wherein the first theme pack and the second theme pack have the same part and different parts of resource information;
receiving a centralized configuration instruction of a user in the system layer, sending a theme switching instruction to a plurality of target application programs through the system layer, and generating the theme switching broadcast through each target application program;
The method for triggering the theme framework to intercept the theme resources corresponding to the mode field by the theme switching broadcast includes:
identifying a mode field of the first theme pack according to the theme switched broadcast;
determining a first theme resource corresponding to the mode field, wherein the first theme resource belongs to the first theme pack;
intercepting a first theme resource corresponding to the mode field through the theme framework;
wherein,,
if the resource information of the first theme pack is partially the same as that of the resource information of the second theme pack and partially different from the resource information of the first theme pack, intercepting the first theme resource corresponding to the mode field through the theme framework, wherein the intercepted first theme resource comprises the same part as the resource information and excludes the part different from the resource information so as to realize the local switching of the theme switching mode;
the extracting the theme resource in the second theme pack and loading the theme resource into the target application program includes:
extracting topic resources in the second topic package;
loading the subject resource to the target application in combination with the mode field;
wherein,,
and extracting the theme resources in the second theme pack, wherein if the first theme pack is partially identical to the resource information of the second theme pack and partially different from the resource information of the second theme pack, extracting the theme resources with identical resource information in the second theme pack.
4. The theme switching device of claim 3, wherein the computer program when executed by the processor implements:
matching a second topic resource identical to the mode field in a system through the topic framework, wherein the second topic resource belongs to the second topic;
redirecting the theme resource to the second theme pack.
5. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a theme switching program which, when executed by a processor, implements the steps of the theme switching method according to claim 1 or 2.
CN201811615170.5A 2018-12-27 2018-12-27 Theme switching method, device and computer readable storage medium Active CN109684020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811615170.5A CN109684020B (en) 2018-12-27 2018-12-27 Theme switching method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811615170.5A CN109684020B (en) 2018-12-27 2018-12-27 Theme switching method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109684020A CN109684020A (en) 2019-04-26
CN109684020B true CN109684020B (en) 2023-08-11

Family

ID=66190707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811615170.5A Active CN109684020B (en) 2018-12-27 2018-12-27 Theme switching method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109684020B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090364A (en) * 2019-12-11 2020-05-01 文思海辉智科科技有限公司 Page style switching method and device, electronic equipment and readable storage medium
CN113835803B (en) * 2021-09-13 2024-04-02 北京字节跳动网络技术有限公司 Application theme display method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915257A (en) * 2015-06-08 2015-09-16 青岛海信移动通信技术股份有限公司 Method and device for replacing theme based on Android system application
CN106469071A (en) * 2015-08-18 2017-03-01 腾讯科技(深圳)有限公司 Application program subject replacement method and device
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915257A (en) * 2015-06-08 2015-09-16 青岛海信移动通信技术股份有限公司 Method and device for replacing theme based on Android system application
CN106469071A (en) * 2015-08-18 2017-03-01 腾讯科技(深圳)有限公司 Application program subject replacement method and device
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system

Also Published As

Publication number Publication date
CN109684020A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109710135A (en) Split screen display available control method, terminal and computer readable storage medium
CN107807767B (en) Communication service processing method, terminal and computer readable storage medium
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN109144705B (en) Application management method, mobile terminal and computer readable storage medium
CN107862217B (en) Position information acquisition method, mobile terminal and computer storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN110020386B (en) Application page sharing method, mobile terminal and computer readable storage medium
CN109389394B (en) Multi-screen payment control method, equipment and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN108984063B (en) Desktop interaction regulation and control method and device and computer readable storage medium
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN109948368B (en) Privacy authority control method, device and computer readable storage medium
CN112423211A (en) Multi-audio transmission control method, equipment and computer readable storage medium
CN109462829B (en) Call transfer method, device and computer readable storage medium
CN109388947B (en) Background management method, device and computer readable storage medium
CN109683796B (en) Interaction control method, equipment and computer readable storage medium
CN109375982B (en) Mobile terminal desktop icon layout method and device, terminal and readable storage medium
CN109521979B (en) Display control method, terminal and computer-readable storage medium
CN112947831B (en) Screen-throwing reverse control method, mobile terminal and computer readable storage medium
CN112015508B (en) Screen-throwing interaction control method, equipment and computer-readable storage medium
CN114756187A (en) Screen-casting video image processing method and equipment and computer readable storage medium
CN110287381B (en) Page control node searching method, terminal and computer readable storage medium
CN109144747B (en) Data processing method, terminal and computer readable storage medium
CN109543172B (en) Editing object regulation and control method, equipment and computer readable storage medium

Legal Events

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