Reputation: 2034
So I have created background transparent and completly white icon and set color dynamically.
But I am able to set only one color (setColor()).
So my question is :-
How to support multiple colors (more than two color or color gradients) for Android Notification icon? Note :- I have taken reference of Android Push Notifications: Icon not displaying in notification, white square shown instead
Thanks for support in advance.
Upvotes: 6
Views: 4594
Reputation: 1512
Notifications
Make sure your notifications take these Android 5.0 changes into account. To learn more about designing your notifications for Android 5.0 and higher, see the notifications design guide.
Material design style
Notifications are drawn with dark text atop white (or very light) backgrounds to match the new material design widgets. Make sure that all your notifications look right with the new color scheme. If your notifications look wrong, fix them:
Upvotes: -1
Reputation: 38223
If your app targets SDK 21+ the system will always tint your notification icon
You have no control over the color other than what's described above.
But you can work with alpha channel. You can achieve different degrees of white/dark grey/color in your icon.
No, there's no other way. Pass this on to your designer and management.
Android 5.0 Behavior Changes
Notifications
Material design style
- Update or remove assets that involve color. The system ignores all non-alpha channels in action icons and in the main notification icon. You should assume that these icons will be alpha-only. The system draws notification icons in white and action icons in dark gray.
Upvotes: 8