0

我有这段代码来设置我的通知样式:

    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()。然而,通知显示为向上箭头,就好像我的通知已展开一样。如何防止该箭头显示?

4

1 回答 1

0

删除线

mBuilder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());
于 2018-05-30T09:21:54.753 回答