# NotificationCompat.BigPictureStyle

# NotificationCompat.BigPictureStyle

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.BigPictureStyle)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigPictureStyle "View this page in Java")

<br />

```
class NotificationCompat.BigPictureStyle : NotificationCompat.Style
```

<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.core.app.NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) |

*** ** * ** ***

Helper class for generating large-format notifications that include a large image attachment. If the platform does not provide large-format notifications, this method has no effect. The user will always see the normal notification view. This class is a "rebuilder": It attaches to a Builder object and modifies its behavior, like so:  

```kotlin
Notification notification = new NotificationCompat.Builder(mContext)
    .setContentTitle("New photo from " + sender.toString())
    .setContentText(subject)
    .setSmallIcon(R.drawable.new_post)
    .setLargeIcon(aBitmap)
    .setStyle(new Notification.BigPictureStyle()
        .bigPicture(aBigBitmap))
    .build();
```  

|                                                 See also                                                 |
|----------------------------------------------------------------------------------------------------------|---|
| [bigContentView](https://developer.android.com/reference/android/app/Notification.html#bigContentView()) |   |

## Summary

|                                                                                                                                                    ### Public constructors                                                                                                                                                    |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#BigPictureStyle())`()`                                                                                                                                                                                  |
| [BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#BigPictureStyle(androidx.core.app.NotificationCompat.Builder))`(builder: `[NotificationCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder)`?)` |

|                                                           ### Public functions                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | [bigLargeIcon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigLargeIcon(android.graphics.Bitmap))`(b: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`?)` Override the large icon when the big notification is shown.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 23)` [bigLargeIcon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigLargeIcon(android.graphics.drawable.Icon))`(i: `[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)`?)` Override the large icon when the big notification is shown.                                                                                                                                                                                                                                                                                                                                                                     |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | [bigPicture](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.Bitmap))`(b: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`?)` Provide the bitmap to be used as the payload for the BigPicture notification.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 31)` [bigPicture](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.drawable.Icon))`(i: `[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)`?)` Provide an icon to be used as the payload for the BigPicture notification.                                                                                                                                                                                                                                                                                                                                                          |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | [setBigContentTitle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#setBigContentTitle(java.lang.CharSequence))`(title: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Overrides ContentTitle in the big form of the template.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 31)` [setContentDescription](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#setContentDescription(java.lang.CharSequence))`(contentDescription: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Set the content description of the big picture.                                                                                                                                                                                                                                                                                                                                           |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | [setSummaryText](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#setSummaryText(java.lang.CharSequence))`(cs: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Set the first line of text after the detail section in the big form of the template.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle) | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 31)` [showBigPictureWhenCollapsed](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#showBigPictureWhenCollapsed(boolean))`(show: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` When set, the[big picture](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.Bitmap))of this style will be promoted and shown in place of the[large icon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap))in the collapsed state of this notification. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.core.app.NotificationCompat.Style](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Style) |------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification](https://developer.android.com/reference/android/app/Notification.html)`?` | [build](https://developer.android.com/reference/kotlin/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.                                                                                                                                      | | [Unit](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: `[NotificationCompat.Builder](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder)`?)` Link this rich notification style with a notification builder. | |

## Public constructors

### BigPictureStyle

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

```
BigPictureStyle()
```  

### BigPictureStyle

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

```
BigPictureStyle(builder: NotificationCompat.Builder?)
```  

## Public functions

### bigLargeIcon

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

```
fun bigLargeIcon(b: Bitmap?): NotificationCompat.BigPictureStyle
```

Override the large icon when the big notification is shown.  

### bigLargeIcon

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

```
@RequiresApi(value = 23)
fun bigLargeIcon(i: Icon?): NotificationCompat.BigPictureStyle
```

Override the large icon when the big notification is shown.  

### bigPicture

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

```
fun bigPicture(b: Bitmap?): NotificationCompat.BigPictureStyle
```

Provide the bitmap to be used as the payload for the BigPicture notification.  

### bigPicture

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

```
@RequiresApi(value = 31)
fun bigPicture(i: Icon?): NotificationCompat.BigPictureStyle
```

Provide an icon to be used as the payload for the BigPicture notification. Note that certain features (like animated Icons) may not work on all versions.  

### setBigContentTitle

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

```
fun setBigContentTitle(title: CharSequence?): NotificationCompat.BigPictureStyle
```

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

### setContentDescription

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

```
@RequiresApi(value = 31)
fun setContentDescription(contentDescription: CharSequence?): NotificationCompat.BigPictureStyle
```

Set the content description of the big picture.  

### setSummaryText

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

```
fun setSummaryText(cs: CharSequence?): NotificationCompat.BigPictureStyle
```

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

### showBigPictureWhenCollapsed

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

```
@RequiresApi(value = 31)
fun showBigPictureWhenCollapsed(show: Boolean): NotificationCompat.BigPictureStyle
```

When set, the[big picture](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.Bitmap))of this style will be promoted and shown in place of the[large icon](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap))in the collapsed state of this notification.