Język

Notification.CreateSemanticStyleAnnotation(Int32) Method

Definition

Constructs an Annotation that can be used to span text in a Spanned CharSequence in some Notification text fields, and which may then be converted into styling of that section of text in order to indicate the semantic style.

[Android.Runtime.Register("createSemanticStyleAnnotation", "(I)Landroid/text/Annotation;", "", ApiSince=37)]
public static Android.Text.Annotation CreateSemanticStyleAnnotation(int semanticStyle);
[<Android.Runtime.Register("createSemanticStyleAnnotation", "(I)Landroid/text/Annotation;", "", ApiSince=37)>]
static member CreateSemanticStyleAnnotation : int -> Android.Text.Annotation

Parameters

semanticStyle
Int32

Value is one of the following: SEMANTIC_STYLE_UNSPECIFIED; SEMANTIC_STYLE_INFO; SEMANTIC_STYLE_SAFE; SEMANTIC_STYLE_CAUTION; SEMANTIC_STYLE_DANGER

Returns

Attributes

Remarks

Constructs an Annotation that can be used to span text in a Spanned CharSequence in some Notification text fields, and which may then be converted into styling of that section of text in order to indicate the semantic style. Since Notifications may strip styling, even for semantic styles, it’s important that stripping these styles should not distort the meaning of the text.

Semantic style will only be applied to text appearance in notifications that are eligible (e.g. promoted notifications).

Android reference for android.app.Notification.createSemanticStyleAnnotation.

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