1

I have this code to style my notification:

    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);

As you can see I haven't defined an expanded view for the notification by calling mBuilder.setCustomBigContentView(). Nevertheless the notification is showing with a arrow pointing up as if my notification was expanded. How can I prevent that arrow from showing?

edmond
  • 833
  • 3
  • 13
  • 31

2 Answers2

1

Remove line

mBuilder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());
Ajith Ramesh
  • 195
  • 14
0

my personal workaround is this

mBuilder.setContentView(remoteViews);
mBuilder.setCustomBigContentView(remoteViews);

i.e. send the same remoteViews in big content view that are in the small notifucation view

Diljeet
  • 1,896
  • 20
  • 24