Icon display method, and electronic device and storage medium
By obtaining and adjusting the size of the content elements and border elements of the icon, synthesizing the icon to display the file, solving the problem of low clarity of icons on electronic devices and improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/111544
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-30
- Filing Date
- 2024-08-12
- Publication Date
- 2025-05-08
AI Technical Summary
The icons displayed on electronic devices are not 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 display file to avoid size adjustments to the icon display file and alleviate the non-integer line display phenomenon.
It improves the clarity of icons displayed on electronic devices and improves the user experience.
Smart Images

Figure CN2024111544_08052025_PF_FP_ABST
Abstract
Description
Icon display method, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 30, 2023, with application number 202311437395.7 and invention name “Icon display method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] 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
[0003] With the development of terminal technologies, more and more applications (APPs) are available on electronic devices, and users usually install many APPs on their electronic devices to meet the needs of various scenarios.
[0004] 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.
[0005] Currently, the icons displayed on electronic devices have low clarity, which affects the user experience.
[0006] Summary of the Invention
[0007] 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.
[0008] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0009] In a first aspect, a method for displaying an icon is provided. The method can be applied to an electronic device installed with a target application, such as a mobile phone, tablet computer, etc. The target application can include an application whose icon is 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, where the target icon is the icon of the target application, that is, the target icon is the icon to be displayed on the electronic device; the first image includes the content elements of the target icon, and the second image includes the border elements 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 displayed, such as the size of the content elements included in the target icon displayed on the electronic device; the second size can be understood as the size of the second image when displayed, such as the size of the border elements included in the target icon displayed on the electronic device.
[0010] In this method, the electronic device does not resize the icon display file after synthesizing it. Specifically, icon display files containing both white border elements and content elements are not resized. Therefore, the phenomenon of non-integer-number rows in icon display files, which affects the clarity of icon display, can be alleviated. This improves the clarity of icons displayed on the electronic device and enhances the user experience.
[0011] In one design of the first aspect, before adjusting the size of the first image, the method further includes: the electronic device deleting a border element included in the first image. Furthermore, adjusting the size of the first image to obtain the first image of the first size includes: the electronic device resizing the first image from which the border element has been deleted to obtain the first image of the first size.
[0012] In this design, considering that the first image may include border elements, the electronic device can remove the border elements included in the first image before resizing the first image. This ensures that the first image does not include border elements. This can alleviate the phenomenon of non-integer number of rows displayed in the first image, further improve the clarity of icons displayed on the electronic device, and further enhance the user experience.
[0013] In another possible design of the first aspect, the electronic device deleting the border elements included in the first image includes: the electronic device deleting the border elements included in the first image based on the second image. In this design, because the electronic device displays icons in a uniform display effect when the electronic device displays the icons, the border elements included in the first image and the border elements included in the second image have a corresponding relationship, such as being identical. As a result, the border elements included in the first image can be quickly and accurately deleted using the second image.
[0014] In another possible design of the first aspect, the second image includes a main portion and a blank portion, and the main portion includes a border element. The electronic device deleting the border element included in the first image based on the second image includes: the electronic device overlaying the second image on the first image, aligning the centers of the two images, retaining the area of the first image that overlaps with the blank portion, and deleting the area of the first image that overlaps with the main portion.
[0015] In another possible design of the first aspect, the electronic device deletes the border elements included in the first picture, including. If the number of designated pixels included in the first picture is greater than a preset number threshold, the border elements included in the first picture are deleted. The above-mentioned designated pixels include: the largest number of identical pixels among the pixels included in the second picture. 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 picture, it can be accurately determined whether the first picture includes a border element.
[0016] 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.
[0017] 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, then the electronic device deletes the border element included in the first image. In this design, the first image corresponds to the target icon, which 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.
[0018] In another possible design of the first aspect, before the electronic device synthesizes the first image of the first size and the second image of the second size, the method further includes: the electronic device performing a rounding operation on the first image of the first size and the second image of the second size. Furthermore, synthesizing the first image of the first size and the second image of the second size includes: the electronic device synthesizing the first image of the first size after the rounding operation and the second image of the second size after the rounding operation.
[0019] In this design, considering that resizing the first and second images may result in non-integer rows being displayed, the resized first image (i.e., the first image at the first size and the second image at the second size) can be rounded to an integer. This can further mitigate the non-integer row display phenomenon and further improve icon clarity.
[0020] 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 launch completion event, an icon update event, and a theme change event.
[0021] 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 obtaining 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, where 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 sending the first image and the second image of the specified size to the desktop application. The desktop application receives the first image and the second image of the specified size.
[0022] It is understandable that the resource management framework and desktop application may be developed by different developers (development teams). In this design, for desktop apps, the icon materials they receive are all the same size, which can improve the processing efficiency of desktop apps. At the same time, for desktop app developers, if the icon materials they receive are all the same size, they can save their development costs.
[0023] 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 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 provided by the above-mentioned first aspect and any possible design of the first aspect.
[0024] 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 above-mentioned first aspect and any possible design of the first aspect.
[0025] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when run 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.
[0026] 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
[0027] FIG1 is a schematic diagram of a usage scenario provided by an embodiment of the present application;
[0028] FIG2 is a schematic diagram of a desktop of an electronic device provided in an embodiment of the present application;
[0029] FIG3 is a schematic diagram of an icon provided in an embodiment of the present application;
[0030] FIG4 is a schematic diagram of a flowchart of an icon display process provided in an embodiment of the present application;
[0031] FIG5 is a flow chart of another icon display process provided in an embodiment of the present application;
[0032] FIG6 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0033] FIG7 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0034] FIG8 is a flow chart of an icon display method provided in an embodiment of the present application;
[0035] FIG9 is a schematic diagram of a process for removing border elements provided in an embodiment of the present application;
[0036] FIG10 is a schematic diagram of a process for removing border elements of a multi-layer icon according to an embodiment of the present application;
[0037] FIG11 is a schematic diagram of a process for generating an icon display file according to an embodiment of the present application;
[0038] FIG12 is a flow chart of another icon display method provided in an embodiment of the present application;
[0039] FIG13 is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] 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 description of the association relationship of 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. In addition, 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 similar expressions refers to any combination of these items, including any combination of single 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, to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0041] At the same time, in the embodiments of this 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 this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.
[0042] Users can install multiple apps on their electronic devices to meet the needs of various scenarios. For apps already installed on an electronic device, the electronic device can display the corresponding app icon on the desktop. Users can click the app icon to launch the corresponding app. Alternatively, they can drag the desktop icon to manage the app icons.
[0043] For example, referring to FIG1 , the technical solution provided in the embodiment of the present application can be applied to the daily use of electronic devices by users. During the daily use of electronic devices by users, the electronic devices can display a desktop, and the user can click an 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.
[0044] For example, referring to FIG2 , an A-size icon 101, a card 102, a large folder 103, and a small folder 104 are displayed on the desktop of an 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 size displayed on the display screen. The processes displayed on the desktop 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 embodiment of the present application, including but not limited to the A-size icon 101, the B-size icon 105, and the C-size icon 106 shown in FIG2 , in actual applications, the icons have other and more sizes, etc.; the specific design can be based on actual usage requirements, and the embodiment of the present application does not impose any restrictions on the size of the icon.
[0045] For example, referring to FIG3 , the icon structure is described using the A-size icon 101 corresponding to the memo app in FIG2 . 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 (PX) by 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, and other aspects within the icon. The portion of the border 101-3 filled with diagonal lines is the main portion of the border 101-3, while the remaining portion is blank. When the border 101-3 and the icon content 101-2 are superimposed, the blank portion does not obscure the icon content 101-2, displaying the icon content; the main portion obscures the icon content 101-2, displaying the main portion, such as a fully transparent display or a specific color. 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 (mask), a border element, and so on; the icon content can also be called an icon content element, a content element, and so on. Electronic devices can carry border elements through border materials, and electronic devices can carry icon content elements through icon materials. The above-mentioned border materials can also be called border material files, border material pictures, and the above-mentioned icon materials can also be called icon material pictures. 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 elements of the icon (icon content elements), and the second picture includes border elements.
[0046] Icons can be divided into single-layer icons and multi-layer icons based on the layers they consist of. A single-layer icon is an icon with only one layer, which contains all of the icon's content. A multi-layer icon consists of multiple layers, such as a foreground and background, which together contain all of the icon's content.
[0047] Icons can be categorized as third-party app icons and system icons based on the application they correspond to, or the source of the application they correspond to. Third-party app icons correspond to third-party apps, while system icons correspond to system applications. Third-party app icons are icons developed by the developer of the third-party app, such as the AA video app icon or the BB music app icon. System icons are icons for applications pre-installed in the electronic device's operating system, such as the phone app icon or the short messaging app icon.
[0048] In some embodiments, the electronic device may obtain icon material and frame material, then obtain an icon display file based on the icon material and frame material, and then resize the icon display file and display the icon based on the resized icon display file.
[0049] For example, using the A-size icon corresponding to the Memo app as an example (see Figure 4), the electronic device obtains icon material 101B and border material 101C. The electronic device then generates icon display file 101-A based on icon material 101B and border material 101C. Next, the electronic device resizes icon display file 101-A and displays the icon based on the resized icon display file 101-B.
[0050] Because the electronic device adjusts the size of the icon display file to display icons of different sizes on the desktop, such as the A-size icon 101, the B-size icon 103 or the C-size icon 106 in Figure 2. 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 rows (columns) display will occur. Especially at the junction of the border material and the icon material, the phenomenon of non-integer rows (columns) display will occur very frequently. This will make the clarity of the icons displayed on the electronic device not high, which will affect the user experience. Among them, the phenomenon of non-integer rows (columns) display can also be referred to as decimal row (column) display phenomenon, fractional row (column) display phenomenon, etc. For the convenience of description below, the phenomenon of non-integer rows (columns) display can be referred to as non-integer row display phenomenon.
[0051] 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 an 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. Normally, a certain RGB value is displayed only at the position corresponding to an integer row and an integer column in the display file, which can be called an integer row display.
[0052] However, in some cases, the display file may include RGB values displayed in non-integer rows / columns, 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 such a file, non-integer rows may appear. Specifically, when the display screen displays based on such a file, it will merge the RGB code values of the non-integer rows / columns into the RGB code values of the integer rows / columns, and control the pixels corresponding to the integer rows / columns to display the merged RGB code values. Suppose a 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 with 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 may be (166.166.166). The image corresponding to the display file is then displayed on the display screen based on 51PX*51XP_RGB(166.166.166). Obviously, the image (200.200.200) that should have been displayed on the display screen at 51PX*51XP is instead displayed as (166.166.166). This will cause the color of the image displayed on the display screen to change, thereby affecting the clarity of the image displayed on the display screen.
[0053] For example, referring to Figure 4 again, 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, and the border 101B is fully transparent, displaying the color of the desktop wallpaper, such as green. Because a non-integer row 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 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 or dark green.
[0054] From the above analysis, we can see that due to the phenomenon of non-integer row display, the RGB values of the pixels on the display screen are different from the RGB values recorded in the display file. This will result in low clarity of icons displayed on the electronic device, affecting the user experience.
[0055] In view of this, an embodiment of the present application provides an icon display method. In this method, after obtaining icon material, the electronic device first resizes it, and then obtains an icon display file based on the resized border material and the icon material. The electronic device then directly displays the icon based on the icon display file.
[0056] Exemplarily, taking 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 picture of the first size) and the resized border material 101C-1 (also known as the second picture 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 according to the icon display file. It can be understood that the size adjustment shown in Figure 5 is enlargement; in some cases, the size adjustment can also be reduction. Whether the above-mentioned size adjustment is enlargement or reduction shall be based on actual usage requirements, and the embodiment of the present application does not impose any restrictions on the above-mentioned size adjustment.
[0057] Among them, the above-mentioned first size can be understood as the size when the first picture is displayed, such as the size of the content elements included in the target icon displayed on the electronic device; for example, the size of the icon content 101C in the above-mentioned Figure 3, and for example, the size of the icon content 101C in the above-mentioned Figure 4; the second size can be understood as the size when the second picture is displayed, such as the size of the border elements included in the target icon displayed on the electronic device; for example, the size of 101B in the above-mentioned Figure 3.
[0058] In this solution, since the electronic device does not resize the icon display file after obtaining it, that is, the icon display file that has both icon content and border elements is not resized, the phenomenon of non-integer row display of the icon display file can be alleviated; in fact, 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 it, and the phenomenon of non-integer row display appears in the icon display file. Using the above method for icon display can improve the clarity of the icons displayed on the electronic device and enhance the user experience.
[0059] 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), or other electronic device with a display screen; it may also be a vehicle-mounted device with a display screen, such as a car computer; or it may be some IoT devices with a display screen, such as smart watches and smart bracelets. The embodiments of the present application do not impose any restrictions on the product form of the electronic device.
[0060] Next, the hardware structure and software structure of the electronic device 1000 are briefly introduced.
[0061] Exemplarily, referring to FIG6 , 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.
[0062] It should be understood that the structures illustrated in the embodiments of the present application do 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0063] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.
[0064] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.
[0065] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0066] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0067] For example, the electronic device 100 may display an APP icon through the display screen 194 .
[0068] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0069] Illustratively, 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 aforementioned icon materials, frame materials, theme packages, and the like.
[0070] 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 can 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 can 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.
[0071] 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.
[0072] 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 exemplarily described.
[0073] FIG7 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
[0074] 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.
[0075] The application layer can include a series of application packages.
[0076] As shown in FIG7 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, and video.
[0077] 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.
[0078] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0079] As shown in FIG7 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
[0080] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0081] 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.
[0082] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0083] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0084] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0085] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0086] The application framework layer may further 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.
[0087] Android TM Runtime includes core libraries and virtual machines. Android TM runtime is responsible for Android TM System scheduling and management.
[0088] 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.
[0089] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0090] The system library can 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.
[0091] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0092] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0093] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0094] A 2D graphics engine is a drawing engine for 2D drawings.
[0095] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0096] As a possible implementation, the resource management framework can obtain icon materials and border materials and send them to the desktop app. The desktop app then adjusts the size of the icon materials and border materials. The desktop app then obtains an icon display file based on the resized icon materials and border materials. The desktop app then displays the icon on the display screen 194 according to the icon display file.
[0097] Below, the icon display method provided in the embodiment of the present application will be introduced by taking the usage scenario shown in Figure 1, where the electronic device is a mobile phone and the mobile phone displays icons on the desktop as an example.
[0098] Considering that some icon materials may have border elements while others do not, 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 border elements. If so, the border elements are removed before adjusting the size and generating the icon display file.
[0099] For example, referring to FIG. 8 , the icon display method provided in the embodiment of the present application may include steps S700 - S706 .
[0100] S700. The resource management framework obtains icon materials and border materials.
[0101] 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.
[0102] For example, the resource management framework can obtain icon materials for system applications from the target theme package, or obtain icon materials for third-party applications from the program package of third-party apps. System applications can be understood as applications pre-configured on the mobile phone's operating system, 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. In addition, the resource management framework can obtain frame materials from the target theme package.
[0103] As a possible implementation, 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.
[0104] As you can understand, after the desktop app is launched, it will generate a "Startup Completed" event and send it to the resource management framework. Alternatively, the desktop app can broadcast the event. Alternatively, if the user downloads and installs the app on their phone, the desktop app will generate a "Desktop Icon Updated" event, which it will then send to the resource management framework. Alternatively, if the user changes the theme of the mobile app, the desktop app can generate a "Theme Changed" event, which it will then send to the resource management framework.
[0105] 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.
[0106] S701. The resource management framework determines whether the icon material has a border element. If so, steps S702-S703 are executed; if not, step S703 is executed.
[0107] 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.
[0108] 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.
[0109] As a possible implementation, the resource management framework can determine whether an 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 threshold, the icon material is determined to be a first-class icon material. The threshold can be 50, 100, 230, etc.
[0110] The designated pixels correspond to the pixels constituting the border material, for example, the designated pixels may be the largest number of pixels constituting the border material, such as transparent pixels.
[0111] It is understandable that when displaying icons, in order to ensure the coordination of icon display on the mobile phone, that is, the borders of different icons should be unified, such as the color. 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, and the pixels that make up the border materials are the same. 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 among the multiple 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.
[0112] As another possible implementation, the above-mentioned designated pixels may also be preset, for example, the designated pixels may be pre-configured in the configuration items of the mobile phone.
[0113] S702. The resource management framework removes the border elements included in the first type of icon material to obtain the second type of icon material.
[0114] As a possible implementation, the resource management framework may remove the border elements in the first type of icon material through the border material to obtain the second type of icon material.
[0115] Exemplarily, the first category of icon materials and border materials obtained by the resource management framework are shown in Figure 9. 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, the two 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.
[0116] As another example, referring to Figure 10 , the CC application icon is a multi-layered icon, including: a multi-layered foreground and a multi-layered background. The foreground of the multi-layered icon has a border element; the resource management framework can remove the border element from the foreground using border material; and then crop the background using the border material. The cropped background and the foreground without the border element are then combined to obtain a second type of icon material; for example, the foreground is overlaid on the background to obtain a multi-layered icon of the second type of icon material.
[0117] As another possible implementation, the resource management framework may remove the border elements by deleting the designated pixels included in the first type of icon material to obtain the second type of icon material.
[0118] In some embodiments, before removing the border elements in the first category of icon material, the resource management framework may also adjust the first category of icon material and the border material to the same size. For example, the first category of icon material is adjusted to the same size as the border material, or the border material is adjusted to the same size as the first category of icon material, or both are adjusted to any preset size. Also, when the electronic device overlays the border material on the first category of icon material, the electronic device may overlap the centers of the border material and the first category of icon material, thereby improving the effect of deleting the border element, such as making the border element deleted more thoroughly.
[0119] In some embodiments, the resource management framework may also not execute the judgment step of the above-mentioned step S701, and execute the above-mentioned step S702 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, and 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.
[0120] S703. The resource management framework sends the second type of icon material and border material to the desktop APP.
[0121] In some embodiments, before sending the second-category icon material and the border material to the desktop APP, the resource management framework may adjust the second-category icon material and the border material to a specified size. The specified size may be any size.
[0122] It is understandable that for desktop apps, if the icon materials and border materials received by the desktop apps are of the same size, the desktop apps will not consume processing resources on unifying the sizes 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 apps.
[0123] Also, generally speaking, desktop apps and resource management frameworks are developed by different developers. Therefore, unifying the sizes of the second-category icon materials and border materials sent by the resource management framework to desktop apps can save developers' development costs and improve efficiency.
[0124] 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 size A, size B, and size C. 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.
[0125] Based on this, by adjusting the second type of icon materials and border materials to the specified size, the clarity of the icons displayed on the mobile phone can be further improved, which can enhance the user experience.
[0126] In other embodiments, the resource management framework can also send the second category of icon materials and border materials to other applications that need to display icons, such as application managers and third-party applications. For example, if the application management page of the application manager needs to display icons, the resource management framework can also send the above-mentioned second category of icon materials and border materials to the application manager, so that the application manager can display icons with higher clarity. For another example, if the application recommendation interface of a third-party application needs to display icons, the resource management framework can also send the above-mentioned second category of icon materials and border materials to other third-party applications, so that the third-party applications can display icons with higher clarity.
[0127] 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.
[0128] After executing step S703, execute steps S704-S706.
[0129] S704. The desktop APP adjusts the size of the second type of icon material and border material.
[0130] 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 will adjust 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 will adjust the second-category icon material and the border material to the size corresponding to the B-size icon, such as 20PX*20PX.
[0131] In some embodiments, after the desktop APP adjusts the size of the second-category icon material and border material, the desktop APP can also perform rounding operations on the adjusted second-category icon material and border material. For example, since most data on mobile phones 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, and so on, 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-mentioned rounding operation can be a round-up operation, a round-up to even operation, etc. The above-mentioned round-up operation can be understood as the value after rounding is greater than the value before rounding, for example, for the above-mentioned 19.998PX*19.998PX, the round-up is 20PX*20PX. The above-mentioned round-up to even operation can be understood as the value after rounding is greater than the value before rounding and is an even number after rounding, for example, for the above-mentioned 10.5021PX*10.5021PX, the round-up to even operation is 12PX*12PX.
[0132] From the above analysis, we can see that by rounding up, we can convert pixels in non-integer rows into integer pixels, thereby alleviating the occurrence of non-integer row display. Furthermore, by rounding up to an even number, we can make the rounded size an even number, thus improving the symmetry of the icon.
[0133] S705. The desktop APP obtains an icon display file based on the resized second-category icon material and the resized border material.
[0134] For example, referring to FIG11 , a desktop APP may place a frame material on top of the second type of icon material to obtain an icon display file, wherein the main portion of the frame material obscures the second type of icon material, and the blank portion of the frame material does not obscure the second type of icon material.
[0135] 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.
[0136] S706. The desktop APP displays the file icon according to the icon.
[0137] 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 to say, the solution provided in the embodiment of the present application will not resize the icon display file that has both icon content and border elements; instead, before obtaining the icon display file, the icon content and border elements are resized separately, such as resizing the second type of icon material with icon content and resizing the border material with border elements. In this way, the phenomenon of non-integer row display in the icon display file can be alleviated. Based on this, the mobile phone can improve the clarity of the icon by displaying the icon through the above-mentioned icon display method, thereby improving the user experience.
[0138] 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.
[0139] Considering the resource management framework, determining whether an icon material has border elements by specifying pixels requires analyzing the icon material, which consumes some processing time and resources. Based on this, the phone can also determine whether an icon material has border elements based on its source. This eliminates the need to analyze the icon material itself; instead, it can determine whether an icon material has border elements based on its storage path or name. This saves processing time and resources.
[0140] Exemplarily, referring to FIG. 12 , the above-mentioned icon display method may include steps S1000 - S1008 .
[0141] S1000. After the desktop APP is started, the desktop APP broadcasts a startup completion event.
[0142] For example, if the user triggers the power-on operation of the mobile phone, or the user triggers the restart operation of the mobile phone; the desktop APP starts and broadcasts the startup completion event after the startup is completed.
[0143] S1001. The resource management framework obtains icon material and frame material in response to a startup completion event.
[0144] In some embodiments, the resource management framework can obtain a preset icon configuration item, where the icon configuration item records 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 can obtain the icon material and border material based on the icon configuration item in response to the startup completion event.
[0145] For example, assuming a phone is not using a third-party theme but a self-developed theme, the resource management framework retrieves border materials and system application icon materials from the self-developed theme package corresponding to the self-developed theme; and the resource management framework retrieves the icon materials of the third-party app from the third-party app package. The self-developed theme can be a theme developed by the phone's supplier.
[0146] 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.
[0147] S1002. The resource management framework adjusts the icon material and the border material to a preset size.
[0148] 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.
[0149] 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. In other words, 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.
[0150] 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, and 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 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 desktop APP are all the same size, its development cost can be saved.
[0151] 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.
[0152] In some embodiments, in step S1003, the resource management framework may further execute steps S1004-S1005 or step S1005 according to the source of the icon material. It is understandable that for some mobile phones, the performance of their processors is not high, and the resource management framework will consume more processing time to determine whether the icon material has a border element. In the case where the icon material is a multi-layer icon, determining whether the icon material has a border element will further consume processing time. Therefore, the resource management framework may determine whether the icon material 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.
[0153] 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).
[0154] Table 1
[0155] It is understandable 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 can be 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 the third-party theme package, 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.
[0156] Among them, for self-developed theme packages, step S1005 can be executed directly, or steps S1004-S1005 can be executed.
[0157] Specifically, for other implementations of step S1003, reference may be made to the relevant introduction to step S701 above, which will not be repeated here.
[0158] S1004. The resource management framework removes the border elements of the first type of icon material to obtain the second type of icon material.
[0159] Specifically, the implementation of step S1004 can refer to the relevant introduction of the above step S702, which will not be repeated here.
[0160] S1005. The resource management framework sends the second type of icon material and border material to the desktop APP.
[0161] After step S1005, steps S1006-S1008 are executed.
[0162] S1006. The desktop APP adjusts the size of the second type of icon materials and border materials.
[0163] S1007. The desktop APP obtains an icon display file based on the resized second-category icon material and the resized border material.
[0164] S1008. The desktop APP displays the icon according to the file display icon.
[0165] Specifically, the implementation of steps S1005 to S1008 can refer to the relevant introduction of the above steps S703 to S706, which will not be repeated here.
[0166] 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-mentioned 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 border material to update the theme displayed on the mobile phone.
[0167] 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 new app's icon material to the above-mentioned 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 and obtain the icon material and border material to add the new app icon to the mobile phone.
[0168] In conjunction with the algorithmic 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 hardware or in a manner driven by computer software 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 conjunction with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0169] In this embodiment, the electronic device can be divided into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.
[0170] An embodiment of the present application further provides an electronic device, as shown in FIG13 , which may include one or more processors 2001 , a memory 2002 , and a communication interface 2003 .
[0171] 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.
[0172] The communication interface 2003 is used to transmit data 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 performs the relevant method steps in the above-mentioned method embodiment of the present application.
[0173] The processor 2001 may be a processor or controller, such as a central processing unit (CPU), a general-purpose 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 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0174] 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 illustration, FIG13 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0175] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiment.
[0176] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the relevant method steps in the above method embodiment.
[0177] 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.
[0178] 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.
[0179] In the several embodiments provided in this 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 merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, 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.
[0180] The units described as separate components may or may not be physically separate, 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 places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0181] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0182] 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 contributing part 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 and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0183] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection 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
Patent Citations
Icon display method, electronic equipment and storage medium
CN119960859A
Electronic device and method for generating graphical user interface thereof
CN102819381A
Application icon display method and device
CN106708503A
Application notification message processing method, equipment, storage medium and program product
CN113835574A
Icon display method and device and electronic equipment
CN113961112A