Notification.BigPictureStyle  |  Android Developers (original) (raw)


public static class Notification.BigPictureStyle
` extends [Notification.Style](/reference/android/app/Notification.Style) `


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

Inherited fields
From classandroid.app.Notification.Style protectedNotification.Builder mBuilder
Public constructors
BigPictureStyle()
BigPictureStyle(Notification.Builder builder) This constructor is deprecated. use BigPictureStyle().
Public methods
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.
Notification.BigPictureStyle bigPicture(Icon icon) Provide the content Uri to be used as the payload for the BigPicture notification.
Notification.BigPictureStyle setBigContentTitle(CharSequence title) Overrides ContentTitle in the big form of the template.
Notification.BigPictureStyle setContentDescription(CharSequence contentDescription) Set the content description of the big picture.
Notification.BigPictureStyle setSummaryText(CharSequence cs) Set the first line of text after the detail section in the big form of the template.
Notification.BigPictureStyle showBigPictureWhenCollapsed(boolean show) 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 methods
From class android.app.Notification.Style Notification build() Calls Notification.Builder.build() on the Builder this Style is attached to. void checkBuilder() RemoteViews getStandardView(int layoutId) void internalSetBigContentTitle(CharSequence title) Overrides ContentTitle in the big form of the template. void internalSetSummaryText(CharSequence cs) Set the first line of text after the detail section in the big form of the template. void setBuilder(Notification.Builder builder)
From class java.lang.Object Object clone() Creates and returns a copy of this object. boolean equals(Object obj) Indicates whether some other object is "equal to" this one. void finalize() Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. finalClass<?> getClass() Returns the runtime class of this Object. int hashCode() Returns a hash code value for the object. final void notify() Wakes up a single thread that is waiting on this object's monitor. final void notifyAll() Wakes up all threads that are waiting on this object's monitor. String toString() Returns a string representation of the object. final void wait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. final void wait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. final void wait() Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

BigPictureStyle

public BigPictureStyle ()

BigPictureStyle

public BigPictureStyle (Notification.Builder builder)

This constructor is deprecated.
use BigPictureStyle().

Parameters
builder Notification.Builder

Public methods