Is it possible to overlay a notification icon with some text/int? or is it possible to generate a custom icon on the fly?
For example I have the current icon displayed for my notification, I would like to be able to display for example the number 2 within the red box.
As this is not a count of notifications ( so not the red bubble ), the setting the "number" in the notification will not work.
Will I have to just create an individual icon for every possible number I wish to display? Or is there a better way of achieving this?
1 Tap Notification Settings on the notification panel or tap the Settings app. 2 Tap Notifications. 3 Tap App icon badges.
Navigate to Messages > New Push > Platform Settings > Google Android Options > Set the icon name without the file extension. With Large Notification Icons, you can also supply a URL where the icon will be displayed from.
Turn on App icon badges from Settings.Navigate back to the main Settings screen, tap Notifications, and then tap Advanced settings. Tap the switch next to App icon badges to turn them on.
Starting with 8.0 (API level 26), notification badges (also known as notification dots) appear on a launcher icon when the associated app has an active notification. Users can long-press on the app icon to reveal the notifications (alongside any app shortcuts), as shown in figure 1.
Try using AnimationDrawable's. You can use them to combine multiple drawables into a single one, and select the one you want to display. I really think, this is the way to go.
More info: AnimationDrawable
Off course, you will have to provide individual drawables for all your Integers you want to display, but this way, you can easily change the appearance of your notifications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With