public static class Notification.InboxStyle extends Notification.Style
InboxStyle
on a notification:
Notification notif = new Notification.Builder(mContext) .setContentTitle("5 New mails from " + sender.toString()) .setContentText(subject) .setSmallIcon(R.drawable.new_mail) .setLargeIcon(aBitmap) .setStyle(new Notification.InboxStyle() .addLine(str1) .addLine(str2) .setContentTitle("") .setSummaryText("+3 more")) .build();
Notification.bigContentView
mBuilder, mSummaryText, mSummaryTextSet
Constructor and Description |
---|
InboxStyle() |
InboxStyle(Notification.Builder builder)
Deprecated.
use
InboxStyle() . |
Modifier and Type | Method and Description |
---|---|
void |
addExtras(Bundle extras)
Apply any style-specific extras to this notification before shipping it out.
|
Notification.InboxStyle |
addLine(CharSequence cs)
Append a line to the digest section of the Inbox notification.
|
RemoteViews |
makeBigContentView()
Construct a Style-specific RemoteViews for the final big notification layout.
|
protected void |
restoreFromExtras(Bundle extras)
Reconstruct the internal state of this Style object from extras.
|
Notification.InboxStyle |
setBigContentTitle(CharSequence title)
Overrides ContentTitle in the big form of the template.
|
Notification.InboxStyle |
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, hasSummaryInHeader, internalSetBigContentTitle, internalSetSummaryText, makeContentView, makeHeadsUpContentView, purgeResources, setBuilder
public InboxStyle()
@Deprecated public InboxStyle(Notification.Builder builder)
InboxStyle()
.public Notification.InboxStyle setBigContentTitle(CharSequence title)
public Notification.InboxStyle setSummaryText(CharSequence cs)
public Notification.InboxStyle addLine(CharSequence cs)
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 RemoteViews makeBigContentView()
Notification.Style
makeBigContentView
in class Notification.Style