如何在Android应用(如iPhone)上创建通知图标徽章 [英] How to create notification icon badge on Android apps (like iPhone)
问题描述
我对编程非常新鲜,想知道如何创建类似于iPhone应用程序的通知图标徽章的最佳方式是什么?这将基本上是为通知栏中的通知创建徽章。
I am very new to programming and would like to know what is the best way to go about creating a notification icon badge similar to the ones on the iPhone apps. This would be basically for creating a badge for the notifications that end up in the notification bar.
推荐答案
这实际上是一个答案Mark Murphy:
This is actually an answer from Mark Murphy:
对于大多数手机,您可以使用Notification对象的number字段。
请参阅这里:
http:// github.com/commonsguy/cw-android/tree/master/Notifications/Notify1/
现在,一家主要设备制造商有几台手机有
a错误,从而数字字段被忽略。我正在努力获得
他们来解决它。所以你不能绝对依靠那个红宝石
,尽管这将在大多数手机上。
Now, there are a few phones by one major device manufacturer that have a bug, whereby the number field is ignored. I am working on getting them to fix it. So you can't absolutely rely on that red bubble being there, though it will be on most phones.
这篇关于如何在Android应用(如iPhone)上创建通知图标徽章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!