我有这个代码来设置我的通知:
remoteViews = new RemoteViews(context.getPackageName(), R.layout.notification);
mBuilder = new NotificationCompat.Builder(context);
mBuilder.setSmallIcon(R.drawable.ic_stat_notification);
mBuilder.setCustomContentView(remoteViews);
mBuilder.setOngoing(true);
mBuilder.setCategory(NotificationCompat.CATEGORY_PROGRESS);
mBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);
mBuilder.setShowWhen(false);
mBuilder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());
mBuilder.setAutoCancel(true);
正如您所看到的,我没有通过调用mBuilder.setCustomBigContentView()
来定义通知的展开视图。然而,通知显示箭头指向上方,好像我的通知已扩展。如何防止箭头出现?
答案 0 :(得分:0)
删除行
mBuilder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());