public static class Notification.BigPictureStyle extends Notification.Style
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();
Notification.bigContentView
Modifier and Type | Field and Description |
---|---|
static int |
MIN_ASHMEM_BITMAP_SIZE |
mBuilder, mSummaryText, mSummaryTextSet
Constructor and Description |
---|
BigPictureStyle() |
BigPictureStyle(Notification.Builder builder)
Deprecated.
use
BigPictureStyle() . |
Modifier and Type | Method and Description |
---|---|
void |
addExtras(Bundle extras)
Apply any style-specific extras to this notification before shipping it out.
|
Notification.BigPictureStyle |
bigLargeIcon(Bitmap b)
Override the large icon when the big notification is shown.
|
Notification.BigPictureStyle |
bigLargeIcon(Icon icon)
Override the large icon when the big notification is shown.
|
Notification.BigPictureStyle |
bigPicture(Bitmap b)
Provide the bitmap to be used as the payload for the BigPicture notification.
|
boolean |
hasSummaryInHeader() |
RemoteViews |
makeBigContentView()
Construct a Style-specific RemoteViews for the final big notification layout.
|
void |
purgeResources() |
protected void |
restoreFromExtras(Bundle extras)
Reconstruct the internal state of this Style object from extras.
|
Notification.BigPictureStyle |
setBigContentTitle(CharSequence title)
Overrides ContentTitle in the big form of the template.
|
Notification.BigPictureStyle |
setSummaryText(CharSequence cs)
Set the first line of text after the detail section in the big form of the template.
|
build, buildStyled, checkBuilder, displayCustomViewInline, getStandardView, hasProgress, internalSetBigContentTitle, internalSetSummaryText, makeContentView, makeHeadsUpContentView, setBuilder
public static final int MIN_ASHMEM_BITMAP_SIZE
public BigPictureStyle()
@Deprecated public BigPictureStyle(Notification.Builder builder)
BigPictureStyle()
.public Notification.BigPictureStyle setBigContentTitle(CharSequence title)
public Notification.BigPictureStyle setSummaryText(CharSequence cs)
public Notification.BigPictureStyle bigPicture(Bitmap b)
public Notification.BigPictureStyle bigLargeIcon(Bitmap b)
public Notification.BigPictureStyle bigLargeIcon(Icon icon)
public void purgeResources()
purgeResources
in class Notification.Style
public RemoteViews makeBigContentView()
Notification.Style
makeBigContentView
in class Notification.Style
public void addExtras(Bundle extras)
Notification.Style
addExtras
in class Notification.Style
protected void restoreFromExtras(Bundle extras)
Notification.Style
restoreFromExtras
in class Notification.Style
public boolean hasSummaryInHeader()
hasSummaryInHeader
in class Notification.Style