我遵循了这个示例代码
在Big Text Notifications部分中,他说需要扩展才能看到Big text notification形式,如下图所示:

我不知道我们做不到 set Expanded Notification as default in Big Text Notifications?
知道它的人是否可以,
如果能,
请告诉我怎么做,
谢谢,

当用户折叠或展开通知时,我想通过支持小和大布局显示我的自定义通知作为上面的屏幕截图。但结果它默认显示扩展通知。我想默认将其显示为折叠通知,并且仅在用户展开时显示展开的通知。
请检查我的代码如下:
private fun initCustomNotification() {
// Get the layouts to use in the custom notification
val notificationLayout = RemoteViews(packageName, R.layout.custom_notification_small_layout)
val notificationLayoutExpanded = RemoteViews(packageName, R.layout.custom_notification_large_layout)
// Apply the layouts to the notification
customNotificationBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.dog)
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
.setCustomContentView(notificationLayout)
.setCustomBigContentView(notificationLayoutExpanded)
.setOngoing(true)
.setShowWhen(false)
}
Run Code Online (Sandbox Code Playgroud)
谢谢。