[英]action button not visible in android notification
我正在尝试像这样自定义android通知。
以上API23的一切正常。 对于以下API23操作按钮不可见。 我没有发现我的代码有什么问题。
这是我在API23下面的示例代码 :
RemoteViews expandedView = createMultiRemoteViews(context,
R.layout.notification_multiview_b23, icon, "Custom notification", "This is a custom layout", leftImage, rightImage, "09:10", "16:23");
expandedView.setOnClickPendingIntent(R.id.left_image, leftImageIntent);
expandedView.setOnClickPendingIntent(R.id.right_image, rightImageIntent);
NotificationCompat.Action addToWatchListAction = new NotificationCompat.Action.Builder(R.drawable.ic_bookmark_border_black_24dp,
LABEL_ADD_TO_WATCH_LIST, addToWatchList).build();
NotificationCompat.Builder builder = createNotificationBuider(context, "Custom notification", "This is a custom layout", icon);
builder.addAction(addToWatchListAction);
builder.setCustomBigContentView(expandedView);
showNotification(context, builder.build(), MULTI_NOTI_ID);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.