Ersen Osman
Ersen Osman

Reputation: 7247

Lollipop: Notification Icon with colour / image?

I am having some confusion with notification icons in relation to its background.

I read that in lollipop, all colours will be translated to white and that the system only processes the alpha channel and ignoring the colour channels.

So my question is how would I go about making a notification icon similar to this: The "Marvel Comics" icon?

enter image description here

What exactly has to be transparent? because I am getting the same issue as shown hereenter image description here

I have seen that the solution as described here https://developer.android.com/design/patterns/notifications.html under Use Distinct Icons but what if I wanted an icon just like the marvel one shown in the first image without making it just white?

Thank you for reading

Upvotes: 0

Views: 2774

Answers (1)

humblerookie
humblerookie

Reputation: 4957

Finally this workaround

Just change your build target sdk to 19 from 21 (or later) in your gradle file (or your manifest for eclipse users). I don't like the idea of targeting a non latest version but in order to have the a colored icon theres seems to be no other choice.

If you still wish to target latest version thenmake do with what @Commonsware suggests.

Upvotes: 1

Related Questions