Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
293 views
Welcome To Ask or Share your Answers For Others

1 Answer

This is actually an answer from Mark Murphy:

For most phones, you use the number field of the Notification object. See here: http://github.com/commonsguy/cw-android/tree/master/Notifications/Notify1/

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...