简体   繁体   中英

Statusbar Notification icon not shows correctly always shows white circle

I am using firebase for notification and sending notification using REST Api everything works fine but there is one problem notification icon of statusbar not showing properly always it shows white circle instead of my small icon set for notification. I search a lot eveyone suggest that we can not use colorfull icon in notification but I saw everyone using colorfull icon.


See this image google play,Instagram, and so many application shows there logo

看这里

I also attach image that i want to show in notification

看这里
also I'm using transparent background but I'm not able to show correctly please help me and my English is very bad I'm sorry for that

Post android Lollipop release android has changed the guidelines for displaying notification icons in the Notification bar. The official documentation says "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.” Now what that means in lay man terms is "Convert all parts of the image that you don't want to show to transparent pixels. All colors and non transparent pixels are displayed in white"

Make sure your image file will have in .png format with transparent background

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