如何在android上制作应用徽章?

时间:2022-08-26 21:35:30

--Edit on 23 Apr 2016--

——2016年4月23日编辑—

I finally use ShortcutBadger for most of the Device, I think that should be enough for me.

我最后用了短刀,我认为这对我来说足够了。

ShortcutBadger

ShortcutBadger

Basically, Shortcut Badger will send broadcast, intent, etc to specific launcher, such as LG Launcher, to make a badge. It may not cover all the launchers but at least it works for the most recent smart phones.

基本上,快捷键Badger将发送广播、意图等到特定的发射器,比如LG launcher,来制作一个徽章。它可能不会覆盖所有的发射装置,但至少对最新的智能手机是有效的。

--Edit--

——编辑

What I am seeing on LG G2 (4.4), there is a number of some of the Apps, e.g. Line, which showing unread count.

我在LG G2上看到的(4.4),有一些应用,比如Line,显示未读计数。

This is the application badge I mean and I want to find a way to work that out.

这是我的申请徽章,我想找到一种方法。

This number will also be notified by the launcher itself, when the app in put inside a folder, the folder will also show the badge.

这个数字也会被发射器本身通知,当应用程序放入一个文件夹时,文件夹也会显示徽章。

I think there should have ways to make it work, as I found several apps having badges.

我认为应该有办法让它工作,因为我发现有几个应用有徽章。

--Original--

——原

I did a search before and I found that there is a way to make application badge on Samsung and Sony, but what I want is to support other vendor, such as LG and HTC.

我之前做过一个搜索,我发现有一种方法可以在三星和索尼上制作应用徽章,但是我想要的是支持其他厂商,比如LG和HTC。

IS there an universal way to make an application badge?

是否有一种通用的方法来制作应用徽章?

Thanks for your help!

谢谢你的帮助!

2 个解决方案

#1


0  

Unfortunately, Android does not allow changing of the application icon because it's sealed in the APK once the program is compiled. There is no way to programmatically change it to a 'drawable'.

不幸的是,Android不允许更改应用程序图标,因为一旦程序编译完成,它就被密封在APK中。无法以编程方式将其更改为“drawable”。

You may achieve your goal by using a widget instead of an icon. Widgets are highly customisable and can do what you want.

您可以通过使用小部件而不是图标来实现您的目标。小部件是高度可定制的,可以做您想做的事情。

Original reference is here

原始引用在这里

You can also go with Badges library

你也可以使用徽章库。

#2


0  

Stock Android does not offer this functionality at the moment on the standard launcher.

股票Android目前在标准启动程序上没有提供这个功能。

Certain manufacturers (e.g. Samsung notably, HTC, LG, Mi) have included this functionality into their customized Android launchers. Also some 3rd-party launchers (e.g. Nova Launcher) have included an API to accomplish this.

某些制造商(例如三星,HTC, LG, Mi)已经将这一功能包含在他们定制的Android发射器中。也有一些第三方发射装置(如Nova Launcher)包含了一个API来实现这一点。

You may want to check following links for further explanation:

您可能想要查看以下链接以获得进一步的解释:

  1. How does Facebook add badge numbers on app icon in Android?
  2. Facebook如何在Android的应用程序图标上添加徽章号码?
  3. Does Samsung modifies it's Android ROMs to have badges on email and SMS icons?
  4. 三星是否修改了安卓rom以在电子邮件和短信图标上添加徽章?
  5. How to make application badge on android?
  6. 如何在android上制作应用徽章?

Regards

问候

#1


0  

Unfortunately, Android does not allow changing of the application icon because it's sealed in the APK once the program is compiled. There is no way to programmatically change it to a 'drawable'.

不幸的是,Android不允许更改应用程序图标,因为一旦程序编译完成,它就被密封在APK中。无法以编程方式将其更改为“drawable”。

You may achieve your goal by using a widget instead of an icon. Widgets are highly customisable and can do what you want.

您可以通过使用小部件而不是图标来实现您的目标。小部件是高度可定制的,可以做您想做的事情。

Original reference is here

原始引用在这里

You can also go with Badges library

你也可以使用徽章库。

#2


0  

Stock Android does not offer this functionality at the moment on the standard launcher.

股票Android目前在标准启动程序上没有提供这个功能。

Certain manufacturers (e.g. Samsung notably, HTC, LG, Mi) have included this functionality into their customized Android launchers. Also some 3rd-party launchers (e.g. Nova Launcher) have included an API to accomplish this.

某些制造商(例如三星,HTC, LG, Mi)已经将这一功能包含在他们定制的Android发射器中。也有一些第三方发射装置(如Nova Launcher)包含了一个API来实现这一点。

You may want to check following links for further explanation:

您可能想要查看以下链接以获得进一步的解释:

  1. How does Facebook add badge numbers on app icon in Android?
  2. Facebook如何在Android的应用程序图标上添加徽章号码?
  3. Does Samsung modifies it's Android ROMs to have badges on email and SMS icons?
  4. 三星是否修改了安卓rom以在电子邮件和短信图标上添加徽章?
  5. How to make application badge on android?
  6. 如何在android上制作应用徽章?

Regards

问候