Icon display method, electronic equipment and storage medium
By obtaining and adjusting the pictures of the content elements and border elements of the icon, and synthesizing the icon to display the file, the problem of low icon clarity on electronic devices is solved, and higher icon clarity and user experience are achieved.
Patent Information
- Application Number
- CN202311437395.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-09
AI Technical Summary
The icons displayed on existing electronic devices are not very clear, which affects the user's experience.
By obtaining the first and second pictures corresponding to the target icon, including the content elements and border elements of the icon, adjust the size of the two, and synthesize the icon to display the file, and finally display the icon based on the file.
It alleviates the phenomenon of non-integer line display in the icon display file, improves the clarity of icons displayed on electronic devices, and improves the user experience.
Smart Images

Figure CN119960859A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an icon display method, an electronic device, and a storage medium. Background Art
[0002] With the development of terminal technologies, there are more and more applications (APPs) on electronic devices, and users usually install many APPs on electronic devices to meet the needs of various scenarios.
[0003] For an APP that has been installed on an electronic device, the electronic device usually displays an application icon corresponding to the APP on the desktop, and the user can click the application icon to start the APP corresponding to the application icon.
[0004] Currently, the icons displayed on electronic devices have low clarity, which affects the user experience. Summary of the invention
[0005] The embodiments of the present application provide an icon display method, an electronic device, and a storage medium, which can improve the clarity of icons displayed on the electronic device and enhance the user experience.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, an icon display method is provided, which can be applied to an electronic device installed with a target application, such as a mobile phone, a tablet computer, etc. The target application may include an application to be displayed on the electronic device. The method includes: the electronic device obtains a first image and a second image corresponding to the target icon, the target icon is an icon of the target application, that is, the target icon is an icon to be displayed on the electronic device; the first image includes a content element of the target icon, and the second image includes a border element of the target icon. Next, the electronic device adjusts the size of the first image to obtain a first image of a first size. Then, the electronic device adjusts the size of the second image to obtain a second image of a second size. Next, the electronic device synthesizes the first image of the first size and the second image of the second size to obtain an icon display file. Then, the electronic device displays the target icon based on the icon display file. The first size can be understood as the size of the first image when it is displayed, such as the size of the content element included in the target icon displayed on the electronic device; the second size can be understood as the size of the second image when it is displayed, such as the size of the border element included in the target icon displayed on the electronic device.
[0008] In the above method, after synthesizing the icon display file, the electronic device does not resize the icon display file. In other words, the icon display file having both white border elements and content elements is not resized; therefore, the phenomenon of non-integer row display that affects the clarity of icon display in the icon display file can be alleviated. Based on this, the clarity of the icons displayed on the electronic device can be improved, and the user experience can be improved.
[0009] In one design of the first aspect, before adjusting the size of the first picture, the method further includes: the electronic device deletes a border element included in the first picture. And, adjusting the size of the first picture to obtain a first picture of the first size includes: the electronic device adjusts the size of the first picture from which the border element is deleted to obtain the first picture of the first size.
[0010] In this design, considering that the first image may include a border element, the electronic device can delete the border element included in the first image before adjusting the size of the first image. In this way, the first image can include no border element. In this way, the phenomenon of non-integer row display in the first image can be alleviated, the clarity of the icon displayed on the electronic device can be further improved, and the user experience can be further improved.
[0011] In another possible design of the first aspect, the electronic device deletes the border elements included in the first picture, including: the electronic device deletes the border elements included in the first picture based on the second picture. In this design, since the display effect of the icon will be uniform when the electronic device displays the icon, the border elements included in the first picture and the border elements included in the second picture have a corresponding relationship, such as the two are the same. Therefore, the border elements included in the first picture can be quickly and accurately deleted through the second picture.
[0012] In another possible design of the first aspect, the second picture includes a main part and a blank part, and the main part includes a frame element. The electronic device deletes the frame element included in the first picture based on the second picture, including: the electronic device overlays the second picture on the first picture, overlaps the centers of the two pictures, retains the area in the first picture that overlaps with the blank part, and deletes the area in the first picture that overlaps with the main part.
[0013] In another possible design of the first aspect, the electronic device deletes the border elements included in the first image, including. If the number of designated pixels included in the first image is greater than a preset number threshold, the border elements included in the first image are deleted. The designated pixels include: the largest number of identical pixels among the pixels included in the second image. It can be understood that if the RGB values of two pixels are the same, the two pixels are the same pixels; if the transparency of two pixels is the same, the two pixels are the same pixels. In this design, by analyzing the pixels included in the first image, it can be accurately determined whether the first image includes a border element.
[0014] In another possible design of the first aspect, the electronic device deletes the border element included in the first image, including: if the target application includes a third-party application, deleting the border element included in the first image. In this design, the first image corresponds to the target icon, and the target icon corresponds to the target application; the electronic device can quickly and accurately determine whether the first image includes the border element based on the type of application.
[0015] In another possible design of the first aspect, deleting the border element included in the first image includes: if the target application includes a system application and the electronic device applies a third-party theme, the electronic device deletes the border element included in the first image. In this design, the first image corresponds to the target icon, and the target icon corresponds to the target application; the electronic device can quickly and accurately determine whether the first image includes the border element based on the type of theme applied on the electronic device and the type of application.
[0016] In another possible design of the first aspect, before the electronic device synthesizes the first picture of the first size and the second picture of the second size, the method further includes: the electronic device performs a rounding operation on the first picture of the first size and the second picture of the second size. And the synthesizing the first picture of the first size and the second picture of the second size includes: the electronic device synthesizes the first picture of the first size after the rounding operation and the second picture of the second size after the rounding operation.
[0017] In this design, considering that when the first image and the second image are resized, non-integer rows may be displayed, the resized first image, that is, the first image of the first size and the second image of the second size may be rounded. This can further alleviate the occurrence of non-integer row display phenomenon and further improve the clarity of icons.
[0018] In another possible design of the first aspect, the electronic device obtains the first image and the second image corresponding to the target icon, including: the electronic device obtains the icon image and the second image corresponding to the target icon in response to a specified event. The specified event includes: any one of a desktop application startup completion event, an icon update event, and a theme change event.
[0019] In another possible design of the first aspect, the electronic device includes a desktop application and a resource management framework, and obtaining a first image and a second image corresponding to a target icon includes: the resource management framework obtains the first image and the second image corresponding to the target icon; then, the resource management framework adjusts the size of the first image and the second image to a specified size, and the specified size is greater than or equal to the maximum size of each icon displayed by the electronic device. The above method also includes: the resource management framework sends the first image of the specified size and the second image of the specified size to the desktop application. The desktop application receives the first image of the specified size and the second image of the specified size.
[0020] It is understandable that for the resource management framework or the desktop application, the two may be developed by different developers (development teams). In this design, for the desktop APP, the icon materials it receives are all of the same size, which can improve the processing efficiency of the desktop APP. At the same time, for the developers of the desktop APP, if the icon materials received by the desktop APP are all of the same size, their development costs can be saved.
[0021] In a second aspect, the present application provides an electronic device, comprising: a memory, one or more processors, and a Bluetooth module; the memory is coupled to the processor; wherein the memory stores computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method provided by the above-mentioned first aspect and any possible design of the first aspect.
[0022] In a third aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method provided by the first aspect and any possible design of the first aspect.
[0023] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method provided by the first aspect and any possible design of the first aspect.
[0024] Among them, the technical effects brought about by any design method in the second to fourth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of a usage scenario provided for an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a desktop of an electronic device is provided for an embodiment of the present application;
[0027] Figure 3 A schematic diagram of an icon provided in an embodiment of the present application;
[0028] Figure 4 A flowchart of an icon display process provided in an embodiment of the present application;
[0029] Figure 5 A flowchart of another icon display process provided in an embodiment of the present application;
[0030] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0032] Figure 8 A flowchart of an icon display method provided in an embodiment of the present application;
[0033] Fig. 9 A schematic diagram of a process for removing border elements provided in an embodiment of the present application;
[0034] Fig.10 A schematic diagram of a process for removing border elements of a multi-layer icon provided in an embodiment of the present application;
[0035] Fig.11 A schematic diagram of a process for generating an icon display file provided in an embodiment of the present application;
[0036] Fig.12 A flowchart of another icon display method provided in an embodiment of the present application;
[0037] Fig.13 A schematic diagram of the hardware structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or its similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0039] Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0040] Users can install many APPs on electronic devices to meet the needs of various scenarios. For the APPs already installed on the electronic device, the electronic device can display the APP icon corresponding to the APP on the desktop, and the user can click the APP icon to start the APP corresponding to the APP icon. Or drag the desktop icon to achieve the management of the APP icon.
[0041] For example, see Figure 1 The technical solution provided by the embodiment of the present application can be applied to the daily use of electronic devices by users. In the process of daily use of electronic devices by users, the electronic devices can display a desktop, and the user can click the application icon (icon) on the desktop of the electronic device 100 to start the application. Among them, the icon can also be called an application icon, an APP icon, an APP logo, etc. Icons of different sizes can be displayed on the electronic device.
[0042] For example, see Figure 2 , an A-size icon 101, a card 102, a large folder 103 and a small folder 104 are displayed on the desktop of the electronic device 100. Among them, the card includes multiple A-size icons 101, the large folder 103 includes multiple B-size icons 105, and the small folder 104 includes multiple C-size icons 106. It should be pointed out that for the A-size icon 101, the B-size icon 105 and the C-size icon 106, the three are only different in the size displayed on the display screen, and the processes displayed on the desktop of the three are the same or similar, and the three can be collectively referred to as icons. It should be pointed out that the icons in the embodiments of the present application, including but not limited to Figure 2 The A-size icon 101, B-size icon 105 and C-size icon 106 are shown in the figure. In actual applications, the icons may have other sizes, etc. The specific icons can be designed according to actual usage requirements, and the embodiment of the present application does not impose any restrictions on the size of the icons.
[0043] For example, Figure 2 Take the A-size icon 101 corresponding to the memo APP in the example, see Figure 3, the composition of the icon is introduced. The display boundary 101-1 of the A-size icon 101 specifies the maximum size that the A-size icon 101 can occupy on the display screen of the electronic device 100, such as 40 pixels (pixel, PX) * 40 pixels. Within the display boundary 101, the A-size icon 101 includes a border 101-3 and icon content 101-2, which together present the display effect of the A-size icon 101 on the display screen. The icon content 101-2 is used to display the lines, colors, shapes, etc. in the icon. The part filled with oblique lines in the border 101-3 is the main part of the border 101-3, and the rest is a blank part. After the border 101-3 and the icon content 101-2 are superimposed, the blank part does not block the icon content 101-2, and the icon content is displayed; the main part blocks the icon content 101-2, and the main part is displayed, such as full transparent display, displaying a specific color, and so on. By combining the border with the icon content to display the icon, the content of the icons displayed on the desktop can be unified, and it can also facilitate the user's interactive operations on the icons on the desktop, such as clicking on the icon, dragging the icon, and so on. Among them, the border can also be called a mask border, a border element, and so on; the icon content can also be called an icon content element, a content element, and so on. An electronic device can carry a border element through a border material, and an electronic device can carry an icon content element through an icon material. The above-mentioned border material can also be called a border material file, a border material picture, and the above-mentioned icon material can also be called an icon material picture. In some embodiments, the above-mentioned icon material can be called a first picture, and the above-mentioned border material can be called a second picture. The first picture includes the content element of the icon (icon content element), and the second picture includes a border element.
[0044] According to the layers that make up the icon, the icon can be divided into a single-layer icon and a multi-layer icon. A single-layer icon is an icon with only one layer, which includes all the icon content. A multi-layer icon includes multiple layers, such as a foreground and a background, which together include all the icon content.
[0045] According to the application corresponding to the icon, or the source of the application corresponding to the icon, the icon can be divided into third-party APP icons and system icons. Third-party APP icons correspond to third-party APPs, and system icons correspond to system applications. Third-party APP icons are icons developed by the developers of the third-party APPs, such as the icon of the AA video application and the icon of the BB music application. System icons are icons of application programs preset in the operating system of the electronic device, such as the icon of the phone application and the icon of the short message application.
[0046] In some solutions, the electronic device can obtain icon material and frame material, and then obtain an icon display file according to the icon material and frame material; then, the electronic device resizes the icon display file and displays the icon according to the resized icon display file.
[0047] For example, take the A-size icon corresponding to the memo APP as an example, see Figure 4 , the electronic device obtains the icon material 101B and the frame material 101C. Afterwards, the electronic device obtains the icon display file 101-A according to the icon material 101B and the frame material 101C. Next, the electronic device resizes the icon display file 101-A and displays the icon according to the resized icon display file 101-B.
[0048] Since electronic devices adjust the size of icon display files to display icons of different sizes on the desktop, such as Figure 2 A-size icon 101, B-size icon 103 or C-size icon 106. Since the icon display file has both border elements and icon content, the desktop APP adjusts the size of the icon display file, so the phenomenon of non-integer row (column) display will occur. Especially at the junction of the border material and the icon material, the phenomenon of non-integer row (column) display will occur very frequently. This will make the icons displayed on the electronic device less clear, which will affect the user experience. Among them, the phenomenon of non-integer row (column) display can also be referred to as decimal row (column) display phenomenon, fractional row (column) display phenomenon, etc. For the convenience of the following description, the phenomenon of non-integer row (column) display can be referred to as non-integer row display phenomenon.
[0049] It is understandable that an electronic device can display a picture on a display screen according to color coding. For example, an electronic device can display a picture on a display screen according to red, green and blue (RGB) coding. Specifically, the display screen of the electronic device is composed of multiple pixels (pixel, PX), and the electronic device displays the picture on the display screen by controlling the RGB coding value of each pixel. For example, the picture displayed on a certain display screen includes multiple RGB coding values of PX in the corresponding display file. For example: 50PX*50XP_RGB(100.100.100), 51PX*50XP_RGB(200.200.200), 53PX*53XP_RGB(0.0.0) in the display file. Among them, 50PX*50XP represents the pixel in the 50th row and 50th column on the display screen. Usually, only the positions corresponding to integer rows and integer columns are included in the display file to display a certain RGB value, which can be called integer row display.
[0050] However, in some cases, the display file will also include a certain RGB value displayed in a non-integer row / column, such as 50.3PX*50.3XP_RGB(100.100.100), 51.3PX*51.3XP_RGB(200.200.200), 3.8PX*53.5XP_RGB(0.0.0), etc.; when the display screen displays based on this file, non-integer row display phenomenon will appear. Specifically, when the display screen displays based on this display file, it will merge the RGB code value of the non-integer row / column into the RGB code value of the integer row / column, and control the pixel points corresponding to the integer row / column to display the merged RGB code value. Assume that the display file contains 51.3PX*51.3XP_RGB(200.200.200) and 51PX*51XP_RGB(200.200.200); the display screen will merge the RGB code value of the pixel of 51.3PX*51.3XP into the RGB code value of the pixel of 51PX*51XP. For example, the RGB code value of the pixel of 51PX*51XP obtained by merging can be (166.166.166). And based on 51PX*51XP_RGB(166.166.166), the picture corresponding to the display file is displayed on the display screen. It can be seen that (200.200.200) that should have been displayed on the display screen by 51PX*51XP is displayed as (166.166.166), which will cause the color of the image displayed on the display screen to change, thereby affecting the clarity of the picture displayed on the display screen.
[0051] For example, see again Figure 4 , the horizontal line filling in the figure represents green, and the dotted line in the resized icon display file 101-B is the connection between the border 101B and the icon content 101C. Assume that when the electronic device displays the resized icon display file 101-B, the icon content 101C is composed of white and black lines, the border 101B is fully transparent, and the color of the desktop wallpaper is displayed, such as green. Because a non-integer line display phenomenon occurs at the connection between the border 101B and the icon content 101C. Then, when the electronic device displays the A-size icon corresponding to the memo APP, the connection between the border and the icon content will neither display white and black lines according to the icon content 101C, nor will it display the green of the desktop wallpaper according to the border 101B, but will display a random color between black and green, such as dark green and dark green.
[0052] From the above analysis, it can be seen that due to the phenomenon of non-integer line display, the RGB value of the pixel on the display screen is different from the RGB value recorded in the display file, which will cause the icon displayed on the electronic device to have low clarity and affect the user experience.
[0053] In view of this, an embodiment of the present application provides an icon display method. In this method, after obtaining the icon material, the electronic device first adjusts the size thereof, and then obtains the icon display file according to the resized frame material and the icon material. Afterwards, the electronic device directly displays the icon according to the icon display file.
[0054] For example, take the A-size icon corresponding to the memo APP as an example, see Figure 5 , the electronic device obtains the icon material 101B and the border material 101C. Afterwards, the electronic device resizes the icon material 101B and the border material 101C to obtain the resized icon material 101B-1 (also known as the first image of the first size) and the resized border material 101C-1 (also known as the second image of the second size). Next, the electronic device obtains the icon display file 101D based on the resized icon material 101B-1 and the resized border material 101C-1, and displays the icon based on the icon display file. It can be understood that Figure 5 The size adjustment shown in the figure is enlargement; in some cases, the size adjustment can also be reduction. Whether the above size adjustment is enlargement or reduction depends on the actual use requirements, and the embodiment of the present application does not impose any restrictions on the above size adjustment.
[0055] The first size can be understood as the size of the first image when it is displayed, such as the size of the content element included in the target icon displayed on the electronic device; for example, Figure 3 The size of the icon content 101C, for example, Figure 4 The second size can be understood as the size of the second image when it is displayed, such as the size of the border element included in the target icon displayed on the electronic device; for example, the above Figure 3 Medium 101B size.
[0056] In this solution, since the electronic device does not resize the icon display file after obtaining the icon display file, that is, the icon display file having both icon content and border elements is not resized, the phenomenon of non-integer row display of the icon display file can be alleviated; even, the phenomenon of non-integer row display will not appear in the icon display file. Compared with some solutions, the icon display file needs to be resized after obtaining the icon display file, and the phenomenon of non-integer row display appears in the icon display file. The above method is used for icon display, which can improve the clarity of the icons displayed on the electronic device and enhance the user experience.
[0057] The electronic device may be a mobile phone, tablet computer, wearable device, smart screen, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA) and other electronic devices with display screens; it may also be a vehicle-mounted device with display screens such as a vehicle-mounted computer, a vehicle-mounted computer, etc.; it may also be some smart watches, smart bracelets and other IoT devices with display screens. The embodiments of the present application do not impose any restrictions on the product form of the electronic device.
[0058] Next, the hardware structure and software structure of the electronic device 1000 are briefly introduced.
[0059] For example, see Figure 6 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a display screen 194, and the like.
[0060] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0061] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0062] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0063] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0064] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0065] Exemplarily, the electronic device 100 may display an icon of the APP through the display screen 194 .
[0066] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0067] Exemplarily, the external memory card connected to the external memory interface 120 can be used to store data related to the display of electronic device icons, such as the above-mentioned icon materials, frame materials, theme packages, etc.
[0068] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0069] As another example, the internal memory 121 may also be used to store data related to the display of electronic device icons, such as the icon materials, frame materials, theme packages, etc.
[0070] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. TM Taking the system as an example, the software structure of the electronic device 100 is exemplified.
[0071] Figure 7 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0072] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, Android TM The system is divided into four layers, from top to bottom: application layer, application framework layer, Android TM Runtime (AndroidTM runtime) and system libraries, as well as the kernel layer.
[0073] The application layer can include a series of application packages.
[0074] like Figure 7 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, etc.
[0075] The application layer may also include a desktop application (APP), where the desktop APP is used to display APP icons on the desktop, as well as the layout of the APP icons, and the like.
[0076] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0077] like Figure 7 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0078] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0079] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0080] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0081] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0082] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0083] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0084] The application framework layer may also include a resource management framework, which is used to obtain data related to icon display from the memory of the electronic device 100, such as icon materials, border materials, etc. In other embodiments, the resource management framework may also be referred to as a desktop resource management framework, a smart desktop middle platform, etc.
[0085] Android TM Runtime includes core libraries and virtual machines. Android TM runtime is responsible for Android TM Scheduling and management of the system.
[0086] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android TM The core library.
[0087] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0088] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0089] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0090] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0091] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0092] A 2D graphics engine is a drawing engine for 2D drawings.
[0093] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0094] As a possible implementation, the resource management framework can obtain the icon material and the border material, and send the icon material and the border material to the desktop APP. Afterwards, the desktop APP adjusts the size of the icon material and the border material. Then, the desktop APP obtains the icon display file based on the icon material and the border material after the size adjustment. Then, the desktop APP displays the icon on the display screen 194 according to the icon display file.
[0095] Next, we will Figure 1 In the usage scenario shown, the electronic device is a mobile phone, and the mobile phone displays icons on the desktop as an example to introduce the icon display method provided in the embodiment of the present application.
[0096] Considering that some icon materials may have border elements, while some icon materials do not have border elements, in order to further improve the clarity of icons displayed on the mobile phone, in some embodiments, the mobile phone can determine whether the icon material has a border element, and if so, remove the border element and then adjust the size to generate an icon display file.
[0097] For example, see Figure 8 The icon display method provided in the embodiment of the present application may include steps S700-S706.
[0098] S700. The resource management framework obtains icon material and border material.
[0099] Among them, the icon material can be the icon material of the icon to be displayed, or it can be the icon material of all APPs on the mobile phone. The border material can be the border material corresponding to the theme currently being used on the mobile phone. The icon material includes the icon content of the above-mentioned icon to be displayed, and the border material includes the border elements of the above-mentioned icon to be displayed. Among them, the icon to be displayed on the mobile phone may be referred to as the target icon hereinafter. In some embodiments, the above-mentioned target icon has a corresponding relationship with the target application, and the target application may be the application of the icon to be displayed on the electronic device, the above-mentioned icon material may be referred to as the first picture, and the above-mentioned border material may be referred to as the second picture.
[0100] Exemplarily, the resource management framework can obtain the icon material of the system application from the target theme package, or obtain the icon material of the third-party application from the program package of the third-party APP. System applications can be understood as pre-configured applications on the operating system of the mobile phone, such as phone applications, short message applications, etc. Among them, the target theme is the theme applied on the mobile phone, and the target theme package is the theme package corresponding to the theme used on the mobile phone. And, the resource management framework can obtain the frame material from the target theme package.
[0101] As a possible implementation, the above step S700 may include: in response to a specified event of the desktop APP, the resource management framework obtains the icon material and the frame material. The specified event includes: an application startup completion event, a desktop icon update event, or a theme change event.
[0102] It is understandable that after the launch is completed, the desktop APP will generate a launch completion event and send the event to the resource management framework, or the desktop APP can also broadcast the event. Alternatively, if the user downloads and installs the APP on the phone, the desktop APP will generate a desktop icon update event; then, the desktop APP sends the event to the resource management framework. Alternatively, if the user changes the theme of the mobile application, the desktop APP can generate a theme change event; then, the desktop APP sends the event to the resource management framework.
[0103] Among them, the above-mentioned specified events may also include layout update events. If the icon layout on the mobile phone desktop is updated, such as updating from displaying 4 icons in a row to displaying 5 icons in a row, the desktop APP generates a layout update event and sends the event to the resource management framework. It can be understood that the icon layout on the mobile phone desktop, such as the number of icons displayed in a row on the desktop, and the number of rows of icons displayed on the desktop, can be set according to actual usage requirements; the embodiments of the present application do not impose any restrictions on this.
[0104] S701. The resource management framework determines whether the icon material has a border element. If it has a border element, execute steps S702-S703; if it does not have a border element, execute step S703.
[0105] For the convenience of the following description, icon materials with border elements can be referred to as first-category icon materials, and icon materials without border elements can be referred to as second-category icon materials. It is understandable that sometimes developers of third-party applications or theme packages can pre-set border elements in icon materials, that is, first-category icon materials will be pre-set. The first-category icon materials obtained by the resource management framework have border elements, so the border elements in the first-category icon materials can be removed, the first-category icon materials can be converted into second-category icon materials, and subsequent steps can be performed.
[0106] Therefore, by deleting the border elements in the first category of icon materials, the phenomenon of non-integer row display of the first category of icon materials can be alleviated, the clarity of the icons displayed on the electronic device can be further improved, and the user experience can be further improved.
[0107] As a possible implementation, the resource management framework can determine whether the icon material has a border element by the number of specified pixels in the icon material. For example, if the number of specified pixels is greater than a preset number threshold, the icon material is determined to be a first-class icon material. The above number threshold can be 50, 100, 230, etc.
[0108] The designated pixel has a corresponding relationship with the pixels constituting the border material, for example, it can be the pixel constituting the border material with the largest number, for example, a transparent pixel.
[0109] It is understandable that when displaying icons, in order to ensure the coordination of icon display on the mobile phone, that is to say, the borders of different icons should be unified, such as the color is unified; therefore, the border elements in the first category of icon materials correspond to the border materials, such as the pixels that make up the border elements, which are the same as the pixels that make up the border materials. Therefore, the designated pixels can be obtained by analyzing the pixels that make up the border materials. For example, the pixel with the largest number of pixels that make up the border material can be used as the designated pixel. Assume that the pixels that make up the border material include 200 transparent pixels and 50 black pixels; based on this, it can be obtained that the designated pixel is a transparent pixel.
[0110] As another possible implementation, the above-mentioned designated pixels may also be preset, such as the designated pixels may be pre-configured in the configuration items of the mobile phone.
[0111] S702. The resource management framework removes the border elements included in the first category of icon materials to obtain the second category of icon materials.
[0112] As a possible implementation, the resource management framework may remove the border elements in the first category of icon materials through the border materials to obtain the second category of icon materials.
[0113] Exemplarily, the first type of icon material and border material obtained by the resource management framework is as follows: Fig. 9As shown. The resource management framework can overlay the border material on the first category of icon material, crop the area where the first category of icon material overlaps with the main part of the border material, and retain the area where the first category of icon material overlaps with the blank part of the border material, so that the border elements in the first category of icon material can be removed to obtain the second category of icon material. It can be understood that for the first category of icon material and the second category of icon material, both need to present the same display effect when they are finally displayed on the desktop; that is, the first category of icon material and the second category of icon material will have the same border elements when they are finally displayed on the desktop. And, since the border of the second category of icon material comes from the border material, the border elements in the first category of icon material can be removed through the border material.
[0114] For example, see Fig.10 The CC application icon is a multi-layer icon, including: a foreground of a multi-layer icon and a background of a multi-layer icon. Among them, the foreground of the multi-layer icon has a border element; the resource management framework can remove the border elements in the foreground through the border material; and then the background is cropped through the border material. After that, the cropped background and the foreground with the border elements removed are merged to obtain the second type of icon material; for example, the foreground is covered on the background to obtain a multi-layer icon of the second type of icon material.
[0115] As another possible implementation, the resource management framework may remove the border elements by deleting the designated pixels included in the first category of icon materials to obtain the second category of icon materials.
[0116] In some embodiments, before removing the border elements in the first category of icon materials, the resource management framework can also adjust the first category of icon materials and the border materials to the same size. For example, the first category of icon materials are adjusted to the same size as the border materials, or the border materials are adjusted to the same size as the first category of icon materials, or both are adjusted to any preset size. Also, when the electronic device overlays the border materials on the first category of icon materials, the electronic device can overlap the centers of the border materials and the first category of icon materials, thereby improving the effect of deleting the border elements, such as making the border elements deleted more thoroughly.
[0117] In some embodiments, the resource management framework may not execute the judgment step of step S701 above, and execute step S702 above for each icon material obtained to remove the border element. It is understandable that for the resource management framework, the computing resources and processing resources consumed by executing step S701 will be relatively high, which will be higher than executing step S702; thus, the resource management framework can assume that each icon material it obtains has a border element, and execute step S702 for each icon material obtained to remove the border element. Based on this, the resource consumption of the resource management framework (such as computing resource consumption or processing resource consumption) can be reduced. It is understandable that for the first category of icon materials that do not have border elements, executing step S702 will not affect the display effect of the first category of icon materials.
[0118] S703. The resource management framework sends the second type of icon material and border material to the desktop APP.
[0119] In some embodiments, before sending the second-category icon material and the frame material to the desktop APP, the resource management framework may adjust the second-category icon material and the frame material to a specified size. The specified size may be any size.
[0120] It is understandable that for desktop APP, if the icon materials and border materials received by the desktop APP are of the same size, the desktop APP will not consume processing resources on unifying the size of icon materials and border materials; this will save a lot of processing resources and processing processes, and can improve the operating efficiency of the desktop APP.
[0121] Also, generally speaking, desktop APP and resource management framework are developed by different developers. Therefore, unifying the size of the second type of icon materials and border materials sent by the resource management framework to the desktop APP can save developers' development costs and improve efficiency.
[0122] As a possible implementation, the above-mentioned specified size is greater than or equal to the maximum value of all icon sizes that can be displayed by the desktop APP. For example, the specified size can be the maximum value of all icon sizes that can be displayed by the desktop APP, such as the maximum value of the above-mentioned A size, B size, and C size. It can be understood that for the desktop APP, if the size of the border material and the second type of icon material it receives is greater than or equal to the icon size that can be displayed by the desktop APP, then the desktop APP will not enlarge the two, but will only reduce them. It can be understood that since the enlargement process requires some downsampling operations, while the reduction process does not require downsampling, downsampling will affect the clarity; therefore, the impact of the reduction process on the clarity is much smaller than the impact of the enlargement process on the clarity.
[0123] Based on this, by adjusting the second type of icon materials and border materials to specified sizes, the clarity of icons displayed on the mobile phone can be further improved, which can enhance the user experience.
[0124] In other embodiments, the resource management framework can also send the second category icon materials and border materials to other applications that need to display icons, such as application managers and third-party applications. For example, the application management page of the application manager needs to display icons, and the resource management framework can also send the second category icon materials and border materials to the application manager, so that the application manager can display icons with higher clarity. For another example, the application recommendation interface of a third-party application needs to display icons, and the resource management framework can also send the second category icon materials and border materials to other third-party applications, so that the third-party applications can display icons with higher clarity.
[0125] In some other embodiments, after step S700, the resource management framework may directly send the acquired icon material and frame material to other applications that need to display icons.
[0126] After executing step S703, execute steps S704-S706.
[0127] S704. The desktop APP adjusts the size of the second category icon material and border material.
[0128] In some embodiments, the desktop APP can adjust the size of the second category icon material and the size of the border material to the target size. The target size can be the size of the target icon displayed on the mobile phone. For example, if the target icon is an A-size icon, the desktop APP adjusts the second category icon material and the border material to the size corresponding to the A-size icon, such as 40PX*40PX. For another example, if the target icon is a B-size icon, the desktop APP adjusts the second category icon material and the border material to the size corresponding to the B-size icon, such as 20PX*20PX.
[0129] In some embodiments, after the desktop APP adjusts the size of the second category icon material and the border material, the desktop APP can also perform rounding operations on the adjusted second category icon material and border material. Exemplarily, since most of the data on the mobile phone are represented as floating point numbers / fixed point numbers, this way of representing data will cause some decimals to be discarded, for example, 1 / 3 is represented as 0.3333, 1 / 7 is represented as 0.1428, etc., which may also cause the phenomenon of non-integer row display. For example, assuming that the size of the second category icon material is 60PX*60PX, after being reduced by 1 / 3, it becomes 19.998PX*19.998PX; for example, 63PX*63PX, after being reduced by 1 / 6, it becomes 10.5021PX*10.5021PX; this will also cause the phenomenon of non-integer row display. Therefore, the desktop APP can also perform rounding operations on the adjusted second category icon material and border material, which can alleviate the occurrence of non-integer row display. The above rounding operation can be an upward rounding operation, an upward even rounding operation, etc. The above upward rounding operation can be understood as the value after rounding is greater than the value before rounding, such as, for the above 19.998PX*19.998PX, the value is rounded up to 20PX*20PX. The above upward even rounding operation can be understood as the value after rounding is greater than the value before rounding, and the value after rounding is an even number, such as for the above 10.5021PX*10.5021PX, the value is rounded up to 12PX*12PX.
[0130] From the above analysis, it can be seen that the pixel points displayed in non-integer rows can be converted into pixel points displayed in integers by rounding, thereby alleviating the occurrence of the non-integer row display phenomenon. In addition, when the upward even-number rounding operation is adopted, the rounded size can be made an even number, so the symmetry of the icon can be improved.
[0131] S705. The desktop APP obtains an icon display file according to the resized second-category icon material and the resized border material.
[0132] For example, see Fig.11 , the desktop APP can place the border material on the second type of icon material to obtain an icon display file, wherein the main part of the border material covers the second type of icon material, and the blank part of the border material does not cover the second type of icon material.
[0133] As another example, the desktop APP may also reduce the second type of icon material to the same size as the blank portion of the border material, and then the desktop APP combines the reduced second type of icon material with the border material to obtain an icon display file.
[0134] S706. The desktop APP displays the icon according to the icon display file.
[0135] In the solution provided in the embodiment of the present application, after the icon display file is obtained, the icon display file will not be resized, that is, the solution provided in the embodiment of the present application will not resize the icon display file having both icon content and border elements; instead, before the icon display file is obtained, the icon content and border elements are resized separately, such as resizing the second type of icon material having icon content, and resizing the border material having border elements. In this way, the phenomenon of non-integer line display in the icon display file can be alleviated. Based on this, the mobile phone can improve the clarity of the icon and enhance the user experience by displaying icons through the above-mentioned icon display method.
[0136] Next, the icon display method provided in the embodiment of the present application is described in detail in conjunction with the user's use of the mobile phone.
[0137] Considering the resource management framework, judging whether an icon material has a border element by specifying pixels requires analyzing the icon material, which consumes some processing time and processing resources. Based on this, the mobile phone can also judge whether an icon material has a border element based on the source of the icon material. In this way, there is no need to analyze the icon material. It is only necessary to judge whether the icon material has a border element based on the storage path or name of the icon material. This can save processing time and processing resources.
[0138] For example, see Fig.12 , the above icon display method may include steps S1000-S1008.
[0139] S1000. After the desktop APP is started, the desktop APP broadcasts a startup completion event.
[0140] For example, a user triggers the power-on operation of a mobile phone, or a user triggers the restart operation of a mobile phone; a desktop APP is started, and a startup completion event is broadcasted after the startup is completed.
[0141] S1001. The resource management framework obtains icon material and frame material in response to a startup completion event.
[0142] In some embodiments, the resource management framework may obtain preset icon configuration items, wherein the icon configuration items record the name of the icon material that the resource management framework needs to obtain, the storage location of the icon material, the name of the border material, the storage location of the border material, and the size of the icon material and border material sent by the resource management framework to the desktop APP, etc. In other words, the resource management framework may obtain the icon material and border material based on the icon configuration items in response to the startup completion event.
[0143] For example, if a third-party theme is not applied on the mobile phone, but a self-developed theme is applied, the resource management framework obtains the frame material and the icon material of the system application from the self-developed theme package corresponding to the self-developed theme; and the resource management framework obtains the icon material of the third-party APP from the program package of the third-party APP. Among them, the self-developed theme can be a theme developed by the mobile phone supplier.
[0144] As another example, assuming that a third-party theme is applied on the mobile phone, the resource management framework obtains the border material and the icon material of the system application from the third-party theme package corresponding to the third-party theme; and the resource management framework obtains the icon material of the third-party APP from the program package of the third-party APP.
[0145] S1002. The resource management framework adjusts the icon material and the border material to a preset size.
[0146] In some embodiments, the preset size may be obtained by the resource management framework from the above icon configuration items, and may be any preset size, such as 196PX*196PX.
[0147] Assume that the AA application is a third-party application, and the icon material size of the AA application is the first resource size, such as 192PX*192PX. The icon material of the AA application has a border element, and the border element occupies 10 pixels around the icon material. That is to say, the size of the icon content in the icon material of the AA application is 172PX*172PX. In some embodiments, 192PX*192PX can be called sStandBgSize, and 172PX*172PX can be called IconSize.
[0148] BB application is a system preset application, and its icon size is the second resource size, such as 196PX*196PX. The icon of BB application does not have a border element. CC application is a third-party application, and the icon of CC application is a multi-layer icon, including foreground, background and icon border. The foreground of CC application has a border element, and the size of the foreground is the second resource size; for multi-layer icons, the size of the foreground of the icon is the size of the icon material. The resource management framework can adjust the size of the icon material of AA application to the second resource size, so that the size of different icon materials can be unified, so that the icon display method provided in the embodiment of the present application can be compatible with icon materials of different resource sizes; the versatility of the icon display method can be improved. Moreover, for desktop APP, the icon materials it receives are all of the same size, which can improve the processing efficiency of desktop APP. At the same time, for the developer (development team) of desktop APP, if the icon materials received by the desktop APP are all of the same size, its development cost can be saved.
[0149] S1003. The resource management framework determines whether the icon material has a border element. If so, steps S1004-S1005 are executed; if not, step S1005 is executed.
[0150] In some embodiments, in step S1003, the resource management framework can also execute steps S1004-S1005 or step S1005 according to the source of the icon material. It can be understood that for some mobile phones, the performance of their processors is not high, and the resource management framework determines whether the icon material has a border element, which will consume more processing time. In the case where the icon material is a multi-layer icon, judging whether the icon material has a border element will further consume processing time. Therefore, the resource management framework can determine whether it has a border element according to the source of the icon material, and choose to execute steps S1004-S1005 or step S1005. For example, if the icon material comes from a third-party theme package and a third-party program package, it is determined that the icon material is the first type of icon material, and steps S1004-S1005 are executed; if the icon material comes from a self-developed theme package, it is determined that the icon material is the second type of icon material, and step S1005 is executed.
[0151] Exemplarily, in step S1003, the resource management framework may execute steps S1004-S1005 or step S1005 according to Table 1 below, based on the source of the icon material, and / or based on the number of layers that make up the icon (e.g., whether it is a multi-layer icon or a single-layer icon).
[0152] Table 1
[0153]
[0154] It can be understood that, generally speaking, the supplier of the mobile phone can modify whether the icon material from the self-developed theme package has border elements; however, the supplier of the mobile phone cannot modify whether the icon material in the program package from the third-party APP and the third-party theme package has border elements. Therefore, the icon materials in the program package from the third-party APP and the third-party theme package can be set to have border elements by default, and step S1004 is performed to remove the border elements. In this way, the clarity of the icon can be improved while saving the processing resources of the mobile phone. In addition, for some icon materials in third-party theme packages, even if they do not have border elements, executing step S1004 will not affect them, and the icons can be displayed on subsequent mobile phones.
[0155] Among them, for the self-developed theme package, step S1005 can be executed directly, or steps S1004-S1005 can be executed.
[0156] Specifically, for other implementations of step S1003, reference may be made to the related introduction of step S701, which will not be described in detail here.
[0157] S1004. The resource management framework removes the border elements of the first type of icon material to obtain the second type of icon material.
[0158] Specifically, the implementation method of step S1004 can refer to the relevant introduction of the above step S702, which will not be repeated here.
[0159] S1005. The resource management framework sends the second type of icon material and border material to the desktop APP.
[0160] After step S1005, steps S1006-S1008 are executed.
[0161] S1006. The desktop APP adjusts the size of the second category icon material and border material.
[0162] S1007. The desktop APP obtains an icon display file according to the resized second-category icon material and the resized border material.
[0163] S1008. The desktop APP displays the icon according to the icon display file.
[0164] Specifically, the implementation of steps S1005 to S1008 may refer to the related introduction of the above steps S703 to S706, which will not be repeated here.
[0165] In some embodiments, after step S1008, if the user changes the theme applied on the mobile phone, the desktop APP can modify the name of the border material and the storage location of the border material in the above icon configuration item. After the icon configuration item is modified, the desktop APP can generate a theme change event. In this way, the resource management framework can respond to the theme change event and obtain the icon material and the border material to update the theme displayed on the mobile phone.
[0166] In other embodiments, after step S1008, if the user downloads a new APP, the desktop APP can add the storage location and name of the icon material of the new APP in the above icon configuration item. After the icon configuration item is modified, the desktop APP can generate a desktop icon update event. In this way, the resource management framework can respond to the desktop icon update event, obtain the icon material and the border material, and add the icon of the new APP to the mobile phone.
[0167] In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0168] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0169] The present application also provides an electronic device, such as Fig.13 As shown, the electronic device may include one or more processors 2001 , a memory 2002 and a communication interface 2003 .
[0170] The memory 2002 and the communication interface 2003 are coupled to the processor 2001. For example, the memory 2002, the communication interface 2003 and the processor 2001 may be coupled together via a bus 2004.
[0171] The communication interface 2003 is used for data transmission with other devices. The memory 2002 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 2001, the electronic device executes the relevant method steps in the above method embodiment of the present application.
[0172] Among them, the processor 2001 can be a processor or a controller, for example, it can be a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the present disclosure. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, and the like.
[0173] The bus 2004 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 2004 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0174] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the method embodiment.
[0175] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the relevant method steps in the above method embodiment.
[0176] Among them, the electronic device, computer-readable storage medium or computer program product provided in this application is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0177] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0180] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0182] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An icon display method, characterized in that: Applied to an electronic device, the target application is installed in the electronic device, and the method includes: Acquire a first picture and a second picture corresponding to a target icon, wherein the target icon is an icon of the target application, the first picture includes a content element of the target icon, and the second picture includes a border element of the target icon; Adjusting the size of the first picture to obtain a first picture of a first size, where the first size is the size of the first picture when it is displayed; Adjusting the size of the second picture to obtain a second picture of a second size, where the second size is the size of the second picture when it is displayed; synthesizing a first picture of the first size and a second picture of the second size to obtain an icon display file; The target icon is displayed based on the icon display file.
2. The method according to claim 1, characterized in that The first picture also includes the frame element; Before adjusting the size of the first picture, the method further includes: Deleting the border element included in the first picture; The adjusting the size of the first picture to obtain the first picture of the first size includes: The size of the first image with the border element deleted is adjusted to obtain the first image of the first size.
3. The method according to claim 2, characterized in that The deleting the border element included in the first picture includes: The border element included in the first picture is deleted based on the second picture.
4. The method according to claim 3, characterized in that The second picture includes a main part and a blank part, and the main part includes the frame element; The deleting the border element included in the first picture based on the second picture includes: Overlaying the second picture on the first picture; The area in the first picture that overlaps with the blank part is retained, and the area in the first picture that overlaps with the main part is deleted.
5. The method according to any one of claims 2 to 4, characterized in that: The deleting the border element included in the first picture includes: If the number of designated pixels included in the first image is greater than a preset number threshold, the first image includes a border element; The designated pixels include: pixels that are the largest in number and the same among the pixels included in the second picture.
6. The method according to any one of claims 2 to 4, characterized in that: The deleting the border element included in the first picture includes: If the target application includes a third-party application, the border element included in the first image is deleted.
7. The method according to any one of claims 2 to 4, characterized in that: The deleting the border element included in the first picture includes: If the target application includes a system application, and the electronic device applies a third-party theme, then the first image including the border element is deleted.
8. The method according to any one of claims 1 to 7, characterized in that: Before synthesizing the first picture of the first size and the second picture of the second size, the method further includes: performing a rounding operation on a first picture of the first size and a second picture of the second size; The synthesizing the first picture of the first size and the second picture of the second size includes: A first picture of a first size after the rounding operation and a second picture of a second size after the rounding operation are synthesized.
9. The method according to any one of claims 1 to 8, characterized in that: The step of acquiring the first picture and the second picture corresponding to the target icon includes: In response to a specified event, obtaining an icon image and a second image corresponding to the target icon; The designated event includes: any one of a desktop application startup completion event, an icon update event, and a theme change event.
10. The method according to any one of claims 1 to 9, characterized in that: The electronic device includes a desktop application and a resource management framework, and the step of obtaining a first image and a second image corresponding to a target icon includes: The resource management framework obtains a first picture and a second picture corresponding to the target icon; The resource management framework adjusts the sizes of the first picture and the second picture to a specified size, where the specified size is greater than or equal to the maximum size of each icon displayed by the electronic device; The method further comprises: The resource management framework sends a first picture of a specified size and a second picture of a specified size to the desktop application; The desktop application receives the first image of the specified size and the second image of the specified size.
11. An electronic device, characterized in that: The electronic device includes a memory, one or more processors and a camera, the memory is coupled to the processor, and the processor is coupled to the camera; wherein computer program code is stored in the memory, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.
Citation Information
Cited By
Icon display method, and electronic device and storage medium
EP4787160A1
Icon display method, and electronic device and storage medium
WO2025092107A1