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

*** ** * ** ***


```
public class NotificationCompat.BigPictureStyle extends NotificationCompat.Style
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.core.app.NotificationCompat.Style](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Style) ||
|   | ↳ | [androidx.core.app.NotificationCompat.BigPictureStyle](https://developer.android.com/reference/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:

```
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 |
|---|---|
| `https://developer.android.com/reference/android/app/Notification.html#bigContentView` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigPictureStyle#BigPictureStyle()()` |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.BigPictureStyle#BigPictureStyle(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)` |

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

| ### Inherited methods |
|---|
| From [androidx.core.app.NotificationCompat.Style](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Style) |---|---| | `@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

### BigPictureStyle

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

```
public BigPictureStyle()
```

### BigPictureStyle

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

```
public BigPictureStyle(@Nullable NotificationCompat.Builder builder)
```

## Public methods

### bigLargeIcon

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

```
public @NonNull NotificationCompat.BigPictureStyle bigLargeIcon(@Nullable Bitmap b)
```

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)

```
public @NonNull NotificationCompat.BigPictureStyle bigLargeIcon(@Nullable Icon i)
```

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)

```
public @NonNull NotificationCompat.BigPictureStyle bigPicture(@Nullable Bitmap b)
```

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)
public @NonNull NotificationCompat.BigPictureStyle bigPicture(@Nullable Icon i)
```

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)

```
public @NonNull NotificationCompat.BigPictureStyle setBigContentTitle(@Nullable CharSequence title)
```

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)
public @NonNull NotificationCompat.BigPictureStyle setContentDescription(@Nullable CharSequence contentDescription)
```

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)

```
public @NonNull NotificationCompat.BigPictureStyle setSummaryText(@Nullable CharSequence cs)
```

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)
public @NonNull NotificationCompat.BigPictureStyle showBigPictureWhenCollapsed(boolean show)
```

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