# NotificationCompat.Style

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

*** ** * ** ***


```
public abstract class NotificationCompat.Style
```

<br />

Known direct subclasses [MediaStyleNotificationHelper.MediaStyle](https://developer.android.com/reference/androidx/media3/session/MediaStyleNotificationHelper.MediaStyle), [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigPictureStyle), [NotificationCompat.BigTextStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigTextStyle), [NotificationCompat.CallStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.CallStyle), [NotificationCompat.DecoratedCustomViewStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.DecoratedCustomViewStyle), [NotificationCompat.InboxStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.InboxStyle), [NotificationCompat.MediaStyle](https://developer.android.com/reference/androidx/media/app/NotificationCompat.MediaStyle), [NotificationCompat.MessagingStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.MessagingStyle), [NotificationCompat.MetricStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.MetricStyle), [NotificationCompat.ProgressStyle](https://developer.android.com/reference/androidx/core/app/NotificationCompat.ProgressStyle)

|---|---|
| `https://developer.android.com/reference/androidx/media3/session/MediaStyleNotificationHelper.MediaStyle` | Notification style for media playback notifications. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigPictureStyle` | Helper class for generating large-format notifications that include a large image attachment. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigTextStyle` | Helper class for generating large-format notifications that include a lot of text. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.CallStyle` | Helper class for generating large-format notifications that include a caller and required actions, and indicate an incoming call. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.DecoratedCustomViewStyle` | Notification style for custom views that are decorated by the system. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.InboxStyle` | Helper class for generating large-format notifications that include a list of (up to 5) strings. |
| `https://developer.android.com/reference/androidx/media/app/NotificationCompat.MediaStyle` | **This class is deprecated.** androidx.media is deprecated. <br /> |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.MessagingStyle` | Helper class for generating large-format notifications that include multiple back-and-forth messages of varying types between any number of people. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.MetricStyle` | A notification style which shows up to 3 metrics when expanded. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.ProgressStyle` | Helper class for generating large-format notifications that display progress to the user with a highly customizable progress bar with segments, points, a custom tracker icon, and custom icons at the start and end of the progress bar. |

Known indirect subclasses [MediaStyleNotificationHelper.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/androidx/media3/session/MediaStyleNotificationHelper.DecoratedMediaCustomViewStyle), [NotificationCompat.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/androidx/media/app/NotificationCompat.DecoratedMediaCustomViewStyle)

|---|---|
| `https://developer.android.com/reference/androidx/media3/session/MediaStyleNotificationHelper.DecoratedMediaCustomViewStyle` | Notification style for media custom views that are decorated by the system. |
| `https://developer.android.com/reference/androidx/media/app/NotificationCompat.DecoratedMediaCustomViewStyle` | **This class is deprecated.** androidx.media is deprecated. <br /> |

*** ** * ** ***

An object that can apply a rich notification style to a `https://developer.android.com/reference/android/app/Notification.Builder.html` object. If the platform does not provide rich notification styles, methods in this class have no effect.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Style#Style()()` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/app/Notification.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Style#build()()` If this Style object has been set on a notification builder, this method will build that notification and return it. |
| `void` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Style#setBuilder(androidx.core.app.NotificationCompat.Builder)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder builder)` Link this rich notification style with a notification builder. |

## Public constructors

### Style

Added in 1.1.0

```
public Style()
```

## Public methods

### build

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

```
public @Nullable Notification build()
```

If this Style object has been set on a notification builder, this method will build that notification and return it. Otherwise, it will return `null`.

### setBuilder

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

```
public void setBuilder(@Nullable NotificationCompat.Builder builder)
```

Link this rich notification style with a notification builder.