Android Notification smallIcon not displaying correctly

So, I was working with Android Notifications and after installing the large image, I found out that my small image is not actually displaying properly.

As you can see in the following screenshot of the lock screen, the background of the small icon is transparent. I want to set a specific color there, like the one that Outlook.com uses:

a

Another example where a small icon is displayed next to a large one (note the small icon that is actually displayed, but not very visible because there is no background):

b

I was thinking about changing the little icon to include a background color, but obviously the color will also show up in the status bar and that's wrong.

+3


source to share


1 answer


Try setColor()

using to NotificationCompat.Builder

set the accent color to be used by the colored circle behind the icon.



+2


source







All Articles