# Notification.DecoratedMediaCustomViewStyle

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# DecoratedMediaCustomViewStyle

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle "View this page in Java")  

```
open class DecoratedMediaCustomViewStyle : Notification.MediaStyle
```

|---|---|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                         ||||
| ↳ | [android.app.Notification.Style](https://developer.android.com/reference/kotlin/android/app/Notification.Style)                                                        |||
|   | ↳ | [android.app.Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)                                           ||
|   |   | ↳ | [android.app.Notification.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.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[android.app.Notification.Builder#setCustomContentView(RemoteViews)](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#setCustomContentView(android.widget.RemoteViews)),[android.app.Notification.Builder#setCustomBigContentView(RemoteViews)](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#setCustomBigContentView(android.widget.RemoteViews))and[android.app.Notification.Builder#setCustomHeadsUpContentView(RemoteViews)](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#setCustomHeadsUpContentView(android.widget.RemoteViews))to set the corresponding custom views to display.

Contrary to[MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)a developer has to opt-in to the colorizing of the notification by using[Notification.Builder.setColorized(boolean)](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#setColorized(kotlin.Boolean)).

To use this style with your Notification, feed it to[Notification.Builder.setStyle(android.app.Notification.Style)](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#setStyle(android.app.Notification.Style))like so:  

```kotlin
Notification noti = new Notification.Builder()
      .setSmallIcon(R.drawable.ic_stat_player)
      .setLargeIcon(albumArtBitmap))
      .setCustomContentView(contentView);
      .setStyle(<b>new Notification.DecoratedMediaCustomViewStyle()</b>.setMediaSession(mySession))
      .build();
  
```

## Summary

|                                                                                 Public constructors                                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.DecoratedMediaCustomViewStyle#DecoratedMediaCustomViewStyle())`()` <br /> |

| Inherited functions ||
|---|---|
| From class[Style](https://developer.android.com/reference/kotlin/android/app/Notification.Style) |-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification](https://developer.android.com/reference/kotlin/android/app/Notification)!        | [build](https://developer.android.com/reference/kotlin/android/app/Notification.Style#build())`()` <br /> Calls[android.app.Notification.Builder#build()](https://developer.android.com/reference/kotlin/android/app/Notification.Builder#build())on the Builder this Style is attached to. Note: Calling build() multiple times returns the same Notification instance, so reusing a builder to create multiple Notifications is discouraged. <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                    | [checkBuilder](https://developer.android.com/reference/kotlin/android/app/Notification.Style#checkBuilder())`()` <br />                                                                                                                                                                                                                                                                                                                               | | [RemoteViews](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.html#)! | [getStandardView](https://developer.android.com/reference/kotlin/android/app/Notification.Style#getStandardView(kotlin.Int))`(`layoutId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                    | [internalSetBigContentTitle](https://developer.android.com/reference/kotlin/android/app/Notification.Style#internalSetBigContentTitle(kotlin.CharSequence))`(`title:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` <br /> Overrides ContentTitle in the expanded form of the template. This defaults to the value passed to setContentTitle(). <br />                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                    | [internalSetSummaryText](https://developer.android.com/reference/kotlin/android/app/Notification.Style#internalSetSummaryText(kotlin.CharSequence))`(`cs:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` <br /> Set the first line of text after the detail section in the expanded form of the template. <br />                                                                                 | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                    | [setBuilder](https://developer.android.com/reference/kotlin/android/app/Notification.Style#setBuilder(android.app.Notification.Builder))`(`builder:` `[Notification.Builder](https://developer.android.com/reference/kotlin/android/app/Notification.Builder)!`)` <br />                                                                                                                                                                              | ||
| From class[MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle) |----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)! | [setMediaSession](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle#setMediaSession(android.media.session.MediaSession.Token))`(`token:` `[MediaSession.Token](https://developer.android.com/reference/kotlin/android/media/session/MediaSession.Token.html#)!`)` <br /> Attach a[android.media.session.MediaSession.Token](https://developer.android.com/reference/kotlin/android/media/session/MediaSession.Token.html#)to this Notification to provide additional playback information and control to the SystemUI. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)  | [setRemotePlaybackInfo](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle#setRemotePlaybackInfo(kotlin.CharSequence,%20kotlin.Int,%20android.app.PendingIntent))`(`deviceName:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`, `iconResource:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `chipIntent:` `[PendingIntent](https://developer.android.com/reference/kotlin/android/app/PendingIntent)?`)` <br /> For media notifications associated with playback on a remote device, provide device information that will replace the default values for the output switcher chip on the media control, as well as an intent to use when the output switcher chip is tapped, on devices where this is supported. This method is intended for system applications to provide information and/or functionality that would otherwise be unavailable to the default output switcher because the media originated on a remote device. Requires[android.Manifest.permission#MEDIA_CONTENT_CONTROL](https://developer.android.com/reference/kotlin/android/Manifest.permission.html#MEDIA_CONTENT_CONTROL:kotlin.String) <br /> | | [Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)! | [setShowActionsInCompactView](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle#setShowActionsInCompactView(kotlin.Int))`(`vararg` `actions:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Request up to 3 actions (by index in the order of addition) to be shown in the compact notification view. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ||

| Inherited properties ||
|---|---|
| From class[Style](https://developer.android.com/reference/kotlin/android/app/Notification.Style) |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| | [Notification.Builder](https://developer.android.com/reference/kotlin/android/app/Notification.Builder)! | [mBuilder](https://developer.android.com/reference/kotlin/android/app/Notification.Style#mBuilder:android.app.Notification.Builder) <br /> | ||

## Public constructors

### DecoratedMediaCustomViewStyle

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
DecoratedMediaCustomViewStyle()
```