Method and device for displaying icon badge

A method for displaying a badge of an icon is disclosed. The method may comprise acquiring feature information of the icon; determining a display element of the badge according to the acquired feature information; and generating and displaying the badge according to the determined display element, at a preset position of the icon.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims priority to Chinese Patent Application No. 201510441327.7, filed Jul. 24, 2015, the entire contents of which are incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to the technical field of icon display and, more particularly, to a method and a device for displaying a badge of an icon.

BACKGROUND

In smart phones, when an application receives a message, a badge may appear on the upper right corner of the application's icon, for example, as a superscript number. The badge may serve to notify a user of the received message.

In current Android or iOS system, badge colors and patterns may be consistent for all applications. For instance, the badge color and pattern in the iOS system include a white number in a red background encircled by a white border.

SUMMARY

One aspect of the present disclosure is directed to a method for displaying a badge of an icon. The method may comprise acquiring feature information of the icon; determining a display element of the badge according to the acquired feature information; and generating and displaying the badge according to the determined display element, at a preset position of the icon.

Another aspect of the present disclosure is directed to a device for displaying a badge of an icon. The device may comprise a processor and a memory for storing instructions executable by the processor. The processor may be configured to acquire feature information of the icon; determine a display element of the badge according to the acquired feature information; and generate and display the badge, according to the determined display element, at a preset position of the icon.

Another aspect of the present disclosure is directed to a non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor in a terminal device, cause the terminal device to perform a method for displaying a badge of an icon. The method may comprise acquiring feature information of the icon; determining a display element of the badge according to the acquired feature information; and generating and displaying the badge, according to the determined display element, at a preset position of the icon.

DETAILED DESCRIPTION

FIG. 1is a flow chart illustrating a method100for displaying a badge of an icon, according to an exemplary embodiment. As shown inFIG. 1, the method100for displaying a badge of an icon can be implemented by a terminal device such as a mobile phone, a camera, a tablet, or an application, and may include the following steps S101-S103.

In step S101, when generating a badge of an icon, feature information of the icon is acquired. In some embodiments, icons of some applications may be on a system desktop, or saved in a folder. Therefore, the icon may be an application icon, an application folder icon, or another type of icon. Accordingly, the badge of the icon may be a badge of the application icon, a badge of the application folder icon, or a badge of another type of icon. The application icon can be a shortcut icon of the application, and when the application icon is double-clicked, the application may be started.

In step S102, a display element of the badge is determined according to the acquired feature information. The display element of the badge may include one or more of a shape of the badge, a background color of the badge, a color of a character in the badge, and a font of a character in the badge. The display element of the badge may also include one or more of a color of the badge border (a border of the badge), a width of the badge border, and a shape of the badge border.

In step S103, the badge according to the determined display element is generated and displayed at a preset position of the icon.

In one embodiment, when generating a badge of an icon, the display element of the badge can be determined according to the feature information of the icon, and the badge can be generated and displayed at the preset position of the icon according to the determined display element. Thus, the badge of the icon can be displayed in different styles for different applications, easing the visual fatigue from a flood of similar badges on the desktop.

FIG. 2is a flow chart illustrating a method200for displaying a badge of an icon, according to an exemplary embodiment. As shown inFIG. 2, the method200for displaying a badge of an icon can be implemented by a terminal device such as a mobile phone, a camera, a tablet, or an application, and may include the following steps S201-S204.

In step S201, when generating a badge of an icon, feature information of the icon is acquired. In some embodiments, icons of some applications may be on a system desktop, or saved in a folder. Therefore, the icon may be an application icon, an application folder icon, or another type of icon. Accordingly, the badge of the icon may be a badge of the application icon, a badge of the application folder icon, or a badge of another type of icon. The application icon can be a shortcut icon of the application, and when the application icon is double-clicked, the application may be started.

In step S202, a display element including at least one of a shape of the badge, a background color of the badge, a color of a character in the badge, or a font of a character in the badge is determined according to the feature information of the icon. That is, the display element of the badge may include one or more of the shape of the badge, the background color of the badge, the color of the character in the badge, and the font of the character in the badge.

In step S203, the display element further including at least one of a border of the badge, a width of the border, or a shape of the border is determined according to the feature information of the icon. That is, the display element of the badge may further include one or more of the color of the badge border, the width of the badge border, and the shape of the badge border.

In step S204, the badge according to the determined display element is generated and displayed at a preset position of the icon. The step may further include generating and displaying the badge border, e.g., generating and displaying the badge border according to the color of the badge border, the width of the badge border, and/or the shape of the badge border described above. For example, if the background color of the badge is a first color (red), in order to distinguish from the application icon, a second color (white) having a width of N pixels can be used as the badge border.

Thus, the generated badge border can look more obvious.

FIG. 3is a flow chart illustrating a method300for displaying a badge of an icon, according to an exemplary embodiment. As shown inFIG. 3, the method300for displaying a badge of an icon can be implemented by a terminal device such as a mobile phone, a camera, a tablet, or an application, and may include the following steps S301-S303.

In step S301, when generating a badge of an icon, an application type corresponding to the icon is acquired. The icon may be an application icon, an application folder icon, or another type of icon. Accordingly, the badge may be a badge of the application icon, a badge of the application folder icon, or a badge of other icon.

In step S302, a display element of the badge is determined according to a preset corresponding relationship between the acquired application type and the display element. The display element of the badge may include one or more of a shape of the badge, a background color of the badge, a color of a character in the badge, and a font of a character in the badge. The display element of the badge may also include one or more of a color of the badge border, a width of the badge border, and a shape of the badge border.

In some embodiments, the step S302may further include the following.

First, application programs or application folders can be classified in advance. For example, the applications or programs may be classified into video type, communication type, work type, or the like according to functions. The applications may also be classified according to standards such as user habits, frequencies of use, or time periods of using the application programs. Accordingly, for example, the applications may be classified into work type, leisure type, or the like. The type of the application folder may be determined according to types of the applications included in the application folder. For example, the application folders may be classified into video type, communication type, work type, or the like. Moreover, the application folders may also be classified according to standards such as user habits, frequency of use, or time periods of using the application programs in the folders. Similarly, for example, the application folders may be classified into work type, leisure type, or the like.

Second, a corresponding relationship between the various application types and the various display elements of the badge can be established. For example, when a corresponding relationship between a communication application and a display element is established, a background color of the badge corresponding to a communication application can be red, a color of a character in the corresponding badge can be black, and a font of a character in the corresponding badge can be Song typeface. If the display element of the badge corresponding to the communication application further includes one or more of a color of the badge border, a width of the badge border, and a shape of the badge border, the color can be white, the width can be three pixels, and the shape can be rectangle.

Third, a display element of the badge can thus be determined according to the preset corresponding relationship between the application type and the display element.

In step S303, a badge is generated and displayed at a preset position of the icon, according to the determined display element. For example, when the current application type is a communication type, the display element may include a background color of the badge being red, a color of a character in the badge being black, a font of a character in the badge being Song typeface, a color of the badge border being white, a width of the badge border being three pixels, and a shape of the badge border being rectangle, and the badge may be displayed according to the display element.

As described, different display styles may be used for badges of different applications according to application types, thus improving the user experience.

FIG. 4is a flow chart illustrating a method400for displaying a badge of an icon, according to an exemplary embodiment. As shown inFIG. 4, the method400for displaying a badge of an icon can be implemented by a terminal device, such as a mobile phone, a camera, a tablet, or an application, and may include the following steps S401-S403.

In step S401, when generating a badge of an icon, a priority level of an application corresponding to the icon is acquired. The icon may be an application icon, an application folder icon, or another type of icon. Accordingly, the badge of the icon may be a badge of the application icon, a badge of the application folder icon, or a badge of another type of icon.

In step S402, a display element of a badge of the icon is determined according to a preset corresponding relationship between the acquired priority level and the display element. The display element of the badge may include one or more of a shape of the badge, a background color of the badge, a color of a character in the badge, and a font of a character in the badge. The display element may also include one or more of a color of the badge border, a width of the badge border, and a shape of the badge border.

The step402may further include the following.

First, various priority levels of applications or application folders can be determined in advance. For example, priority levels of one or more applications most frequently used can be set to the highest according to a use habit or a use frequency.

Second, a corresponding relationship between the priority levels and different badge display styles can be established. For example, a corresponding relationship can be established between an application of the highest priority level and badge display styles including: a first color, red (which may be more distinguishing than other colors), as a background color of the badge, a second color, black, as a color of a character in the badge, a first shape, rhombus, as a shape of the badge, and a first typeface, Song typeface, as a font of a character in the badge. The step402may further include: setting a color of the badge border corresponding to the application having the highest priority level as grey, setting a width of the corresponding badge border as four-pixel width, and setting a shape of the corresponding badge border as rhombus.

Third, the display element of a badge of the icon can be determined according to the preset corresponding relationship.

In step S403, a badge is generated and displayed at a preset position of the icon, according to the determined display element. For example, when generating a badge of an application of the highest priority level, the first color can be used as the background color of the badge, the second color can be used as the color of a character in the badge, the first shape, e.g., rhombus, can be used as the shape of the badge, and the first typeface, e.g., Song typeface, can be used as the font of the character in the badge. The step S403may further include: when generating the badge of the application having the highest priority level, using grey as the color of the badge border, using four-pixel width as the width of the badge border, and using rhombus as the shape of the badge border.

As described, badges having different display elements may be used for various applications according to their application priority levels.

FIG. 5is a flow chart of a method500for displaying a badge of an icon, according to an exemplary embodiment. As shown inFIG. 5, the method500for displaying a badge of an icon may be implemented by a terminal device such as a mobile phone, a camera, a tablet, or an application, and may include the following steps S501-S503.

In step S501, when generating a badge of an icon, a feature color of the icon is acquired. In the step, the icon may be an application icon, an application folder icon, or another type of icon. Accordingly, the badge of the icon may be a badge of the application icon, a badge of the application folder icon, or a badge of another type of icon.

In step S502, the feature color is used as a background color of the badge; and/or as a color of a character in the badge. In one embodiment, the display element may include the background color of the badge and/or the color of a character in the badge. For example, a color value appearing most frequently can be used as a representative color, and the representative color can be designated as a color of a lower layer of the badge (background).

In step S503, a badge is generated and displayed at a preset position of the icon, according to the determine display element.

In one embodiment, different display styles may be employed for different application badges according to the feature colors of the application icons.

In one embodiment, the step S501may further include:

acquiring a most frequently appearing color value among color values of all pixels of the icon, and using the acquired color value as the feature color of the icon.

In some embodiments, the icon may be an application icon, e.g., the application corresponding to the icon can be an application program. A most frequently appearing color value can be used as a representative color, and the representative color can be designated as a color of the lower layer of the badge (background), or as a color of a character in the badge.

In one embodiment, the step S501may further include: averaging color values of pixels with similar colors in image files of the icon, and using the averaged value as the feature color of the icon.

In some embodiments, the icon can be an application icon, e.g., the application corresponding to the icon can be an application program, and the icon mainly comprises gradient colors. That is, the icon may mostly comprise similar gradient colors, with a small number of pixels having the same color, and a large number of pixels having similar colors.

In one embodiment, when an application corresponding to the icon is an application folder, as shown inFIG. 6, the step S501may include the following steps.

In step601, all image files of all application icons in an application folder are acquired.

In step602, a most frequently appearing color value of all pixels in all the image files is used as a feature color of an icon.

In some embodiments, the icon can be an application folder, e.g., the application corresponding to the icon is an application folder. A most frequently appearing color value can be used as a representative color, and the representative color can be designated as a color of the lower layer of the badge (background), or as a color of a character in the badge.

In one embodiment, when an application corresponding to the icon is an application folder, as shown inFIG. 7, the step S501may include the following steps.

In step701, all image files of all application icons in an application folder are acquired.

In step702, color values of pixels with similar colors among all the pixels in the image files are averaged, and the averaged value is used as a feature color of an icon.

In some embodiments, the icon can be an application folder, e.g., the application corresponding to the icon can be an application folder, and the icon mainly comprises gradient colors. That is, the icon may mostly comprise similar gradient colors, with a small number of pixels having the same color, and a large number of pixels having similar colors.

In some embodiments, a method for displaying a badge of an icon can help users to overcome visual fatigue of desktop badges. Since the color of the badge can be automatically changed according to the color of the application icon, there can be no more monotonous badges having a single color on the desktop. Instead, various badge colors in accordance with the corresponding applications can ease the visual fatigue.

If the APP (application program) icon is directly displayed on the desktop, the method may include the following steps.

In step 1, a system selects colors according to an icon of an application on the desktop. For example, the system may read an image file of an icon of an application, analyze, and obtain a most frequently appearing color value among color values of all pixels in the image file. The color value can be returned as a result of a color selection, of a representative color, from the application icon. The system may comprise a processor and a non-transitory computer-readable storage medium storing instructions that, when executed by the process, cause the system to perform step 1 and step 2.

In step 2, the system designates the selected color as a color of a lower layer of the application badge. The system may also add a white border having a three-pixel width for the badge as a badge border. That is, because a representative color of the colors of the application icon is used in the badge, a border may be added on the periphery of the badge to distinguish the badge.

The method may have the following advantageous effects.

The method can reduce visual fatigue caused by monotonous badges, and can improve notification efficiency and user experience. Moreover, the application scenario can optimize badge color systems to provide badges with different colors according to different features of the application programs.

FIG. 8is a block diagram illustrating a device800for displaying a badge of an icon, according to an exemplary embodiment, including: an acquisition module81configured to, when generating a badge of an icon, acquire feature information of the icon; a determination module82configured to determine a display element of the badge according to the acquired feature information of the icon; and a display module83configured to generate and display a badge at a preset position of the icon, according to the determined display element.

The acquisition module81can be configured to, when generating a badge of an icon, acquire an application type corresponding to the icon.

The determination module82can be configured to determine a display element corresponding to an application type according to a preset corresponding relationship between the application type and the display element.

In one embodiment, the acquisition module81can be configured to, when generating a badge of an icon, acquire a priority level of an application corresponding to the icon.

The determination module82can be configured to determine a display element corresponding to the priority level of the application according to a preset corresponding relationship between the priority level of the application and the display element.

In one embodiment, the acquisition module81can be configured to, when generating a badge of an icon, acquire a feature color of the icon.

The determination module82can be configured to use the feature color as a background color of the badge, and/or as a color of a character in the badge.

In one embodiment, as shown inFIG. 9, the acquisition module81may include:

a first feature color acquisition submodule811configured to, when generating a badge of an icon, acquire a most frequently appearing color value among the color values of all pixels in an image file of the icon, and use the acquired color value as a feature color of the icon.

In one embodiment, as shown inFIG. 9, the acquisition module81may further include: a second feature color acquisition submodule812configured to, when generating a badge of an icon, average the color values of pixels with similar colors among all the pixels in the image file of the icon, and use the averaged value as the feature color of the icon.

In one embodiment, when an application corresponding to the icon is an application folder, as shown inFIG. 10, the acquisition module81includes: a first image acquisition submodule813configured to, when generating a badge of an icon, acquire all image files of all application icons in the application folder; and a third feature color acquisition submodule814configured to use a color value having a highest occurrence number among the color values of all pixels in all the image files as the feature color of the icon.

In one embodiment, when an application corresponding to the icon is an application folder, as shown inFIG. 11, the acquisition module81includes: a second image acquisition submodule815configured to, when generating a badge of an icon, acquire all image files of all application icons in the application folder; and a fourth feature color acquisition submodule816configured to average the color values of pixels with similar colors among all the pixels in the image files, and use the averaged value as the feature color of the icon.

The determination module82may be configured to: determine one or more of a shape of the badge, a background color of the badge, a color of a character in the badge, and a font of a character in the badge according to the feature information of the icon.

The display module83may be further configured to generate and display a badge border for the badge.

Detailed operations for individual modules have been described in detail in the embodiments regarding corresponding methods.

FIG. 12is a block diagram of a device1200for displaying application badge, according to an exemplary embodiment. The device1200can be a terminal device. For example, the device1200may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet, a medical device, exercise equipment, a personal digital assistant, and the like.

Referring toFIG. 12, the device1200may include one or more of the following components: a processing component1202, a memory1204, a power component1206, a multimedia component1208, an audio component1210, an input/output (I/O) interface1212, a sensor component1214, and a communication component1216.

The processing component1202may control overall operations of the device1200, such as the operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component1202may include one or more processors1220to execute instructions to perform all or part of the steps in the above described methods. Moreover, the processing component1202may include one or more modules which facilitate the interaction between the processing component1202and other components. For instance, the processing component1202may include a multimedia module to facilitate the interaction between the multimedia component1208and the processing component1202.

The memory1204may be non-transitory computer-readable and configured to store various types of data to support the operation of the device1200. Examples of such data include instructions for any applications or methods operated on the device1200, contact data, phonebook data, messages, images, video, etc. The memory1204may be implemented using any type of volatile or non-volatile memory devices, or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.

The power component1206may provide power to various components of the device1200. The power component1206may include a power management system, one or more power sources, and any other components associated with the generation, management, and distribution of power in the device1200.

The audio component1210may be configured to output and/or input audio signals. For example, the audio component1210may include a microphone (“MIC”) configured to receive an external audio signal when the device1200is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may be further stored in the memory1204or transmitted via the communication component1216. In some embodiments, the audio component1210may further include a speaker to output audio signals.

The I/O interface1212may provide an interface between the processing component1202and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The buttons may include, but are not limited to, a home button, a volume button, a starting button, and a locking button.

The sensor component1214may include one or more sensors to provide status assessments of various aspects of the device1200. For instance, the sensor component1214may detect an open/closed status of the device1200, relative positioning of components, e.g., the display and the keypad, of the device1200, a change in position of the device1200or a component of the device1200, a presence or absence of user contact with the device1200, an orientation or an acceleration/deceleration of the device1200, and a change in temperature of the device1200. The sensor component1214may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component1214may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component1214may also include an accelerometer sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component1216may be configured to facilitate communication, wired or wirelessly, between the device1200and other devices. The device1200can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component1216may receive a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component1216may further include a near field communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on a radio frequency identification (RFID) technology, an infrared data association (IrDA) technology, an ultra-wideband (UWB) technology, a Bluetooth (BT) technology, and other technologies.

In exemplary embodiments, there is also provided a non-transitory computer-readable storage medium including instructions, such as included in the memory1204, executable by the processor1220in the device1200, for performing the above-described methods. For example, the non-transitory computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device, and the like.

It should be understood by those skilled in the art that the above described modules can each be implemented through hardware, or software, or a combination of hardware and software. One of ordinary skill in the art will also understand that multiple ones of the above described modules may be combined as one module, and each of the above described modules may be further divided into a plurality of sub-modules.