# NotificationCompat.DecoratedMediaCustomViewStyle

Artifact: [androidx.media:media](https://developer.android.com/jetpack/androidx/releases/media) [View Source](https://cs.android.com/search?q=file:androidx/media/app/NotificationCompat.java+class:androidx.media.app.NotificationCompat.DecoratedMediaCustomViewStyle) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

*** ** * ** ***


```
class NotificationCompat.DecoratedMediaCustomViewStyle : NotificationCompat.MediaStyle
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.core.app.NotificationCompat.Style](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Style) |||
|   | ↳ | [androidx.media.app.NotificationCompat.MediaStyle](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle) ||
|   |   | ↳ | [androidx.media.app.NotificationCompat.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.DecoratedMediaCustomViewStyle) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> androidx.media is deprecated. Please migrate to [androidx.media3](https://developer.android.com/media/media3).

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/kotlin/androidx/core/app/NotificationCompat.Builder`, `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder` and `https://developer.android.com/reference/kotlin/androidx/core/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/kotlin/androidx/core/app/NotificationCompat.Builder` like so:

```kotlin
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/kotlin/androidx/media/R.style#TextAppearance_Compat_Notification_Media()` or `https://developer.android.com/reference/kotlin/androidx/media/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/kotlin/androidx/core/app/NotificationCompat.DecoratedCustomViewStyle` |   |
| `https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle` |   |

## Summary

| ### Public constructors |
|---|
| `[DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.DecoratedMediaCustomViewStyle#DecoratedMediaCustomViewStyle())()` **This function is deprecated.** Deprecated in Java |

### Inherited functions

From [androidx.media.app.NotificationCompat.MediaStyle](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle) `java-static https://developer.android.com/reference/kotlin/android/support/v4/media/session/MediaSessionCompat.Token!` `[getMediaSession](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#getMediaSession(android.app.Notification))(notification: https://developer.android.com/reference/android/app/Notification.html!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle!` `[setCancelButtonIntent](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#setCancelButtonIntent(android.app.PendingIntent))(pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle!` `[setMediaSession](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#setMediaSession(android.support.v4.media.session.MediaSessionCompat.Token))(token: https://developer.android.com/reference/kotlin/android/support/v4/media/session/MediaSessionCompat.Token!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle` `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(value = "android.permission.MEDIA_CONTENT_CONTROL")
[setRemotePlaybackInfo](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#setRemotePlaybackInfo(java.lang.CharSequence,int,android.app.PendingIntent))(
deviceName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
iconResource: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
chipIntent: https://developer.android.com/reference/android/app/PendingIntent.html?
)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle!` `[setShowActionsInCompactView](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#setShowActionsInCompactView(int...))(actions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)`

**This function is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle!` `[setShowCancelButton](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.MediaStyle#setShowCancelButton(boolean))(show: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.** Deprecated in Java
From [androidx.core.app.NotificationCompat.Style](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Style) `https://developer.android.com/reference/android/app/Notification.html?` `[build](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Style#build())()`

**This function is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setBuilder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Style#setBuilder(androidx.core.app.NotificationCompat.Builder))(builder: https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder?)`

**This function is deprecated.** Deprecated in Java

## Public constructors

### DecoratedMediaCustomViewStyle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/media#1.1.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/media#1.8.0)

```
[DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/androidx/media/app/NotificationCompat.DecoratedMediaCustomViewStyle#DecoratedMediaCustomViewStyle())()
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java