简体   繁体   中英

notification icon color issue

I have an issue with notification in my Android app : On Samsung devices (Android 7), my icon works in notification bar and when I show the notification menu :

Notification bar

Notification menu

But on other device, like Google Nexus 5 or 5x (Android 6 and 7) (or with the android studio emulator), I just have the icon "form" like this :

Emulator Case

Is it possible to have default colored icon on all device or should I use only transparent ?

This is the default behaviour since lollipop or marshmallow

For this cases try to use an icon with transparent regions

put it in separate folder eg drawable-v21

Problem solved by using a white icon without background. Dimming now works and setColor works on all the devices correctly.

Thanks V. Kalyuzhnyu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM