I know the recommended layout_height
for small notifications is 64dp
, but I want the notifications to be a little bigger (for example to be 128dp
). Is notifications height adjustable to any value or it has to be exactly 64dp
to make it look good on all devices without problems?
I use FCM to send notifications.
By default, the height of the collapsed notification layout is fixed at 64dp
, The only way to make it larger than that size is to make it expandable by using NotificationCompat.BigPictureStyle
. You can see the example here:
var notification = NotificationCompat.Builder(context, CHANNEL_ID)
.setSmallIcon(R.drawable.new_post)
.setContentTitle(imageTitle)
.setContentText(imageDescription)
.setStyle(NotificationCompat.BigPictureStyle()
.bigPicture(myBitmap))
.build()
However, according to this source, expanded notification layouts are limited to 256dp
. There is no way to exceed this amount.