# Notification.Style

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

# Notification.Style

*** ** * ** ***

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


`
public
static

abstract
class
Notification.Style
`


`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


`

`


`

|---|--------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.Notification.Style |

|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known direct subclasses [Notification.BigPictureStyle](https://developer.android.com/reference/android/app/Notification.BigPictureStyle), [Notification.BigTextStyle](https://developer.android.com/reference/android/app/Notification.BigTextStyle), [Notification.CallStyle](https://developer.android.com/reference/android/app/Notification.CallStyle), [Notification.DecoratedCustomViewStyle](https://developer.android.com/reference/android/app/Notification.DecoratedCustomViewStyle), [Notification.InboxStyle](https://developer.android.com/reference/android/app/Notification.InboxStyle), [Notification.MediaStyle](https://developer.android.com/reference/android/app/Notification.MediaStyle), [Notification.MessagingStyle](https://developer.android.com/reference/android/app/Notification.MessagingStyle), [Notification.ProgressStyle](https://developer.android.com/reference/android/app/Notification.ProgressStyle) |------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification.BigPictureStyle](https://developer.android.com/reference/android/app/Notification.BigPictureStyle)                   | Helper class for generating large-format notifications that include a large image attachment.                                                                                                                                                                               | | [Notification.BigTextStyle](https://developer.android.com/reference/android/app/Notification.BigTextStyle)                         | Helper class for generating large-format notifications that include a lot of text.                                                                                                                                                                                          | | [Notification.CallStyle](https://developer.android.com/reference/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/android/app/Notification.DecoratedCustomViewStyle) | Notification style for custom views that are decorated by the system Instead of providing a 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. | | [Notification.InboxStyle](https://developer.android.com/reference/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/android/app/Notification.MediaStyle)                             | Notification style for media playback notifications.                                                                                                                                                                                                                        | | [Notification.MessagingStyle](https://developer.android.com/reference/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/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/android/app/Notification.DecoratedMediaCustomViewStyle) |----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification.DecoratedMediaCustomViewStyle](https://developer.android.com/reference/android/app/Notification.DecoratedMediaCustomViewStyle) | 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. | |

<br />

*** ** * ** ***

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

## Summary

|                                                                                                 ### Fields                                                                                                 ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| ` protected `[Notification.Builder](https://developer.android.com/reference/android/app/Notification.Builder) | [mBuilder](https://developer.android.com/reference/android/app/Notification.Style#mBuilder) |

|                                                                                                                                                                                          ### Public constructors                                                                                                                                                                                          ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Style](https://developer.android.com/reference/android/app/Notification.Style#Style())`() ` *This constructor is 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                                                                                                                                                                   ||
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Notification](https://developer.android.com/reference/android/app/Notification) | ` `[build](https://developer.android.com/reference/android/app/Notification.Style#build())`() ` Calls [Notification.Builder.build()](https://developer.android.com/reference/android/app/Notification.Builder#build()) on the Builder this Style is attached to. |
| ` void`                                                                             | ` `[setBuilder](https://developer.android.com/reference/android/app/Notification.Style#setBuilder(android.app.Notification.Builder))`(`[Notification.Builder](https://developer.android.com/reference/android/app/Notification.Builder)` builder) `              |

|                                                                                                                                                                                                   ### Protected methods                                                                                                                                                                                                    ||
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                              | ` `[checkBuilder](https://developer.android.com/reference/android/app/Notification.Style#checkBuilder())`() `                                                                                                                                                                                                                        |
| ` `[RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews) | ` `[getStandardView](https://developer.android.com/reference/android/app/Notification.Style#getStandardView(int))`(int layoutId) `                                                                                                                                                                                                   |
| ` void`                                                                              | ` `[internalSetBigContentTitle](https://developer.android.com/reference/android/app/Notification.Style#internalSetBigContentTitle(java.lang.CharSequence))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` title) ` Overrides ContentTitle in the expanded form of the template.                   |
| ` void`                                                                              | ` `[internalSetSummaryText](https://developer.android.com/reference/android/app/Notification.Style#internalSetSummaryText(java.lang.CharSequence))`(`[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. |

| ### Inherited methods |
|-----------------------|---|
| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                        | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                             | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                 | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                   | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                              | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                              | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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*.                                                                                             | ||

## Fields

### mBuilder

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

```
protected Notification.Builder mBuilder
```

<br />

<br />

## Public constructors

### Style

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

```
public Style ()
```


**This constructor is 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.

<br />

<br />

## Public methods

### build

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

```
public Notification build ()
```

Calls [Notification.Builder.build()](https://developer.android.com/reference/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.

<br />

|                                                           Returns                                                           ||
|----------------------------------------------------------------------------------|-------------------------------------------|
| [Notification](https://developer.android.com/reference/android/app/Notification) | the fully constructed Notification <br /> |

### setBuilder

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

```
public void setBuilder (Notification.Builder builder)
```

<br />

<br />

|                Parameters                ||
|-----------|-------------------------------|
| `builder` | `Notification.Builder` <br /> |

## Protected methods

### checkBuilder

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

```
protected void checkBuilder ()
```

<br />

<br />

### getStandardView

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

```
protected RemoteViews getStandardView (int layoutId)
```

<br />

<br />

|        Parameters        ||
|------------|--------------|
| `layoutId` | `int` <br /> |

|                                          Returns                                          ||
|-----------------------------------------------------------------------------------|--------|
| [RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews) | <br /> |

### internalSetBigContentTitle

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

```
protected void internalSetBigContentTitle (CharSequence title)
```

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

<br />

|           Parameters           ||
|---------|-----------------------|
| `title` | `CharSequence` <br /> |

### internalSetSummaryText

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

```
protected void internalSetSummaryText (CharSequence cs)
```

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

<br />

|         Parameters          ||
|------|-----------------------|
| `cs` | `CharSequence` <br /> |