Stay organized with collections
Save and categorize content based on your preferences.
InboxStyle
open class InboxStyle : Notification.Style
Helper class for generating large-format notifications that include a list of (up to 5) strings.
Here's how you'd set the 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();
Summary
Public constructors
Public methods
setBigContentTitle
open fun setBigContentTitle(title: CharSequence!): Notification.InboxStyle!
Overrides ContentTitle in the expanded form of the template. This defaults to the value passed to setContentTitle().
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Notification.InboxStyle\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nInboxStyle\n==========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/Notification.InboxStyle \"View this page in Java\") \n\n```\nopen class InboxStyle : Notification.Style\n```\n\n|---|---|------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.app.Notification.Style](/reference/kotlin/android/app/Notification.Style) ||\n| | ↳ | [android.app.Notification.InboxStyle](#) |\n\nHelper class for generating large-format notifications that include a list of (up to 5) strings.\n\nHere's how you'd set the `InboxStyle` on a notification: \n\n```kotlin\nNotification notif = new Notification.Builder(mContext)\n .setContentTitle(\"5 New mails from \" + sender.toString())\n .setContentText(subject)\n .setSmallIcon(R.drawable.new_mail)\n .setLargeIcon(aBitmap)\n .setStyle(new Notification.InboxStyle()\n .addLine(str1)\n .addLine(str2)\n .setContentTitle(\"\")\n .setSummaryText(\"+3 more\"))\n .build();\n \n```\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [InboxStyle](#InboxStyle())`()` \u003cbr /\u003e |\n| [InboxStyle](#InboxStyle(android.app.Notification.Builder))`(`builder:` `[Notification.Builder](/reference/kotlin/android/app/Notification.Builder)!`)` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Notification.InboxStyle](#)! | [addLine](#addLine(kotlin.CharSequence))`(`cs:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Append a line to the digest section of the Inbox notification. |\n| open [Notification.InboxStyle](#)! | [setBigContentTitle](#setBigContentTitle(kotlin.CharSequence))`(`title:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Overrides ContentTitle in the expanded form of the template. |\n| open [Notification.InboxStyle](#)! | [setSummaryText](#setSummaryText(kotlin.CharSequence))`(`cs:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Set the first line of text after the detail section in the expanded form of the template. |\n\n| Inherited functions ||\n|---|---|\n| From class [Style](/reference/kotlin/android/app/Notification.Style) |------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Notification](/reference/kotlin/android/app/Notification)! | [build](/reference/kotlin/android/app/Notification.Style#build())`()` Calls [android.app.Notification.Builder#build()](/reference/kotlin/android/app/Notification.Builder#build()) on the Builder this Style is attached to. Note: Calling build() multiple times returns the same Notification instance, so reusing a builder to create multiple Notifications is discouraged. \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [checkBuilder](/reference/kotlin/android/app/Notification.Style#checkBuilder())`()` \u003cbr /\u003e | | [RemoteViews](../widget/RemoteViews.html#)! | [getStandardView](/reference/kotlin/android/app/Notification.Style#getStandardView(kotlin.Int))`(`layoutId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [internalSetBigContentTitle](/reference/kotlin/android/app/Notification.Style#internalSetBigContentTitle(kotlin.CharSequence))`(`title:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Overrides ContentTitle in the expanded form of the template. This defaults to the value passed to setContentTitle(). \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [internalSetSummaryText](/reference/kotlin/android/app/Notification.Style#internalSetSummaryText(kotlin.CharSequence))`(`cs:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Set the first line of text after the detail section in the expanded form of the template. \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [setBuilder](/reference/kotlin/android/app/Notification.Style#setBuilder(android.app.Notification.Builder))`(`builder:` `[Notification.Builder](/reference/kotlin/android/app/Notification.Builder)!`)` \u003cbr /\u003e | ||\n\n| Inherited properties ||\n|---|---|\n| From class [Style](/reference/kotlin/android/app/Notification.Style) |-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| | [Notification.Builder](/reference/kotlin/android/app/Notification.Builder)! | [mBuilder](/reference/kotlin/android/app/Notification.Style#mBuilder:android.app.Notification.Builder) \u003cbr /\u003e | ||\n\nPublic constructors\n-------------------\n\n### InboxStyle\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInboxStyle()\n``` \n\n### InboxStyle\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInboxStyle(builder: Notification.Builder!)\n```\n\n**Deprecated:** *use `InboxStyle()`.*\n\nPublic methods\n--------------\n\n### addLine\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun addLine(cs: CharSequence!): Notification.InboxStyle!\n```\n\nAppend a line to the digest section of the Inbox notification. \n\n### setBigContentTitle\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun setBigContentTitle(title: CharSequence!): Notification.InboxStyle!\n```\n\nOverrides ContentTitle in the expanded form of the template. This defaults to the value passed to setContentTitle(). \n\n### setSummaryText\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun setSummaryText(cs: CharSequence!): Notification.InboxStyle!\n```\n\nSet the first line of text after the detail section in the expanded form of the template."]]