to top
Android APIs
public static class

Notification.InboxStyle

extends Notification.Style
java.lang.Object
   ↳ android.app.Notification.Style
     ↳ android.app.Notification.InboxStyle

Class Overview

Helper class for generating large-format notifications that include a list of (up to 5) strings. This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:

 Notification noti = new Notification.InboxStyle(
      new Notification.Builder()
         .setContentTitle("5 New mails from " + sender.toString())
         .setContentText(subject)
         .setSmallIcon(R.drawable.new_mail)
         .setLargeIcon(aBitmap))
      .addLine(str1)
      .addLine(str2)
      .setContentTitle("")
      .setSummaryText("+3 more")
      .build();
 

See Also

Summary

[Expand]
Inherited Fields
From class android.app.Notification.Style
Public Constructors
Notification.InboxStyle()
Notification.InboxStyle(Notification.Builder builder)
Public Methods
Notification.InboxStyle addLine(CharSequence cs)
Notification build()
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.
[Expand]
Inherited Methods
From class android.app.Notification.Style
From class java.lang.Object

Public Constructors

public Notification.InboxStyle ()

Since: API Level 16

public Notification.InboxStyle (Notification.Builder builder)

Since: API Level 16

Public Methods

public Notification build ()

Since: API Level 16

public Notification.InboxStyle setBigContentTitle (CharSequence title)

Since: API Level 16

Overrides ContentTitle in the big form of the template. This defaults to the value passed to setContentTitle().

public Notification.InboxStyle setSummaryText (CharSequence cs)

Since: API Level 16

Set the first line of text after the detail section in the big form of the template.