I use several hundred drawables within my app to dynamically display data with a notification icon in the status bar. Each is a PNG consisting of white text and a transparent background. I would like to change the white to another color in certain situations, but it seems like there must be a better way to do so other than re-creating hundreds of identical icons in different colors. Is it possible to do this with code?
I have found methods to change the color of a Drawable
(ie: How to change colors of a Drawable in Android?), but cannot figure out how to apply this to a notification icon. NotifBuilder.setSmallIcon()
calls for an int
, not a Drawable
.