I've build a push notification using Big Picture Style as show here. Is it possible to mix Big picture Style and Big Text Style as shown in the attached photo? How do I do it?
BigPictureStyle is used for showing a big picture in the notification item. It has two states — collapsed state and expanded state. In collapsed state, it shows exactly the same as an ordinary notification. When it is expanded, it shows a new set of content title, summary text, large icon and picture.
You should be able to do it this way:
Notification notif = new Notification.Builder(context)
.setContentTitle("Title")
.setContentText("content")
.setSmallIcon(R.drawable.ic_small)
.setLargeIcon(bitmap)
.setStyle(new Notification.BigPictureStyle()
.bigPicture(bigBitmap)
.setBigContentTitle("big title"))
.build();
Source
View More... text in your norification is subtext. So while using bigpicturestyle notification you need to set
bigPicStyle.setSummaryText(mContent);
or
mBuilder.setSubText(mSubText);
Setting both at same time doesn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With