Únete a ⁠ #Android11: The Beta Launch Show el 3 de junio.


open class DecoratedMediaCustomViewStyle : NotificationCompat.MediaStyle
   ↳ androidx.core.app.NotificationCompat.Style
   ↳ androidx.media.app.NotificationCompat.MediaStyle
   ↳ androidx.media.app.NotificationCompat.DecoratedMediaCustomViewStyle

Notification style for media custom views that are decorated by the system.

Instead of providing a media notification that is completely custom, a developer can set this style and still obtain system decorations like the notification header with the expand affordance and actions.

Use #setCustomContentView(RemoteViews), #setCustomBigContentView(RemoteViews) and #setCustomHeadsUpContentView(RemoteViews) to set the corresponding custom views to display.

To use this style with your Notification, feed it to #setStyle(androidx.core.app.NotificationCompat.Style) like so:

Notification noti = new NotificationCompat.Builder()
          .setStyle(<b>new NotificationCompat.DecoratedMediaCustomViewStyle()</b>.setMediaSession(mySession))

If you are using this style, consider using the corresponding styles like androidx.media.R.style#TextAppearance_Compat_Notification_Media or androidx.media.R.style#TextAppearance_Compat_Notification_Title_Media in your custom views in order to get the correct styling on each platform version.


Public constructors

Inherited functions

Public constructors