0

I'm using local notification like clock alarm with buttons to control it. My problem is that the Notification view isn't wrapping my content. So after searching around I found out that there is a workaround to achieve this by setting the view after build.
Something like this:

Notification notification = mBuilder.build();
// add remote view after build for getting bigger notification size
notification.bigContentView = remoteViews;

This work unless the notification is not first and when it is not the top notification the buttons is not shown.

How can I make the notification wrap_content even when it is not the top on the list of notifications?

reVerse
  • 35,075
  • 22
  • 89
  • 84
Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62

1 Answers1

0

Set the priority Max for notification for showing big content view like below

   new Notification.Builder(this)
    .setContentTitle("Media Player")
    .setContentIntent(mPendingIntentHomeSong)
    .setSmallIcon(R.drawable.app_icon)
    .setPriority(Notification.PRIORITY_MAX)
    .setContent(mNotificationContentView)
    .setStyle(new Notification.BigPictureStyle()).build();
kartikag01
  • 1,539
  • 1
  • 18
  • 36
Ramesh
  • 526
  • 3
  • 14