Android - incremental status bar notification icon

前端 未结 2 873
不知归路
不知归路 2021-02-06 01:34

You know what I\'m talking about: for example when you get multiple new emails the notification icon in the status bar is augmented with a little red circle that contains number

相关标签:
2条回答
  • 2021-02-06 02:01

    A good example of how to use the notification bar can be found in this tutorial:

    http://www.firstdroid.com/2010/05/09/learn-by-example-using-notification-bar/

    Hope it helps, Adrian.

    0 讨论(0)
  • 2021-02-06 02:07

    This one is nice and easy, just change Notification.number to whatever number you want to appear on your Notification, e.g.:

    Notification notification = new Notification(icon, tickerText, when);
    notification.number = 4;
    
    0 讨论(0)
提交回复
热议问题