我想为通知中的“是”和“否”按钮设置图标。不幸的是,它不起作用。你能告诉我为什么吗?
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, "default");
builder.setContentIntent(pendingIntent);
builder.setSmallIcon(R.drawable.logo);
builder.setContentTitle("Hello");
builder.setContentText(powiadomienie);
builder.setAutoCancel(true);
builder.addAction(R.drawable.yes, "Yes", yesIntent);
builder.addAction(R.drawable.no, "No", noIntent);
Notification notification = builder.build();
notification.flags |= NotificationCompat.FLAG_AUTO_CANCEL;
notificationManager.notify(id, notification);