Application program skin changing method and device, equipment and storage medium
By using SVG pictures as the skin of the application and using the target skin resource package in the form of a text file to modify the color attributes of the SVG picture, the problem of dynamic loading of the skin resource package increases memory and storage space usage is solved, achieving more efficient skin replacement and compatibility.
Patent Information
- Application Number
- CN202411666733.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
Dynamically loading skin resource packages for applications can easily increase the use of memory and storage space, especially when processing large amounts of high-definition pictures or complex skin packages, which may affect the efficiency and smoothness of the application.
By loading the locally stored scalable vector graphics (SVG) image as the application skin, and downloading the target skin resource package of the target SVG image as a text file, modifying the color attributes in the SVG image based on the configuration information of the resource package to achieve skin replacement.
This method saves the application's memory and storage space, improves download speed, avoids the need to dynamically load large number of image resource packages, and ensures good compatibility between different devices or operating system versions.
Smart Images

Figure CN119597365A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for skinning an application. Background Art
[0002] Currently, in many applications (Application, APP), the skin interface can be an important functional component to enhance the user experience and help realize the personalized expression of users. The skin interface of an application can include image resources such as background themes, background images, icons, button patterns, and artistic text. These image resources can significantly change the visual style of the application.
[0003] In order to better meet the needs of users to customize personalized skin interfaces, many applications also provide the function of changing application skins. Usually, resources related to application skins (such as graphics, color values, fonts, etc.) can be made into independent skin resource packages. When the application executes the skin-changing function, it can dynamically download these skin resource packages and dynamically load these skin resource packages after the download is completed. In this way, the dynamic replacement of the skin interface can be realized.
[0004] However, dynamically loading skin resource packages can easily increase the use of memory and storage space. When processing a large number of high-definition images or complex skin resource packages, frequent resource switching may affect the operating efficiency and fluency of the application. Summary of the invention
[0005] In view of this, one or more embodiments of the present disclosure provide a method, apparatus, device and storage medium for changing the skin of an application program, which can conveniently change the skin of an application program and save the memory and storage space of the application program.
[0006] In a first aspect, the present disclosure provides a method for skinning an application, the method comprising: loading at least one candidate scalable vector graphic SVG image stored locally, the candidate SVG image constituting an application skin of the application; determining an SVG image with skin change items in the candidate SVG images as a target SVG image; downloading a target skin resource package of the target SVG image, the target skin resource package being a text file; and modifying the color attributes of a target object in the target SVG image based on configuration information of the target skin resource package.
[0007] The application skin is composed of SVG images, which is conducive to conveniently modifying the attribute values of the skin and quickly achieving the effect of changing the skin. By determining the target SVG image among the candidate SVG images, the image resources that do not need to be changed in the skin can be retained, and only the image resources that need to be changed can be changed, further improving the efficiency of skin changing. The target skin resource package in the form of a text file has a smaller data volume. Compared with the image resource package, it not only improves the download speed, but also saves the memory and storage space of the application. In addition, the skin changing method of the application provided in this embodiment avoids dynamically loading a large number of high-definition images or complex skin resource packages, and has good compatibility between different devices or operating system versions.
[0008] In a possible implementation, determining the SVG image having skin change items among the candidate SVG images as the target SVG image includes: traversing the candidate SVG images; for a current SVG image among the candidate SVG images, detecting whether the current SVG image has skin change permission; if the current SVG image has the skin change permission, providing a first visualization interface to the user; in response to an operation instruction of the user on the first visualization interface, determining the skin change items of the current SVG image, and determining the current SVG image as the target SVG image.
[0009] In the process of determining the target SVG image, a preliminary screening is first performed based on the skin change permissions of the candidate SVG images, which can avoid changing some protected SVG images and quickly exclude some SVG images that do not need to be changed. According to the operation instructions entered by the user in the first visual interface, the skin change items are determined, which can not only determine whether the current SVG image needs to perform subsequent skin change operations, but also further determine which content of the current SVG image needs to perform subsequent skin change operations.
[0010] In a possible implementation, a skin selection item may be displayed in the first visualization interface; a user selection instruction for the skin selection item may be received; based on the selection instruction, the skin change item of the current SVG image may be determined, and the current SVG image may be determined as the target SVG image.
[0011] The skin selection item helps the user to quickly confirm that the current SVG image needs to perform a subsequent skin replacement operation, and also helps the user to determine which content of the current SVG image needs to perform a subsequent skin replacement operation.
[0012] In a possible implementation, an input box may be displayed in the first visualization interface; a user input instruction for the input box may be received; based on the input instruction, the skin change item of the current SVG image may be determined, and the current SVG image may be determined as the target SVG image.
[0013] The input box helps the user to quickly confirm that the current SVG image needs to perform a subsequent skin replacement operation, and also helps the user to accurately describe which content of the current SVG image needs to perform a subsequent skin replacement operation.
[0014] In a possible implementation, the configuration information of the target skin resource package includes a matching relationship between a configuration identifier and a configuration string; wherein the configuration identifier is used to locate the target object in the target SVG image, and the configuration string is used to update the color attributes of the target object in the target SVG image.
[0015] Establishing a clear matching relationship between the configuration identifier and the configuration string is conducive to efficiently updating the color attribute of the target object after locating the target object.
[0016] In a possible implementation, the color attributes of the target object in the target SVG image are modified based on the configuration information of the target skin resource package, including: according to the configuration identifier, querying the tag identifier corresponding to the configuration identifier in the target SVG image; according to the tag identifier, determining the target object in the target SVG image; and replacing the attribute value of the color attribute of the target object with a configuration string that matches the configuration identifier.
[0017] By using the configuration identifier to query the tag identifier, the target object can be quickly and accurately determined in the target SVG image. Due to the matching relationship between the configuration identifier and the configuration string, the attribute value of the color attribute of the target object can be directly replaced with the corresponding configuration string. In this way, the color of the target object can be updated simply and efficiently, thereby achieving the purpose of updating the target SVG image and changing the application skin.
[0018] In a possible implementation, downloading the target skin resource package of the target SVG image includes: providing a second visualization interface to the user, displaying at least one candidate skin resource package of the target SVG image; determining the target skin resource package from the candidate skin resource packages in response to the user's operation instructions for the second visualization interface; and downloading the target skin resource package.
[0019] Through the second visual interface, the user can select and use a target skin resource package from multiple candidate skin resource packages of the target SVG image to achieve customized skin replacement needs.
[0020] In a second aspect, the present disclosure provides a skin-changing device for an application, the device comprising: a loading unit, used to load at least one candidate scalable vector graphic SVG image stored locally, the candidate SVG image constituting an application skin of the application; a determination unit, used to determine an SVG image with skin change items in the candidate SVG images as a target SVG image; a downloading unit, used to download a target skin resource package of the target SVG image, the target skin resource package being a text file; and a modification unit, used to modify the color attributes of a target object in the target SVG image based on configuration information of the target skin resource package.
[0021] In a third aspect, the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned application skinning method is implemented.
[0022] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned application skinning method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The features and advantages of the embodiments of the present disclosure may be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:
[0024] Figure 1 A schematic diagram showing the steps of a method for skinning an application program in one embodiment of the present disclosure is shown;
[0025] Figure 2 A schematic diagram of the file structure of an SVG file in one embodiment of the present disclosure is shown;
[0026] Figure 3 A schematic diagram showing a flow chart of a skinning method for an application program in one embodiment of the present disclosure is shown;
[0027] Figure 4 A schematic diagram showing the functional units of a skinning method for an application program in one embodiment of the present disclosure is shown;
[0028] Figure 5 A schematic structural diagram of an electronic device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0030] In related technologies, in order to meet the needs of users to customize personalized skin interfaces, many APPs provide the function of changing application skins. Conventional solutions generally make skin-related resources, such as pictures, color values, fonts, etc., into independent skin resource packages. When executing the skin-changing function, the application can dynamically download these skin resource packages and dynamically load these skin resource packages after the download is complete. The application can dynamically load the resource files in the skin package through reflection or Hook technology.
[0031] However, the following problems may exist in the related technology: First, the process of dynamically loading skin resource packages can easily increase the memory and storage space usage of the application. Especially when processing a large number of high-definition images or complex skin packages, frequent resource switching may affect the operating efficiency and fluency of the application. Secondly, due to differences between different devices and different versions of operating systems, failure to load skin resources may occur, resulting in compatibility issues between different devices or operating system versions of the same skin replacement method. Finally, if the amount of data in the skin resource package is too large, it is easy to cause the time to download and load the skin resource package to be too long, and the process of changing the skin is not smooth, resulting in a poor user experience.
[0032] In view of this, one or more embodiments of the present disclosure can conveniently change the skin of an application, save the memory and storage space of the application, and improve the user experience. Figure 1 , a method for skinning an application provided by an embodiment of the present disclosure may include the following steps.
[0033] S1: Load at least one candidate scalable vector graphic SVG image stored locally, where the candidate SVG image constitutes an application skin of the application.
[0034] In this embodiment, Scalable Vector Graphics (SVG) images are a graphic format based on Extensible Markup Language (XML) that can be used to describe two-dimensional vector graphics. SVG images are usually shapes composed of a series of points and lines. These shapes can be infinitely enlarged without distortion, and are very suitable for making icons, logos, charts, and other images that require high-quality scaling.
[0035] In this embodiment, the application skin of the application that supports the skin-changing function can be constructed by using SVG format images, including background images, page images, icons, charts, etc. When the application is running, it can load the locally stored SVG images to form the initial application skin. When the application is skinned, the skin-changing effect can be achieved by modifying the loaded SVG images. Since the application requires at least one skin interface, at least one locally stored SVG image can be loaded during the startup phase of the application to form the application skin. This process can be performed locally without obtaining network data. It should be noted that the locally stored SVG images can be pre-imported or pre-downloaded from the Internet.
[0036] In this embodiment, the SVG image used to construct the application skin may include a static SVG image and a dynamic SVG image. The SVG image used to construct the application skin may be an SVG image that includes multiple graphic groups, each of which may correspond to different image resources (e.g., background images, buttons, charts, animations, etc.). The SVG image used to construct the application skin may also be multiple SVG images, each of which may correspond to different image resources (e.g., background images, buttons, charts, animations, etc.).
[0037] In this embodiment, the file format of the SVG image generally includes element attributes and the attribute values of the element attributes. When the attribute value of an element attribute (such as color attribute, shape attribute, text attribute, animation effect attribute) changes, the presentation effect of the SVG image will change accordingly, thereby achieving the effect of changing the application skin.
[0038] See also Figure 2 In a practical application example, an SVG file usually contains the following elements: <svg>It is the root element of the SVG file. It can define a canvas area and specify width and height attributes. <circle> 、 <rect> 、 <line> 、 <ellipse> 、 <polygon> 、 <path>Elements such as can draw different shapes (corresponding to circles, rectangles, straight lines, ellipses, polygons, and complex paths); <text>Elements can have text added to them; <g>Elements can group graphic elements together and can be applied to transform the style of the entire group; <defs>The element is used to define a graphical element that can be referenced multiple times; <use>Elements can reference <defs>Graphic elements defined in; <animate>Elements can define animation effects.
[0039] In a practical application example, the element attributes of each element in an SVG file may include: id, which can assign a unique identifier to the element; cx, which can describe the x-axis coordinate of the center point of the circle, such as cx="50"; cy, which can describe the y-axis coordinate of the center point of the circle, such as cy="50"; r, which can describe the radius of the circle; fill, which can describe the color or image, such as fill="red"; stroke, which can describe the color of the edge of the graphic; style, which can define the inline style of the graphic, such as style="fill:red; stroke:black".
[0040] S2: Determine the SVG picture with the skin change item in the candidate SVG pictures as the target SVG picture.
[0041] In this embodiment, the target SVG image is determined from the candidate SVG images, and the image resources that do not need to be replaced in the application skin can be retained (for example, functional icons such as settings, search, and help; status indicator icons such as battery level and signal strength; transparent button backgrounds; separators and borders for interface layout; animation effects indicating progress bars; default avatars), and only the image resources that need to be changed are changed (for example, the main background image of the application; navigation bar and toolbar backgrounds; visual elements such as button borders, colors, and gradient effects; icons that match the theme color; visual styles of controls such as sliders and progress bars; backgrounds of pop-up windows and dialog boxes; styles and colors of badges and labels), thereby improving the efficiency of skinning.
[0042] In some embodiments, an SVG image having skin change items among the candidate SVG images is determined as a target SVG image, including: traversing the candidate SVG images; for a current SVG image among the candidate SVG images, detecting whether the current SVG image has skin change permission; if the current SVG image has the skin change permission, providing a first visualization interface to the user; in response to an operation instruction of the user on the first visualization interface, determining the skin change items of the current SVG image, and determining the current SVG image as the target SVG image.
[0043] In the process of determining the target SVG image, a preliminary screening is first performed based on the skin change permissions of the candidate SVG images, which can avoid changing some protected SVG images (such as user avatars, skin frames, product logos, etc.) and quickly exclude some SVG images that do not need to be changed. According to the operation instructions entered by the user in the first visual interface, the skin change items are determined, which can not only determine whether the current SVG image needs to perform subsequent skin change operations, but also further determine which content of the current SVG image needs to perform subsequent skin change operations.
[0044] In some embodiments, a skin selection item may be displayed in the first visualization interface; a user selection instruction for the skin selection item may be received; based on the selection instruction, the skin change item of the current SVG image may be determined, and the current SVG image may be determined as the target SVG image.
[0045] The skin selection item helps the user to quickly confirm that the current SVG image needs to perform a subsequent skin replacement operation, and also helps the user to determine which content of the current SVG image needs to perform a subsequent skin replacement operation.
[0046] In some implementations, an input box may be displayed in the first visualization interface; a user input instruction for the input box may be received; based on the input instruction, the skin change item of the current SVG image may be determined, and the current SVG image may be determined as the target SVG image.
[0047] The input box helps the user to quickly confirm that the current SVG image needs to perform a subsequent skin replacement operation, and also helps the user to accurately describe which content of the current SVG image needs to perform a subsequent skin replacement operation.
[0048] S3: Download the target skin resource package of the target SVG image, where the target skin resource package is a text file.
[0049] In this embodiment, the target skin resource package in the form of a text file has a smaller data volume, which can not only improve the download speed but also save the memory and storage space of the application program compared to the image resource package. In addition, only downloading and loading the target skin resource in the form of a text file avoids dynamically loading a large number of high-definition images or complex skin resource packages, and can provide good compatibility between different devices or operating system versions.
[0050] In some embodiments, a second visual interface may be provided to the user to display at least one candidate skin resource package of the target SVG image. In response to the user's operation instruction on the second visual interface, the target skin resource package may be determined from the candidate skin resource packages. Thereafter, the target skin resource package may be downloaded.
[0051] Through the second visual interface, the user can select and use a target skin resource package from multiple candidate skin resource packages of the target SVG image to achieve customized skin replacement needs.
[0052] S4: Based on the configuration information of the target skin resource package, modify the color attribute of the target object in the target SVG image.
[0053] In this embodiment, the target object can be a specific element in the target SVG image (such as a graphic element, a text element, a graphic combination element, an animation element, etc.). The target object can have multiple attributes, such as a position attribute, a shape attribute, and a color attribute. Specifically in this embodiment, the color attribute of the target object is mainly modified, thereby changing the visual effect of the target SVG image, thereby achieving the purpose of skinning the application.
[0054] In some embodiments, the configuration information of the target skin resource package includes a matching relationship between a configuration identifier and a configuration string; wherein the configuration identifier is used to locate the target object in the target SVG image, and the configuration string is used to update the color attributes of the target object in the target SVG image.
[0055] Establishing a clear matching relationship between the configuration identifier and the configuration string is conducive to efficiently updating the color attribute of the target object after locating the target object.
[0056] In some embodiments, the color attributes of the target object in the target SVG image are modified based on the configuration information of the target skin resource package, including: querying the target SVG image for a tag identifier corresponding to the configuration identifier according to the configuration identifier; determining the target object in the target SVG image according to the tag identifier; and replacing the attribute value of the color attribute of the target object with a configuration string that matches the configuration identifier.
[0057] By using the configuration identifier to query the tag identifier, the target object can be quickly and accurately determined in the target SVG image. Due to the matching relationship between the configuration identifier and the configuration string, the attribute value of the color attribute of the target object can be directly replaced with the corresponding configuration string. In this way, the color of the target object can be updated simply and efficiently, thereby achieving the purpose of updating the target SVG image and changing the application skin.
[0058] See also Figure 3 , a method for changing the skin of an application provided by an embodiment of the present disclosure can be implemented through the following process.
[0059] S21: The skin resources such as pictures and backgrounds of the skin pages supporting the skinning function are uniformly used as SVG format pictures. In this way, the application skinning can be realized by modifying the color value in the SVG picture.
[0060] S22: Add an ID to the element tags in the SVG image that support the color replacement function. When dynamically replacing the color, the ID can be used to find out which element part needs to be replaced. For example, in three different <circle>In the element, add id_xx1, id_xx2 and id_xx3 respectively.
[0061] S23: Setting the color value associated with the ID, each ID may correspond to one or more color values. When dynamically replacing the color, the element tag to be replaced in the SVG image may be determined by the ID. Then, the style color value corresponding to the element tag may be replaced with the color associated with the ID.
[0062] S24: All IDs and corresponding color values are formed into a configuration table corresponding to a skin resource package. When the user chooses to download the skin resource package, the corresponding configuration table can be loaded.
[0063] S25: When the application loads an SVG image, the style color value of the element tag marked by the ID in the SVG image can be dynamically replaced with the color value corresponding to the ID in the configuration table.
[0064] In the technical solution provided by one or more embodiments of the present disclosure, the application skin is composed of SVG pictures, which is conducive to conveniently modifying the attribute values of the skin and quickly achieving the effect of changing the skin. By determining the target SVG picture among the candidate SVG pictures, the picture resources that do not need to be changed in the skin can be retained, and only the picture resources that need to be changed can be changed, further improving the efficiency of skin change. The target skin resource package in the form of a text file has a smaller data volume. Compared with the picture resource package, it not only improves the download speed, but also saves the memory and storage space of the application.
[0065] In addition, the technical solution provided by one or more embodiments of the present disclosure avoids the dynamic loading of a large number of high-definition images or complex skin resource packages, and has good compatibility between different devices or operating system versions.
[0066] See also Figure 4 One embodiment of the present disclosure further provides a skinning device for an application program, the device comprising:
[0067] A loading unit 100 is used to load at least one candidate scalable vector graphic SVG image stored locally, wherein the candidate SVG image constitutes an application skin of the application program;
[0068] A determination unit 200 is used to determine an SVG picture having a skin change item among the candidate SVG pictures as a target SVG picture;
[0069] A downloading unit 300 is used to download a target skin resource package of the target SVG image, where the target skin resource package is a text file;
[0070] The modification unit 400 is used to modify the color attribute of the target object in the target SVG image based on the configuration information of the target skin resource package.
[0071] In one embodiment, the determination unit 200 is specifically used to traverse the candidate SVG images; for the current SVG image among the candidate SVG images, detect whether the current SVG image has the skin change permission; if the current SVG image has the skin change permission, provide a first visualization interface to the user; in response to the user's operation instructions for the first visualization interface, determine the skin change item of the current SVG image, and determine the current SVG image as the target SVG image.
[0072] In one embodiment, the determination unit 200 is also used to display skin selection items in the first visualization interface; receive a user's selection instruction for the skin selection item; determine the skin change item of the current SVG image according to the selection instruction, and determine the current SVG image as the target SVG image.
[0073] In one embodiment, the determination unit 200 is also used to display an input box in the first visual interface; receive a user's input instruction for the input box; determine the skin change item of the current SVG image according to the input instruction, and determine the current SVG image as the target SVG image.
[0074] In one embodiment, the configuration information of the target skin resource package includes a matching relationship between a configuration identifier and a configuration string; wherein the configuration identifier is used to locate the target object in the target SVG image, and the configuration string is used to update the color attributes of the target object in the target SVG image.
[0075] In one embodiment, the modification unit 400 is specifically used to query the tag identifier corresponding to the configuration identifier in the target SVG image according to the configuration identifier; determine the target object in the target SVG image according to the tag identifier; and replace the attribute value of the color attribute of the target object with a configuration string that matches the configuration identifier.
[0076] In one embodiment, the download unit 300 is specifically used to provide a second visual interface to the user, displaying at least one candidate skin resource package of the target SVG image; in response to the user's operation instructions for the second visual interface, determining the target skin resource package from the candidate skin resource packages; and downloading the target skin resource package.
[0077] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0078] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0079] See also Figure 5 The present disclosure also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned application skinning method is implemented.
[0080] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned application program skinning method is implemented.
[0081] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0082] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0083] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0084] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0085] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0086] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
[0087] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.< / circle> < / animate> < / defs> < / use> < / defs> < / g> < / text> < / path> < / polygon> < / ellipse> < / line> < / rect> < / circle> < / svg>
Claims
1. A skinning method for an application, characterized in that: The method comprises: Loading at least one candidate scalable vector graphic (SVG) image stored locally, wherein the candidate SVG image constitutes an application skin of the application; Determine an SVG image having a skin change item among the candidate SVG images as a target SVG image; Download the target skin resource package of the target SVG image, where the target skin resource package is a text file; Based on the configuration information of the target skin resource package, the color attribute of the target object in the target SVG image is modified.
2. The method according to claim 1, characterized in that The step of determining the SVG picture having the skin change item in the candidate SVG pictures as the target SVG picture includes: Traversing the candidate SVG images; For a current SVG image in the candidate SVG images, detecting whether the current SVG image has skin change permission; If the current SVG image has the skin change permission, providing a first visual interface to the user; In response to an operation instruction of a user on the first visual interface, the skin change item of the current SVG picture is determined, and the current SVG picture is determined as the target SVG picture.
3. The method according to claim 2, characterized in that The step of determining the skin change item of the current SVG picture in response to the user's operation instruction on the first visual interface, and determining the current SVG picture as the target SVG picture includes: Displaying skin selection items in the first visual interface; Receiving a selection instruction from a user for the skin selection item; According to the selection instruction, the skin change item of the current SVG picture is determined, and the current SVG picture is determined as the target SVG picture.
4. The method according to claim 2, characterized in that The step of determining the skin change item of the current SVG picture in response to the user's operation instruction on the first visual interface, and determining the current SVG picture as the target SVG picture includes: Displaying an input box in the first visual interface; Receiving an input instruction from a user for the input box; According to the input instruction, the skin change item of the current SVG picture is determined, and the current SVG picture is determined as the target SVG picture.
5. The method according to claim 1, characterized in that The configuration information of the target skin resource package includes a matching relationship between a configuration identifier and a configuration string; wherein the configuration identifier is used to locate the target object in the target SVG image, and the configuration string is used to update the color attribute of the target object in the target SVG image.
6. The method according to claim 5, characterized in that The modifying the color attribute of the target object in the target SVG image based on the configuration information of the target skin resource package includes: According to the configuration identifier, searching the target SVG image for a tag identifier corresponding to the configuration identifier; Determine the target object in the target SVG image according to the tag identifier; The attribute value of the color attribute of the target object is replaced with a configuration string that matches the configuration identifier.
7. The method according to any one of claims 1 to 6, characterized in that: The target skin resource package of the target SVG image is downloaded, including: Providing a second visual interface to the user, displaying at least one candidate skin resource package of the target SVG image; In response to an operation instruction of a user on the second visual interface, determining the target skin resource package from the candidate skin resource packages; Download the target skin resource pack.
8. A skinning device for an application, characterized in that: The device comprises: A loading unit, configured to load at least one candidate scalable vector graphic (SVG) image stored locally, wherein the candidate SVG image constitutes an application skin of the application; A determination unit, configured to determine an SVG picture having a skin change item among the candidate SVG pictures as a target SVG picture; A downloading unit, used to download a target skin resource package of the target SVG image, wherein the target skin resource package is a text file; The modification unit is used to modify the color attribute of the target object in the target SVG image based on the configuration information of the target skin resource package.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.