0

Currently, the notifications within my app are working great but if there are multiple notifications, then the whole status bar will be filled with them. Instead, I am looking to have one notification and then update that notification with text in a circle overlaying the notification icon to show the number of items.

The image below is what I am trying to achieve:

Icon Example

How can I achieve this programatically? As I am assuming that this would be the 'small icon' in the Notification Builder yet the small icon only accepts int (a resource layout int). If this cannot be done with the 'small icon' how would I achieve this with the 'large icon' (bitmap) or even set the normal icon (large) as the app icon & the small icon as an incrementing number?

Toby Clench
  • 403
  • 1
  • 5
  • 22
  • @K_Anas, this is not a duplicate as the post you are referring to is talking about Android Notification badges (on the actual home screen icon itself), my post is referring to notifications in the status bar, not the home screen. – Toby Clench Jan 18 '17 at 12:40

1 Answers1

0

What you can do is to create a custom notification with a custom layout. That way you can control everything that will be present on the Notification in both normal and big view.

Please refer : https://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification

Apoorv Parmar
  • 274
  • 4
  • 9