Notification.Builder.SetSubText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SetSubText(ICharSequence) |
This provides some additional information that is displayed in the notification. |
| SetSubText(String) |
This provides some additional information that is displayed in the notification. |
SetSubText(ICharSequence)
This provides some additional information that is displayed in the notification.
[Android.Runtime.Register("setSubText", "(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;", "GetSetSubText_Ljava_lang_CharSequence_Handler")]
public virtual Android.App.Notification.Builder SetSubText(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("setSubText", "(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;", "GetSetSubText_Ljava_lang_CharSequence_Handler")>]
abstract member SetSubText : Java.Lang.ICharSequence -> Android.App.Notification.Builder
override this.SetSubText : Java.Lang.ICharSequence -> Android.App.Notification.Builder
Parameters
- text
- ICharSequence
CharSequence
Returns
This Android.App.Notification.Builder instance, allowing calls to be chained.
- Attributes
Remarks
This provides some additional information that is displayed in the notification. No guarantees are given where exactly it is displayed. This information should only be provided if it provides an essential benefit to the understanding of the notification. The more text you provide the less readable it becomes. For example, an email client should only provide the account name here if more than one email account has been added.
As of Build.VERSION_CODES.N this information is displayed in the notification header area. On Android versions before Build.VERSION_CODES.N this will be shown in the third line of text in the platform notification template. You should not be using setProgress(int, int, boolean) at the same time on those versions; they occupy the same place.
Android reference for android.app.Notification.Builder.setSubText.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
SetSubText(String)
This provides some additional information that is displayed in the notification.
public Android.App.Notification.Builder SetSubText(string? text);
member this.SetSubText : string -> Android.App.Notification.Builder
Parameters
- text
- String
CharSequence
Returns
This Android.App.Notification.Builder instance, allowing calls to be chained.
Remarks
This provides some additional information that is displayed in the notification. No guarantees are given where exactly it is displayed. This information should only be provided if it provides an essential benefit to the understanding of the notification. The more text you provide the less readable it becomes. For example, an email client should only provide the account name here if more than one email account has been added.
As of Build.VERSION_CODES.N this information is displayed in the notification header area. On Android versions before Build.VERSION_CODES.N this will be shown in the third line of text in the platform notification template. You should not be using setProgress(int, int, boolean) at the same time on those versions; they occupy the same place.
Android reference for android.app.Notification.Builder.setSubText.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.