我有这样的代码:
Notification notif;
// Build notification
Notification.Builder notifBuilder = new Notification.Builder(context);
notifBuilder.setContentIntent(pendingIntent);
notifBuilder.setContentTitle(title);
notifBuilder.setSmallIcon(icon_resId);
notifBuilder.setContentText(ne.getCaption());
notifBuilder.setDefaults(Notification.DEFAULT_ALL);
notifBuilder.setAutoCancel(autocancel);
notifBuilder.setWhen(System.currentTimeMillis());
notif = notifBuilder.build();
在http://developer.android.com/reference/android/app/Notification.Builder.html中,我没有看到关于API级别21中通知图标的新内容。
发布于 2018-04-11 14:56:12
查看文档:http : //developer.android.com/design/style/iconography.html
有话说:“通知图标必须全白,而且系统可能会缩小和/或加深图标。”
发布于 2018-04-11 16:10:32
我已经解决了将图标大小更改为16x16像素并仅使用白色。
https://stackoverflow.com/questions/-100003857
复制相似问题