I'm trying to build expandable notification with two custom views
Searching in internet says I need to use code like this
val r = RemoteViews(activity.packageName, R.layout.cf_watcher_notification_small)
val r2 = RemoteViews(activity.packageName, R.layout.cf_watcher_notification_big)
val n = NotificationCompat.Builder(activity, "test").apply {
setSmallIcon(R.drawable.ic_develop)
setNotificationSilent()
setShowWhen(false)
setAutoCancel(true)
setCustomContentView(r)
setCustomBigContentView(r2)
setStyle(NotificationCompat.DecoratedCustomViewStyle())
}
But resulting notification have no expand button that switch collapsed view to big and vice versa, and when I presss to notification nothing happens
Code without big content view
setCustomContentView(r)
//setCustomBigContentView(r2)
setStyle(NotificationCompat.DecoratedCustomViewStyle())
results as expected to
Code with only big content view
//setCustomContentView(r)
setCustomBigContentView(r2)
setStyle(NotificationCompat.DecoratedCustomViewStyle())
results to notification with button I need
How to get this button?



