我正在使用 big-contentview 使用 remoteViews 通知消息。这个大内容视图在nexus 7中显示良好,但在三星10“平板电脑中显示为折叠布局。而其他应用程序(如谷歌播放音乐)仅显示折叠通知。
我用 SM-T520 (10" 平板电脑) 进行了测试
1) 平板/三星不支持 bigcontentview。
2)或者如何处理在这种情况下显示折叠的通知。
第一张图:这是三星平板电脑屏幕,bigcontentview 不完全可见。
第二张图片:预期输出。
layout-v16 我有扩展布局。
layout-v11 我已经折叠了布局。
代码(Java):
mNotificationTemplate = new RemoteViews(mContext.getPackageName(),
R.layout.notification_download_latest);
if (NotificationHelper.hasHoneycomb()) { // Notification Builder
mNotification = new NotificationCompat.Builder(mContext)
.setSmallIcon(R.drawable.ic_launcher)
.setContentIntent(getPendingIntent(mContext, url))
.setPriority(Notification.PRIORITY_DEFAULT)
.setOngoing(true).setContent(mNotificationTemplate).build();
if (NotificationHelper.hasJellyBean()) {
// Expanded notifiction style
// mExpandedView = new RemoteViews(context.getPackageName(), //
// R.layout.notification_download_latest);
**mNotification.bigContentView = mNotificationTemplate;**
mNotificationTemplate.setOnClickPendingIntent(
R.id.notification_cancelBtn,
getPendingIntent(mContext, url));