public static class Notification.BigTextStyle extends Notification.Style
BigTextStyle
on a notification:
Notification notif = new Notification.Builder(mContext) .setContentTitle("New mail from " + sender.toString()) .setContentText(subject) .setSmallIcon(R.drawable.new_mail) .setLargeIcon(aBitmap) .setStyle(new Notification.BigTextStyle() .bigText(aVeryLongString)) .build();
Notification.bigContentView
mBuilder, mSummaryText, mSummaryTextSet
Constructor and Description |
---|
BigTextStyle() |
BigTextStyle(Notification.Builder builder)
Deprecated.
use
BigTextStyle() . |
Modifier and Type | Method and Description |
---|---|
void |
addExtras(Bundle extras)
Apply any style-specific extras to this notification before shipping it out.
|
Notification.BigTextStyle |
bigText(CharSequence cs)
Provide the longer text to be displayed in the big form of the
template in place of the content text.
|
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.BigTextStyle |
setBigContentTitle(CharSequence title)
Overrides ContentTitle in the big form of the template.
|
Notification.BigTextStyle |
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 BigTextStyle()
@Deprecated public BigTextStyle(Notification.Builder builder)
BigTextStyle()
.public Notification.BigTextStyle setBigContentTitle(CharSequence title)
public Notification.BigTextStyle setSummaryText(CharSequence cs)
public Notification.BigTextStyle bigText(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