added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)   
belongs to Maven artifact com.android.support:support-media-compat:28.0.0-alpha1 Summary: [Ctors](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#inhmethods) \| [\[Expand All\]](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#)

# NotificationCompat.DecoratedMediaCustomViewStyle

| This package is part of the Android [support library](https://developer.android.com/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](https://developer.android.com/jetpack/androidx) which is part of [Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](https://developer.android.com/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class
| mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).


`
public
static


class
NotificationCompat.DecoratedMediaCustomViewStyle
`


`


`

`


`

`

extends https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle


`

`


`

|---|---|---|---|
| java.lang.Object ||||
| ↳ | [android.support.v4.app.NotificationCompat.Style](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style) |||
|   | ↳ | [android.support.v4.media.app.NotificationCompat.MediaStyle](https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle) ||
|   |   | ↳ | android.support.v4.media.app.NotificationCompat.DecoratedMediaCustomViewStyle |

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder`,
`https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder` and
`https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder` to set the
corresponding custom views to display.

To use this style with your Notification, feed it to
`https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder` like so:

```scdoc
 Notification noti = new NotificationCompat.Builder()
     .setSmallIcon(R.drawable.ic_stat_player)
     .setLargeIcon(albumArtBitmap))
     .setCustomContentView(contentView)
     .setStyle(new NotificationCompat.DecoratedMediaCustomViewStyle()
          .setMediaSession(mySession))
     .build();
 
```

If you are using this style, consider using the corresponding styles like
`https://developer.android.com/reference/android/support/mediacompat/R.style#TextAppearance_Compat_Notification_Media` or
`https://developer.android.com/reference/android/support/mediacompat/R.style#TextAppearance_Compat_Notification_Title_Media` in
your custom views in order to get the correct styling on each platform version.
**See also:**

- `https://developer.android.com/reference/android/support/v4/app/NotificationCompat.DecoratedCustomViewStyle`
- `https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.DecoratedMediaCustomViewStyle#NotificationCompat.DecoratedMediaCustomViewStyle()() ` |

| ### Inherited methods |
|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#)From class ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle ` |---|---| | ` static https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token` | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle#getMediaSession(android.app.Notification)(https://developer.android.com/reference/android/app/Notification.html notification) ` Extracts a `https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token` from the extra values in the `https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle` `https://developer.android.com/reference/android/app/Notification.html`. | | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle` | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle#setCancelButtonIntent(android.app.PendingIntent)(https://developer.android.com/reference/android/app/PendingIntent.html pendingIntent) ` Sets the pending intent to be sent when the cancel button is pressed. | | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle` | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle#setMediaSession(android.support.v4.media.session.MediaSessionCompat.Token)(https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token token) ` Attaches a `https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.Token` to this Notification to provide additional playback information and control to the SystemUI. | | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle` | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle#setShowActionsInCompactView(int...)(int... actions) ` Requests up to 3 actions (by index in the order of addition) to be shown in the compact notification view. | | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle` | ` https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle#setShowCancelButton(boolean)(boolean show) ` Sets whether a cancel button at the top right should be shown in the notification on platforms before Lollipop. | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#)From class ` https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style ` |---|---| | ` https://developer.android.com/reference/android/app/Notification.html` | ` https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style#build()() ` | | ` void` | ` https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style#setBuilder(android.support.v4.app.NotificationCompat.Builder)(https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder builder) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4-media-app/NotificationCompat.DecoratedMediaCustomViewStyle#)From class ` java.lang.Object ` |---|---| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class<?>` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||

## Public constructors

### NotificationCompat.DecoratedMediaCustomViewStyle

added in [version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
NotificationCompat.DecoratedMediaCustomViewStyle ()
```

<br />

<br />

-

  ## Classes

  - [NotificationCompat](https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat)
  - [NotificationCompat.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.DecoratedMediaCustomViewStyle)
  - [NotificationCompat.MediaStyle](https://developer.android.com/reference/android/support/v4/media/app/NotificationCompat.MediaStyle)