android – 大型通知图标旁边的灰色圆圈?

前端之家收集整理的这篇文章主要介绍了android – 大型通知图标旁边的灰色圆圈?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的应用程序中显示通知 – 但由于某些原因在 Android版Lolipop上它在大图标旁边显示一个灰色圆圈,如下所示:

有谁知道为什么会这样?

这是我创建通知代码

  1. builder = new NotificationCompat.Builder(context)
  2. // Set Icon
  3. .setSmallIcon(R.drawable.ic_launcher)
  4. .setLargeIcon(icon)
  5. // Set Ticker Message
  6. .setTicker(message)
  7. // Set Title
  8. .setContentTitle(message)
  9. // Set Text
  10. .setContentText(context.getString(R.string.app_name))
  11. // Add an Action Button below Notification
  12. // .addAction(R.drawable.share,// context.getString(R.string.share),pendingShare)
  13. // Set PendingIntent into Notification
  14. .setContentIntent(contentIntent)
  15. // Dismiss Notification
  16. .setAutoCancel(true)
  17. .setSound(
  18. Uri.parse("android.resource://"
  19. + context.getPackageName()
  20. + "/"
  21. + prefs.getInt(Constants.NOTIF_SOUND,R.raw.al_affassi_full)));

解决方法

您的通知图标必须遵循此处的通知设计: iconography notifications

Notification icons must be entirely white. Also,the system may scale down and/or darken the icons.

编辑

尝试使用此图像(图像为白色,位于///之间)

///

///

猜你在找的Android相关文章