I was going through the Notifications design pattern, and didn't find anything that talks about notification icon background. As you probably noticed, there is only a light grey background for custom notifications. But apps like Hangouts, or simply the USB Debugging notification has a custom color for their notification icon background.
Is there any possibility to change that grey into something else? (that specific circle's color programmatically)
1) Obtain Color
2) Set the Color to the Notification
The color is respected only on Lollipop and only affects background of the small icon. If a large icon is shown its contents are entirely your responsibility.
Source: NotificationCompat.Builder#setColor(int)
getColor(int)
has been deprecated onResources
We should now use one of these alternatives:
Resources
's getColor(int, Theme)ContextCompat
's getColor(Context context, int id)if you've defined color in colors.xml then in your NotificationBuilder add value as
That should solve your problem. It only affect to background of the icon.