Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Fields](https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle#inhfields) \| [Ctors](https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle#inhmethods)

# Notification.DecoratedMediaCustomViewStyle

*** ** * ** ***


`
public
static


class
Notification.DecoratedMediaCustomViewStyle
`


`


`

`


`

`

extends https://developer.android.com/reference/android/app/Notification.MediaStyle


`

`


`

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||||
| ↳ | [android.app.Notification.Style](https://developer.android.com/reference/android/app/Notification.Style) |||
|   | ↳ | [android.app.Notification.MediaStyle](https://developer.android.com/reference/android/app/Notification.MediaStyle) ||
|   |   | ↳ | android.app.Notification.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/app/Notification.Builder#setCustomContentView(android.widget.RemoteViews)`,
`https://developer.android.com/reference/android/app/Notification.Builder#setCustomBigContentView(android.widget.RemoteViews)` and
`https://developer.android.com/reference/android/app/Notification.Builder#setCustomHeadsUpContentView(android.widget.RemoteViews)` to set the
corresponding custom views to display.


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


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

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

<br />

**See also:**

- `https://developer.android.com/reference/android/app/Notification.DecoratedCustomViewStyle`
- `https://developer.android.com/reference/android/app/Notification.MediaStyle`

## Summary

| ### Inherited fields |
|---|
| From class `https://developer.android.com/reference/android/app/Notification.Style` |---|---| | ` protected https://developer.android.com/reference/android/app/Notification.Builder` | `https://developer.android.com/reference/android/app/Notification.Style#mBuilder` | |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle#DecoratedMediaCustomViewStyle()() ` |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/app/Notification.MediaStyle ` |---|---| | ` https://developer.android.com/reference/android/app/Notification.MediaStyle` | ` https://developer.android.com/reference/android/app/Notification.MediaStyle#setMediaSession(android.media.session.MediaSession.Token)(https://developer.android.com/reference/android/media/session/MediaSession.Token token) ` Attach a `https://developer.android.com/reference/android/media/session/MediaSession.Token` to this Notification to provide additional playback information and control to the SystemUI. | | ` https://developer.android.com/reference/android/app/Notification.MediaStyle` | ` https://developer.android.com/reference/android/app/Notification.MediaStyle#setRemotePlaybackInfo(java.lang.CharSequence,%20int,%20android.app.PendingIntent)(https://developer.android.com/reference/java/lang/CharSequence deviceName, int iconResource, https://developer.android.com/reference/android/app/PendingIntent chipIntent) ` 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. | | ` https://developer.android.com/reference/android/app/Notification.MediaStyle` | ` https://developer.android.com/reference/android/app/Notification.MediaStyle#setShowActionsInCompactView(int[])(int... actions) ` Request up to 3 actions (by index in the order of addition) to be shown in the compact notification view. | ||
| From class ` https://developer.android.com/reference/android/app/Notification.Style ` |---|---| | ` https://developer.android.com/reference/android/app/Notification` | ` https://developer.android.com/reference/android/app/Notification.Style#build()() ` Calls `https://developer.android.com/reference/android/app/Notification.Builder#build()` on the Builder this Style is attached to. | | ` void` | ` https://developer.android.com/reference/android/app/Notification.Style#checkBuilder()() ` | | ` https://developer.android.com/reference/android/widget/RemoteViews` | ` https://developer.android.com/reference/android/app/Notification.Style#getStandardView(int)(int layoutId) ` | | ` void` | ` https://developer.android.com/reference/android/app/Notification.Style#internalSetBigContentTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence title) ` Overrides ContentTitle in the expanded form of the template. | | ` void` | ` https://developer.android.com/reference/android/app/Notification.Style#internalSetSummaryText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence cs) ` Set the first line of text after the detail section in the expanded form of the template. | | ` void` | ` https://developer.android.com/reference/android/app/Notification.Style#setBuilder(android.app.Notification.Builder)(https://developer.android.com/reference/android/app/Notification.Builder builder) ` | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### DecoratedMediaCustomViewStyle

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

```
public DecoratedMediaCustomViewStyle ()
```

<br />

<br />