remoteViews を使用した通知メッセージに big-contentview を使用しています。その大きなコンテンツ ビューは nexus 7 では適切に表示されますが、Samsung 10 インチ タブレットでは折りたたまれたレイアウトのように表示されます。また、Google Play Music などの他のアプリケーションでは、折りたたまれた通知のみが表示されます。
SM-T520(10インチタブレット)でテストしました
1) タブレット/サムスンで bigcontentview がサポートされていないかどうか。
2) または、そのような状態で折りたたまれた通知を表示する方法。
1 番目の写真: これはサムスン タブレットの画面で、bigcontentview が完全には表示されていません。
2 番目の写真: 期待される出力。
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));