Why do icons set with Notification.Builder.setSmallIcon in Android Lollipop show as a white square?

前端 未结 8 2150
南旧
南旧 2020-12-23 18:54

I have this code:

Notification notif;

// Build notification
Notification.Builder notifBuilder = new Notification.Builder(context);
notifBuilder.setContentIn         


        
相关标签:
8条回答
  • 2020-12-23 19:43

    Look at the documentation: http://developer.android.com/design/style/iconography.html

    there are words: "Notification icons must be entirely white. Also, the system may scale down and/or darken the icons."

    0 讨论(0)
  • 2020-12-23 19:44

    Remove the android:targetSdkVersion="21" from manifest.xml. it will work!

    0 讨论(0)
提交回复
热议问题