# Notification.Style

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

# Style

*** ** * ** ***

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

```
abstract class Style
```

|---|------------------------------------------------------------------------------------------------------------------|
| [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#) |

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [Notification.BigPictureStyle](https://developer.android.com/reference/kotlin/android/app/Notification.BigPictureStyle),[Notification.BigTextStyle](https://developer.android.com/reference/kotlin/android/app/Notification.BigTextStyle),[Notification.CallStyle](https://developer.android.com/reference/kotlin/android/app/Notification.CallStyle),[Notification.DecoratedCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.DecoratedCustomViewStyle),[Notification.InboxStyle](https://developer.android.com/reference/kotlin/android/app/Notification.InboxStyle),[Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle),[Notification.MessagingStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MessagingStyle),[Notification.ProgressStyle](https://developer.android.com/reference/kotlin/android/app/Notification.ProgressStyle) |-------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification.BigPictureStyle](https://developer.android.com/reference/kotlin/android/app/Notification.BigPictureStyle)                   | Helper class for generating large-format notifications that include a large image attachment.                                                                                                                                | | [Notification.BigTextStyle](https://developer.android.com/reference/kotlin/android/app/Notification.BigTextStyle)                         | Helper class for generating large-format notifications that include a lot of text.                                                                                                                                           | | [Notification.CallStyle](https://developer.android.com/reference/kotlin/android/app/Notification.CallStyle)                               | Helper class for generating large-format notifications that include a caller and required actions, such as an incoming call with answer / decline.                                                                           | | [Notification.DecoratedCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.DecoratedCustomViewStyle) | Notification style for custom views that are decorated by the system                                                                                                                                                         | | [Notification.InboxStyle](https://developer.android.com/reference/kotlin/android/app/Notification.InboxStyle)                             | Helper class for generating large-format notifications that include a list of (up to 5) strings.                                                                                                                             | | [Notification.MediaStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MediaStyle)                             | Notification style for media playback notifications.                                                                                                                                                                         | | [Notification.MessagingStyle](https://developer.android.com/reference/kotlin/android/app/Notification.MessagingStyle)                     | Helper class for generating large-format notifications that include multiple back-and-forth messages of varying types between any number of people.                                                                          | | [Notification.ProgressStyle](https://developer.android.com/reference/kotlin/android/app/Notification.ProgressStyle)                       | A Notification Style used to define a notification whose expanded state includes 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 [Notification.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.DecoratedMediaCustomViewStyle) |-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------| | [Notification.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/kotlin/android/app/Notification.DecoratedMediaCustomViewStyle) | Notification style for media custom views that are decorated by the system | |

An object that can apply a rich notification style to a[Notification.Builder](https://developer.android.com/reference/kotlin/android/app/Notification.Builder)object.

## Summary

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

|                                                                                                                                                                                   Public methods                                                                                                                                                                                   ||
|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Notification](https://developer.android.com/reference/kotlin/android/app/Notification)! | [build](https://developer.android.com/reference/kotlin/android/app/Notification.Style#build())`()` 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. |
| open[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 />             |

|                                                                                                                                                                                                                      Protected methods                                                                                                                                                                                                                       ||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[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 />                                                                                                                                                                                                                                 |
| open[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 />                                                                                                                         |
| open[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)!`)` Overrides ContentTitle in the expanded form of the template.                   |
| open[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)!`)` Set the first line of text after the detail section in the expanded form of the template. |

|                                                                                                                      Properties                                                                                                                      ||
|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| [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

### Style

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

```
Style()
```

**Deprecated:** *public access to the constructor of Style() is only useful for creating custom subclasses, but that has actually been impossible due to hidden abstract methods, so this constructor is now officially deprecated to clarify that this is intended to be disallowed.*

## Public methods

### build

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

```
open fun build(): Notification!
```

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.

|                                                            Return                                                            ||
|------------------------------------------------------------------------------------------|------------------------------------|
| [Notification](https://developer.android.com/reference/kotlin/android/app/Notification)! | the fully constructed Notification |

### setBuilder

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

```
open fun setBuilder(builder: Notification.Builder!): Unit
```

## Protected methods

### checkBuilder

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

```
protected open fun checkBuilder(): Unit
```  

### getStandardView

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

```
protected open fun getStandardView(layoutId: Int): RemoteViews!
```  

### internalSetBigContentTitle

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

```
protected open fun internalSetBigContentTitle(title: CharSequence!): Unit
```

Overrides ContentTitle in the expanded form of the template. This defaults to the value passed to setContentTitle().  

### internalSetSummaryText

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

```
protected open fun internalSetSummaryText(cs: CharSequence!): Unit
```

Set the first line of text after the detail section in the expanded form of the template.

## Properties

### mBuilder

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

```
protected var mBuilder: Notification.Builder!
```