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 | |
---|---|
BigPictureStyle(builder: Notification.Builder!) |
Public methods | |
---|---|
open Notification.BigPictureStyle |
bigLargeIcon(b: Bitmap?) Override the large icon when the big notification is shown. |
open Notification.BigPictureStyle |
bigLargeIcon(icon: Icon?) Override the large icon when the big notification is shown. |
open Notification.BigPictureStyle |
bigPicture(b: Bitmap?) 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 |
setBigContentTitle(title: CharSequence?) 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 |
setSummaryText(cs: CharSequence?) Set the first line of text after the detail section in the big form of the template. |
open Notification.BigPictureStyle |
When set, the |
Inherited functions | |
---|---|
Inherited properties | |
---|---|
Public constructors
BigPictureStyle
BigPictureStyle(builder: Notification.Builder!)
Deprecated: use BigPictureStyle()
.
Public methods
bigLargeIcon
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
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
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
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
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
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
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
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 . |