Notification.BigPictureStyle
public
static
class
Notification.BigPictureStyle
extends 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 methods |
From class
android.app.Notification.Style
|
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.
|
final
Class<?>
|
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
bigLargeIcon
public Notification.BigPictureStyle bigLargeIcon (Bitmap b)
Override the large icon when the expanded notification is shown.
Parameters |
b |
Bitmap : This value may be null . |
bigLargeIcon
public Notification.BigPictureStyle bigLargeIcon (Icon icon)
Override the large icon when the expanded notification is shown.
Parameters |
icon |
Icon : This value may be null . |
bigPicture
public Notification.BigPictureStyle bigPicture (Bitmap b)
Provide the bitmap to be used as the payload for the BigPicture notification.
Parameters |
b |
Bitmap : This value may be null . |
bigPicture
public Notification.BigPictureStyle bigPicture (Icon icon)
Provide the content Uri to be used as the payload for the BigPicture notification.
Parameters |
icon |
Icon : This value may be null . |
setBigContentTitle
public Notification.BigPictureStyle setBigContentTitle (CharSequence title)
Overrides ContentTitle in the expanded form of the template.
This defaults to the value passed to setContentTitle().
Parameters |
title |
CharSequence : This value may be null . |
setContentDescription
public Notification.BigPictureStyle setContentDescription (CharSequence contentDescription)
Set the content description of the big picture.
Parameters |
contentDescription |
CharSequence : This value may be null . |
setSummaryText
public Notification.BigPictureStyle setSummaryText (CharSequence cs)
Set the first line of text after the detail section in the expanded form of the template.
Parameters |
cs |
CharSequence : This value may be null . |
showBigPictureWhenCollapsed
public 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.