Added in API level 16

BigPictureStyle


open class BigPictureStyle : Notification.Style
kotlin.Any
   ↳ android.app.Notification.Style
   ↳ android.app.Notification.BigPictureStyle

Helper class for generating large-format notifications that include a large image attachment. Here's how you'd set the BigPictureStyle on a notification:

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

Summary

Public constructors

Public methods
open Notification.BigPictureStyle

Override the large icon when the big notification is shown.

open Notification.BigPictureStyle

Override the large icon when the big notification is shown.

open Notification.BigPictureStyle

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

open Notification.BigPictureStyle
bigPicture(icon: Icon?)

Provide the content Uri to be used as the payload for the BigPicture notification.

open Notification.BigPictureStyle

Overrides ContentTitle in the big form of the template.

open Notification.BigPictureStyle
setContentDescription(contentDescription: CharSequence?)

Set the content description of the big picture.

open Notification.BigPictureStyle

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

open Notification.BigPictureStyle

When set, the big picture of this style will be promoted and shown in place of the large icon in the collapsed state of this notification.

Inherited functions
Inherited properties

Public constructors

BigPictureStyle

Added in API level 16
BigPictureStyle()

BigPictureStyle

Added in API level 16
BigPictureStyle(builder: Notification.Builder!)

Deprecated: use BigPictureStyle().

Public methods

bigLargeIcon

Added in API level 16
open fun bigLargeIcon(b: Bitmap?): Notification.BigPictureStyle

Override the large icon when the big notification is shown.

Parameters
b Bitmap?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

bigLargeIcon

Added in API level 23
open fun bigLargeIcon(icon: Icon?): Notification.BigPictureStyle

Override the large icon when the big notification is shown.

Parameters
icon Icon?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

bigPicture

Added in API level 16
open fun bigPicture(b: Bitmap?): Notification.BigPictureStyle

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

Parameters
b Bitmap?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

bigPicture

Added in API level 31
open fun bigPicture(icon: Icon?): Notification.BigPictureStyle

Provide the content Uri to be used as the payload for the BigPicture notification.

Parameters
icon Icon?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

setBigContentTitle

Added in API level 16
open fun setBigContentTitle(title: CharSequence?): Notification.BigPictureStyle

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

Parameters
title CharSequence?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

setContentDescription

Added in API level 31
open fun setContentDescription(contentDescription: CharSequence?): Notification.BigPictureStyle

Set the content description of the big picture.

Parameters
contentDescription CharSequence?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

setSummaryText

Added in API level 16
open fun setSummaryText(cs: CharSequence?): Notification.BigPictureStyle

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

Parameters
cs CharSequence?: This value may be null.
Return
Notification.BigPictureStyle This value cannot be null.

showBigPictureWhenCollapsed

Added in API level 31
open fun showBigPictureWhenCollapsed(show: Boolean): Notification.BigPictureStyle

When set, the big picture of this style will be promoted and shown in place of the large icon in the collapsed state of this notification.

Return
Notification.BigPictureStyle This value cannot be null.