CN113835596A - Icon processing method, device and equipment - Google Patents

Icon processing method, device and equipment Download PDF

Info

Publication number
CN113835596A
CN113835596A CN202010580364.7A CN202010580364A CN113835596A CN 113835596 A CN113835596 A CN 113835596A CN 202010580364 A CN202010580364 A CN 202010580364A CN 113835596 A CN113835596 A CN 113835596A
Authority
CN
China
Prior art keywords
icon
identifier
png
graph
format
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.)
Pending
Application number
CN202010580364.7A
Other languages
Chinese (zh)
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.)
TD Tech Ltd
Original Assignee
TD Tech 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 TD Tech Ltd filed Critical TD Tech Ltd
Priority to CN202010580364.7A priority Critical patent/CN113835596A/en
Publication of CN113835596A publication Critical patent/CN113835596A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

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

Abstract

The embodiment of the application provides an icon processing method, an icon processing device and icon processing equipment, the method comprises the steps of judging whether an icon corresponding to a resource is in an svg format, if so, replacing the icon with a png format identifier, wherein the png format identifier and the icon identifier are the same identifier, further obtaining a png image corresponding to the png format identifier, replacing the svg image corresponding to the icon with the png image, loading and displaying the png image in a user interface, and accordingly, customizing the user interface based on the png format image, because the png format image can be modified when the icon runs, the replacement mode is flexible, each application does not need to generate an overlay apk, the target apk resource is replaced by adding the new apk resource, the direct replacement can be carried out, the replacement process is simple, and various styles can be dynamically switched according to needs, is suitable for application.

Description

Icon processing method, device and equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an icon processing method, device and equipment.
Background
At present, User Interfaces (UI) are competitive, and mobile terminal manufacturers customize the UI of the mobile terminals more or less to meet various requirements of users.
In the user interface, an icon of application software is one of the main displayed elements, and in the user interface, a large number of application software icons using scalable vector graphics (svg) vector graphics are displayed, taking the Android system as an example. When user interfaces of Android systems are customized by various mobile terminal manufacturers, icons of original svg vector diagrams are generally replaced in a compiling replacement or Overlay mode. The Overlay mode comprises a static Overlay and a dynamic Overlay.
However, the existing icon replacement method is not flexible, for example, the icon is replaced by a method of replacing at compile time or replacing at a static Overlay, and any modification can not be carried out when the icon runs. Moreover, the existing icon replacement method is complex in replacement process, for example, when an icon is replaced by a dynamic Overlay, each application is required to newly generate an Overlay apk, and replacement of a target apk resource is added in the new apk.
Disclosure of Invention
The embodiment of the application provides an icon processing method, an icon processing device and icon processing equipment, and aims to solve the problems that an existing icon replacing mode is not flexible and a replacing process is complex.
In a first aspect, an embodiment of the present application provides an icon processing method, including:
judging whether the identifier of the icon corresponding to the target resource is in an svg format;
if the identifier of the icon is the identifier in the svg format, replacing the identifier of the icon with an identifier in a portable network graphics (png) format, wherein the identifier in the png format and the identifier of the icon are the same identifier;
acquiring a png graph corresponding to the identifier of the png format;
and replacing the svg graph corresponding to the icon with the png graph.
In one possible design, the obtaining a png map corresponding to the identifier of the png format includes:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
In one possible design, after replacing the svg graph corresponding to the icon with the png graph, the method further includes:
and loading and displaying the png graph on a user interface.
In a possible design, after the determining whether the identifier of the icon corresponding to the target resource is an identifier in an svg format, the method further includes:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
In one possible design, the method further includes:
and if the png graph is not found in the preset resource packet, loading and displaying the svg graph on a user interface.
In a second aspect, an embodiment of the present application provides an icon processing apparatus, including:
the judging module is used for judging whether the identifier of the icon corresponding to the target resource is an identifier in an svg format;
a first replacement module, configured to replace the identifier of the icon with an identifier of a png format if the identifier of the icon is the identifier of the svg format, where the identifier of the png format and the identifier of the icon are the same identifier;
the acquisition module is used for acquiring a png image corresponding to the identifier of the png format;
and the second replacing module is used for replacing the svg graph corresponding to the icon with the png graph.
In one possible design, the obtaining module is specifically configured to:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
In one possible design, the second replacement module is further configured to:
and loading and displaying the png graph on a user interface.
In one possible design, the obtaining module is further configured to:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
the second replacement module is further configured to:
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
In one possible design, the second replacement module is also used for
And if the png graph is not found in the preset resource packet, loading and displaying the svg graph on a user interface.
In a third aspect, an embodiment of the present application provides an icon processing apparatus, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the icon processing method as described above in the first aspect and various possible designs of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the icon processing method according to the first aspect and various possible designs of the first aspect is implemented.
The icon processing method, the icon processing device and the icon processing equipment provided by the embodiment of the application judge whether the identifier of the icon corresponding to the target resource is in an svg format, if so, the identifier of the icon is replaced by the identifier in a png format, wherein the identifier in the png format and the identifier of the icon are the same identifier, further, a png image corresponding to the identifier in the png format is obtained, the svg corresponding to the icon is replaced by the png image, and the png image is loaded and displayed in a user interface, so that the user interface is customized based on the png format image, as the png format image can be modified when the icon runs, the replacement mode is flexible, each application does not need to generate an Overlay apk newly, the replacement of the target apk resource is added in a new apk, the direct replacement can be carried out, the replacement process is simple, and the dynamic switching to various styles can be carried out as required, is suitable for application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic diagram of an icon processing system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an icon processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another icon processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another icon processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an icon processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a basic hardware architecture of an icon processing device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, by taking an Android system as an example, a large number of application software icons using svg vector diagrams are displayed in a user interface. When user interfaces of Android systems are customized by various mobile terminal manufacturers, icons of original svg vector diagrams are generally replaced in a compiling replacement or Overlay mode. The Overlay mode comprises a static Overlay and a dynamic Overlay.
However, the existing icon replacement method is not flexible, for example, the icon is replaced by a method of replacing at compile time or replacing at a static Overlay, and any modification can not be carried out when the icon runs. Moreover, the existing icon replacement method is complex in replacement process, for example, when an icon is replaced by a dynamic Overlay, each application is required to newly generate an Overlay apk, and replacement of a target apk resource is added in the new apk.
Therefore, in view of the above problems, the present application provides an icon processing method, where an svg format picture is modified in a loading process and replaced with a png format picture of the same name, so that a user interface is customized based on the png format picture, and since the png format picture can be modified again when an icon runs, the replacement method is flexible, and it is not necessary to require that each application needs to newly generate an Overlay apk, and a replacement for a target apk resource is added to the new apk, so that the target apk resource can be directly replaced, the replacement process is simple, and the problems that the existing icon replacement method is inflexible and the replacement process is complex are solved.
Optionally, the icon processing method provided in the embodiment of the present application may be applied to the application scenario shown in fig. 1. Fig. 1 only describes one possible application scenario of the icon processing method provided in the embodiment of the present application by way of example, and the application scenario of the icon processing method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1.
FIG. 1 is a schematic diagram of an icon processing system architecture. In fig. 1, the above-described architecture includes at least one of a receiving device 101, a processor 102, and a display device 103.
It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation to the icon processing architecture. In other possible embodiments of the present application, the foregoing architecture may include more or less components than those shown in the drawings, or combine some components, or split some components, or arrange different components, which may be determined according to practical application scenarios, and is not limited herein. The components shown in fig. 2 may be implemented in hardware, software, or a combination of software and hardware.
In a specific implementation process, the receiving apparatus 101 may be an input/output interface, or may be a communication interface, and may be configured to receive information, such as an identifier of an icon corresponding to a target resource.
The processor 102 may modify the svg format picture corresponding to the icon in the loading process, and replace the svg format picture with the png format picture with the same name.
The display device 103 may be used to load and display the above png format pictures and the like on the user interface.
The display device may also be a touch display screen for receiving user instructions while displaying the above-mentioned content to enable interaction with a user.
It should be understood that the processor may be implemented by reading instructions in the memory and executing the instructions, or may be implemented by a chip circuit.
In addition, the system architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that along with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
The icon processing method provided by the embodiment of the application is described in detail below with reference to the accompanying drawings. The execution subject of the method may be the processor 102 in fig. 1. The workflow of the processor 102 mainly includes a first replacement phase and a second replacement phase. In a first replacement phase, the processor 102 replaces the identification in svg format with the identification in png format, where both identifications are the same identification, but in different formats. In the second replacement stage, the processor 102 replaces the svg graph with the png graph, so that the user interface customization is performed based on the png format picture, and the problems that the existing icon replacement mode is not flexible and the replacement process is complex are solved.
The technical solutions of the present application are described below with several embodiments as examples, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flowchart of an icon processing method according to an embodiment of the present disclosure, where an execution subject of the embodiment may be the processor 102 in fig. 1, and a specific execution subject may be determined according to an actual application scenario. As shown in fig. 2, on the basis of the application scenario shown in fig. 1, the icon processing method provided in the embodiment of the present application includes the following steps:
s201: and judging whether the identifier of the icon corresponding to the target resource is in the svg format.
Here, the processor may determine whether the identifier of the icon corresponding to the target resource is an identifier in the svg format when the resource is loaded by calling the system interface loadDrawable by the application. The target resource may be determined according to an actual situation, and this is not particularly limited in the embodiment of the present application. The identifier of the icon can be the name or number of the icon.
For example, taking the identifier of the icon as the name of the icon as an example, the determining whether the identifier of the icon corresponding to the target resource is in the svg format may include:
and judging whether the name format of the icon corresponding to the target resource is the xml format of the svg vector diagram.
S202: and if the mark of the icon is in the svg format, replacing the mark of the icon with a mark in the png format, wherein the mark in the png format and the mark of the icon are the same mark.
Optionally, also taking the identifier of the icon as the name of the icon as an example, if the name of the icon is in svg format, the name of the icon is replaced by a name in png format with the same name, for example.
If the identifier of the icon is the name of the icon, for example, the identifier of the png format and the identifier of the icon are the same identifier, which means that the two identifiers are the same name but different formats.
S203: and acquiring the png graph corresponding to the identifier of the png format.
In some possible embodiments, the obtaining the png graph corresponding to the identifier of the png format may include:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
The preset resource may be preset according to an actual situation, and this is not particularly limited in the embodiment of the present application.
According to the embodiment of the application, the png graph corresponding to the identifier of the png format is searched in the preset resource packet, so that when the png graph is searched, the png graph is obtained from the preset resource packet, the method and the device are simple and convenient, and the normal operation of subsequent processing is ensured.
S204: and replacing the svg graph corresponding to the icon with the png graph.
Here, after replacing the svg map corresponding to the icon with the png map, the method may further include:
and loading and displaying the png graph on a user interface.
Illustratively, the processor may return a drawable object to the loadDrawable, thereby loading and displaying the png graph in the user interface.
The png graph can be modified when the icon runs, the replacement mode is flexible, each application does not need to be required to generate an Overlay apk, the target apk resource can be replaced by adding the replacement to the new apk, the replacement can be directly performed, and the replacement process is simple.
As can be seen from the above description, in the embodiment of the present application, by determining whether the identifier of the icon corresponding to the target resource is in the svg format, and if so, replacing the identifier of the icon with the identifier in the png format, wherein the identifier of the png format and the identifier of the icon are the same identifier, and further, a png graph corresponding to the identifier of the png format is obtained, the svg graph corresponding to the icon is replaced by the png graph, loading and displaying the png graph in a user interface, thereby customizing the user interface based on the png format picture, because the png format picture can be modified when the icon runs, the replacement mode is flexible, each application is not required to generate an Overlay apk, the replacement of the target apk resources is added in the new apk, the target apk resources can be directly replaced, the replacement process is simple, various styles can be dynamically switched according to needs, and the method is suitable for application.
In addition, in the embodiment of the present application, when the png map is searched in a preset resource package, if the png map is searched, the png map is obtained from the preset resource package, and if the png map is not searched, an svg map corresponding to the icon is loaded and displayed on a user interface, as shown in fig. 3, which is a schematic flow diagram of another icon processing method provided in the embodiment of the present application, the method may include:
s301: and judging whether the identifier of the icon corresponding to the target resource is in the svg format.
S302: and if the mark of the icon is in the svg format, replacing the mark of the icon with a mark in the png format, wherein the mark in the png format and the mark of the icon are the same mark.
The steps S301 to S302 are the same as the steps S201 to S202, and are not described herein again.
S303: and searching the png graph corresponding to the identifier of the png format in a preset resource packet.
S304: and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
S305: and replacing the svg graph corresponding to the icon with the png graph, and loading and displaying the png graph on a user interface.
S306: and if the png graph is not found in the preset resource packet, loading and displaying the svg graph corresponding to the icon on a user interface.
Here, if a png graph corresponding to the identifier of the png format is searched, the svg graph corresponding to the icon is replaced by the png graph, so that the png graph is loaded and displayed on a user interface, and the problems that the conventional icon replacement method is inflexible and the replacement process is complicated are solved. And if the png image corresponding to the identifier of the png format is not searched, loading and displaying the svg image corresponding to the icon on a user interface, namely loading and displaying the original image corresponding to the icon on the user interface, so that the icon of the user interface is ensured to be normally displayed and is suitable for application.
In addition, if the png map is not found in the preset resource packet, a corresponding prompt may be performed, so that a relevant person can update the resource in the preset resource packet based on the prompt, so that the png map corresponding to the identifier in the png format can be found next time, and the application requirement is met.
According to the embodiment of the application, two situations that the png graph corresponding to the identifier of the png format can be found or cannot be found are considered, and then different processing is carried out based on the two situations, so that the application is suitable. In addition, when the user interface is customized based on the png format picture, the png format picture can be modified when the icon runs, the replacement mode is flexible, each application does not need to be required to newly generate an Overlay apk, the target apk resource is replaced by adding the new apk resource, the replacement can be directly performed, the replacement process is simple, and the problems that the existing icon replacement mode is inflexible and the replacement process is complex are solved.
In addition, in this embodiment of the present application, after determining whether the identifier of the icon corresponding to the target resource is an identifier in a svg format, if the identifier of the icon is not an identifier in a svg format, a diagram corresponding to the identifier of the icon is obtained, and as shown in fig. 4, a flowchart of another icon processing method provided in this embodiment of the present application is considered, where the method may include:
s401: and judging whether the identifier of the icon corresponding to the target resource is in the svg format.
S402: and if the mark of the icon is in the svg format, replacing the mark of the icon with a mark in the png format, wherein the mark in the png format and the mark of the icon are the same mark.
S403: and acquiring the png graph corresponding to the identifier of the png format.
S404: and replacing the svg graph corresponding to the icon with the png graph, and loading and displaying the png graph on a user interface.
The implementation manners of steps S401 to S404 may refer to the implementation manners of steps S201 to S204, which are not described herein again.
S405: and if the identifier of the icon is not in the svg format, acquiring a graph corresponding to the identifier of the icon.
S406: and loading and displaying the graph corresponding to the identifier of the icon on the user interface.
As can be seen from the above description, in the embodiment of the present application, after determining whether the identifier of the icon corresponding to the target resource is an identifier in an svg format, if so, replacing the svg graph corresponding to the icon with the png graph, so that the png graph is loaded and displayed on the user interface, and the problems that the existing icon replacement method is not flexible and the replacement process is complicated are solved. If not, acquiring the graph corresponding to the identifier of the icon, and further loading and displaying the graph corresponding to the identifier of the icon on the user interface, so that the icon of the user interface is ensured to be normally displayed and is suitable for application.
Fig. 5 is a schematic structural diagram of an icon processing apparatus according to an embodiment of the present application, corresponding to the icon processing method according to the foregoing embodiment. For convenience of explanation, only portions related to the embodiments of the present application are shown. Fig. 5 is a schematic structural diagram of an icon processing apparatus according to an embodiment of the present application. As shown in fig. 5, the icon processing apparatus 50 includes: a judging module 501, a first replacing module 502, an obtaining module 503 and a second replacing module 504. The icon processing device may be the processor itself, or a chip or an integrated circuit that implements the functions of the processor. It should be noted that the division of the determining module, the first replacing module, the obtaining module and the second replacing module is only a division of a logic function, and the determining module, the first replacing module, the obtaining module and the second replacing module may be integrated or independent physically.
The determining module 501 is configured to determine whether an identifier of an icon corresponding to the target resource is an identifier in an svg format.
A first replacing module 502, configured to replace the identifier of the icon with an identifier of a png format if the identifier of the icon is the identifier of the svg format, where the identifier of the png format and the identifier of the icon are the same identifier.
An obtaining module 503, configured to obtain a png graph corresponding to the identifier of the png format.
A second replacing module 504, configured to replace the svg graph corresponding to the icon with the png graph.
In one possible design, the obtaining module 503 is specifically configured to:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
In one possible design, the second replacement module 504 is further configured to:
and loading and displaying the png graph on a user interface.
In one possible design, the obtaining module 503 is further configured to:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
the second replacement module 504 is further configured to:
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
In one possible design, the second replacement module 504 is also used for
And if the png graph is not found in the preset resource packet, loading and displaying the svg graph on a user interface.
The apparatus provided in the embodiment of the present application may be configured to implement the technical solution of the method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again in the embodiment of the present application.
Optionally, fig. 6 schematically provides a possible basic hardware architecture of the icon processing apparatus described herein.
Referring to fig. 6, the icon processing apparatus 600 includes at least one processor 601 and a communication interface 603. Further optionally, a memory 602 and a bus 604 may also be included.
The icon processing apparatus 600 may be a client or a server, and the present application is not particularly limited thereto. In the icon processing apparatus 600, the number of the processors 601 may be one or more, and fig. 6 illustrates only one of the processors 601. Alternatively, the processor 601 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or a Digital Signal Processor (DSP). If the icon processing apparatus 600 has a plurality of processors 601, the types of the plurality of processors 601 may be different, or may be the same. Alternatively, the plurality of processors 601 of the icon processing apparatus 600 may also be integrated into a multi-core processor.
Memory 602 stores computer instructions and data; the memory 602 may store computer instructions and data required to implement the above-described icon processing method provided herein, e.g., the memory 602 stores instructions for implementing the steps of the above-described icon processing method. The memory 602 may be any one or any combination of the following storage media: nonvolatile memory (e.g., Read Only Memory (ROM), Solid State Disk (SSD), hard disk (HDD), optical disk), volatile memory.
The communication interface 603 may provide information input/output for the at least one processor. Any one or any combination of the following devices may also be included: a network interface (e.g., an ethernet interface), a wireless network card, etc. having a network access function.
Optionally, the communication interface 603 may also be used for the icon processing device 600 to communicate data with other computing devices or terminals.
Further alternatively, fig. 6 shows the bus 604 as a thick line. The bus 604 may connect the processor 601 with the memory 602 and the communication interface 603. Thus, via bus 604, processor 601 may access memory 602 and may also interact with other computing devices or terminals using communication interface 603.
In the present application, the icon processing apparatus 600 executes computer instructions in the memory 602, so that the icon processing apparatus 600 implements the icon processing method provided herein, or so that the icon processing apparatus 600 deploys the icon processing apparatus.
From the viewpoint of logical functional division, illustratively, as shown in fig. 6, the memory 602 may include a determining module 501, a first replacing module 502, an obtaining module 503, and a second replacing module 504. The inclusion herein merely refers to that the instructions stored in the memory may, when executed, implement the functions of the determining module, the first replacing module, the obtaining module and the second replacing module, respectively, and is not limited to a physical structure.
The determining module 501 is configured to determine whether an identifier of an icon corresponding to the target resource is an identifier in an svg format.
A first replacing module 502, configured to replace the identifier of the icon with an identifier of a png format if the identifier of the icon is the identifier of the svg format, where the identifier of the png format and the identifier of the icon are the same identifier.
An obtaining module 503, configured to obtain a png graph corresponding to the identifier of the png format.
A second replacing module 504, configured to replace the svg graph corresponding to the icon with the png graph.
In one possible design, the obtaining module 503 is specifically configured to:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
In one possible design, the second replacement module 504 is further configured to:
and loading and displaying the png graph on a user interface.
In one possible design, the obtaining module 503 is further configured to:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
the second replacement module 504 is further configured to:
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
In one possible design, the second replacement module 504 is also used for
And if the png graph is not found in the preset resource packet, loading and displaying the svg graph on a user interface.
In addition, the icon processing device may be implemented by software as in fig. 6, or may be implemented by hardware as a hardware module or a circuit unit.
The present application provides a computer-readable storage medium, the computer program product comprising computer instructions that instruct a computing device to perform the above icon processing method provided herein.
The present application provides a chip comprising at least one processor and a communication interface providing information input and/or output for the at least one processor. Further, the chip may also include at least one memory for storing computer instructions. The at least one processor is used for calling and running the computer instructions to execute the icon processing method provided by the application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.

Claims (11)

1. An icon processing method, comprising:
judging whether the identifier of the icon corresponding to the target resource is in the svg format of the scalable vector graphics;
if the identifier of the icon is the identifier of the svg format, replacing the identifier of the icon with the identifier of a portable network graph (png) format, wherein the identifier of the png format and the identifier of the icon are the same identifier;
acquiring a png graph corresponding to the identifier of the png format;
and replacing the svg graph corresponding to the icon with the png graph.
2. The method according to claim 1, wherein the obtaining of the png graph corresponding to the identifier of the png format comprises:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
3. The method according to claim 1 or 2, wherein after replacing the svg graph corresponding to the icon with the png graph, the method further comprises:
and loading and displaying the png graph on a user interface.
4. The method according to claim 1, wherein after the determining whether the identifier of the icon corresponding to the target resource is an identifier in a svg format, the method further comprises:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
5. The method of claim 2, further comprising:
and if the png graph is not found in the preset resource packet, loading and displaying the svg graph on a user interface.
6. An icon processing apparatus, comprising:
the judging module is used for judging whether the identifier of the icon corresponding to the target resource is an identifier in an svg format;
a first replacement module, configured to replace the identifier of the icon with an identifier of a png format if the identifier of the icon is the identifier of the svg format, where the identifier of the png format and the identifier of the icon are the same identifier;
the acquisition module is used for acquiring a png image corresponding to the identifier of the png format;
and the second replacing module is used for replacing the svg graph corresponding to the icon with the png graph.
7. The apparatus of claim 6, wherein the obtaining module is specifically configured to:
searching the png graph in a preset resource packet;
and if the png graph is found in the preset resource packet, acquiring the png graph from the preset resource packet.
8. The apparatus of claim 6 or 7, wherein the second replacement module is further configured to:
and loading and displaying the png graph on a user interface.
9. The apparatus of claim 6, wherein the obtaining module is further configured to:
if the identifier of the icon is not the identifier of the svg format, acquiring a graph corresponding to the identifier of the icon;
the second replacement module is further configured to:
and loading and displaying the graph corresponding to the identifier of the icon on a user interface.
10. An icon processing apparatus, characterized in that the apparatus comprises: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the icon processing method of any of claims 1-5.
11. A computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the icon processing method according to any one of claims 1 to 5.
CN202010580364.7A 2020-06-23 2020-06-23 Icon processing method, device and equipment Pending CN113835596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010580364.7A CN113835596A (en) 2020-06-23 2020-06-23 Icon processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010580364.7A CN113835596A (en) 2020-06-23 2020-06-23 Icon processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN113835596A true CN113835596A (en) 2021-12-24

Family

ID=78964110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010580364.7A Pending CN113835596A (en) 2020-06-23 2020-06-23 Icon processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113835596A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163156A (en) * 2011-03-10 2011-08-24 宇龙计算机通信科技(深圳)有限公司 Mobile terminal icon replacing method and mobile terminal
CN105138662A (en) * 2015-09-02 2015-12-09 Tcl移动通信科技(宁波)有限公司 Application icon processing method and system
CN106155754A (en) * 2015-04-21 2016-11-23 阿里巴巴集团控股有限公司 A kind of processing method and processing device of indicating template
CN106843639A (en) * 2016-12-26 2017-06-13 上海与德信息技术有限公司 The display methods of icon and the display device of icon
CN107423047A (en) * 2017-04-07 2017-12-01 北京金山安全软件有限公司 Application icon display method and related equipment
CN108170504A (en) * 2018-01-29 2018-06-15 郑州云海信息技术有限公司 A kind of interface Logo method for customizing, system, equipment and computer readable storage medium
US20190043231A1 (en) * 2017-08-01 2019-02-07 Cimpress Schweiz Gmbh Content Replacement System Using Visual Design Object Models

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163156A (en) * 2011-03-10 2011-08-24 宇龙计算机通信科技(深圳)有限公司 Mobile terminal icon replacing method and mobile terminal
CN106155754A (en) * 2015-04-21 2016-11-23 阿里巴巴集团控股有限公司 A kind of processing method and processing device of indicating template
CN105138662A (en) * 2015-09-02 2015-12-09 Tcl移动通信科技(宁波)有限公司 Application icon processing method and system
CN106843639A (en) * 2016-12-26 2017-06-13 上海与德信息技术有限公司 The display methods of icon and the display device of icon
CN107423047A (en) * 2017-04-07 2017-12-01 北京金山安全软件有限公司 Application icon display method and related equipment
US20190043231A1 (en) * 2017-08-01 2019-02-07 Cimpress Schweiz Gmbh Content Replacement System Using Visual Design Object Models
CN108170504A (en) * 2018-01-29 2018-06-15 郑州云海信息技术有限公司 A kind of interface Logo method for customizing, system, equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
优逸客科技有限公司: "移动UI设计三大利器", vol. 1, 31 December 2018, 机械工业出版社, pages: 254 *
李可;: "阿里巴巴矢量图标库在《网页设计》课程中的应用", 福建电脑, no. 03, 25 March 2017 (2017-03-25) *

Similar Documents

Publication Publication Date Title
CN106598655B (en) Application page processing method and device
CN110019464B (en) Page processing method and device
CN111581555B (en) Document loading method, device, equipment and storage medium
US11966795B2 (en) Method and device for loading minus-one screen, terminal, and computer readable storage medium
CN111309216B (en) List page display method and device, computer equipment and storage medium
CN107391119B (en) Method and device for realizing horizontal and vertical screens
CN113778391A (en) Page processing method, device and equipment for native application program
CN112256421A (en) Communication processing method, communication processing device, storage medium and electronic equipment
CN114443189B (en) Image processing method and electronic equipment
CN113296841A (en) Application program processing method, device, equipment and medium
CN110673827B (en) Resource calling method and device based on android system and electronic equipment
CN114092590B (en) Electronic device and evaluation method and medium for image rendering performance of electronic device
CN113835596A (en) Icon processing method, device and equipment
CN112988810B (en) Information searching method, device and equipment
CN112905072B (en) Application processing method and device and electronic equipment
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN116263824A (en) Resource access method and device, storage medium and electronic equipment
CN112015507A (en) Application guide method and device
CN113900740A (en) Method and device for loading multiple list data
CN114679491A (en) Micro front-end service application method and device, storage medium and electronic equipment
CN115437551A (en) Data cloning method, device, storage medium and computer program product
CN112052063A (en) Watermark filling method, system, terminal and storage medium for application program
CN117130688B (en) Quick application card loading method, electronic equipment and storage medium
CN116700694B (en) Applet engine
WO2023093212A1 (en) Image processing method and electronic device

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