我在我的应用中显示通知 - 但由于某些原因在Android版Lolipop
上,它在大图标旁边显示一个灰色圆圈,如下所示:
有谁知道为什么会这样?
以下是我创建通知的代码:
builder = new NotificationCompat.Builder(context)
// Set Icon
.setSmallIcon(R.drawable.ic_launcher)
.setLargeIcon(icon)
// Set Ticker Message
.setTicker(message)
// Set Title
.setContentTitle(message)
// Set Text
.setContentText(context.getString(R.string.app_name))
// Add an Action Button below Notification
// .addAction(R.drawable.share,
// context.getString(R.string.share), pendingShare)
// Set PendingIntent into Notification
.setContentIntent(contentIntent)
// Dismiss Notification
.setAutoCancel(true)
.setSound(
Uri.parse("android.resource://"
+ context.getPackageName()
+ "/"
+ prefs.getInt(Constants.NOTIF_SOUND,
R.raw.al_affassi_full)));
答案 0 :(得分:4)
您的通知图标必须遵循此处的通知设计:iconography notifications
通知图标必须完全为白色。此外,系统可能会缩小和/或使图标变暗。
修改强>
尝试使用此图像(图像为白色,位于///之间)
/// ///