Language

SuggestionSpan Constructors

Definition

Overloads

Name Description
SuggestionSpan(Parcel)

Creates a SuggestionSpan from its saved parcel state.

SuggestionSpan(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

SuggestionSpan(Context, String[], SuggestionSpanFlags)

Creates a suggestion span using the context's locale and text appearance.

SuggestionSpan(Locale, String[], SuggestionSpanFlags)

Creates a suggestion span using the specified locale.

SuggestionSpan(Context, Locale, String[], SuggestionSpanFlags, Class)

Creates a suggestion span with the specified context, locale, suggestions, and flags.

SuggestionSpan(Parcel)

Creates a SuggestionSpan from its saved parcel state.

[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")]
public SuggestionSpan(Android.OS.Parcel? src);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")>]
new Android.Text.Style.SuggestionSpan : Android.OS.Parcel -> Android.Text.Style.SuggestionSpan

Parameters

src
Parcel

The parcel from which to read the span's saved state.

Attributes

Remarks

Java documentation for android.text.style.SuggestionSpan.SuggestionSpan(android.content.Context, java.util.Locale, java.lang.String[], int, java.lang.Class).

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

SuggestionSpan(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected SuggestionSpan(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Text.Style.SuggestionSpan : nativeint * Android.Runtime.JniHandleOwnership -> Android.Text.Style.SuggestionSpan

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

SuggestionSpan(Context, String[], SuggestionSpanFlags)

Creates a suggestion span using the context's locale and text appearance.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;[Ljava/lang/String;I)V", "")]
public SuggestionSpan(Android.Content.Context? context, string[]? suggestions, Android.Text.Style.SuggestionSpanFlags flags);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;[Ljava/lang/String;I)V", "")>]
new Android.Text.Style.SuggestionSpan : Android.Content.Context * string[] * Android.Text.Style.SuggestionSpanFlags -> Android.Text.Style.SuggestionSpan

Parameters

context
Context

Context for the application

suggestions
String[]

Suggestions for the string under the span

flags
SuggestionSpanFlags

Additional flags indicating how this span is handled in TextView

Attributes

Remarks

Java documentation for android.text.style.SuggestionSpan.SuggestionSpan(android.content.Context, java.lang.String[], int).

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

SuggestionSpan(Locale, String[], SuggestionSpanFlags)

Creates a suggestion span using the specified locale.

[Android.Runtime.Register(".ctor", "(Ljava/util/Locale;[Ljava/lang/String;I)V", "")]
public SuggestionSpan(Java.Util.Locale? locale, string[]? suggestions, Android.Text.Style.SuggestionSpanFlags flags);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Locale;[Ljava/lang/String;I)V", "")>]
new Android.Text.Style.SuggestionSpan : Java.Util.Locale * string[] * Android.Text.Style.SuggestionSpanFlags -> Android.Text.Style.SuggestionSpan

Parameters

locale
Locale

Locale of the suggestions

suggestions
String[]

Suggestions for the string under the span

flags
SuggestionSpanFlags

Additional flags indicating how this span is handled in TextView

Attributes

Remarks

Java documentation for android.text.style.SuggestionSpan.SuggestionSpan(java.util.Locale, java.lang.String[], int).

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

SuggestionSpan(Context, Locale, String[], SuggestionSpanFlags, Class)

Creates a suggestion span with the specified context, locale, suggestions, and flags.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/util/Locale;[Ljava/lang/String;ILjava/lang/Class;)V", "")]
public SuggestionSpan(Android.Content.Context? context, Java.Util.Locale? locale, string[]? suggestions, Android.Text.Style.SuggestionSpanFlags flags, Java.Lang.Class? notificationTargetClass);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/util/Locale;[Ljava/lang/String;ILjava/lang/Class;)V", "")>]
new Android.Text.Style.SuggestionSpan : Android.Content.Context * Java.Util.Locale * string[] * Android.Text.Style.SuggestionSpanFlags * Java.Lang.Class -> Android.Text.Style.SuggestionSpan

Parameters

context
Context

Context for the application

locale
Locale

locale Locale of the suggestions

suggestions
String[]

Suggestions for the string under the span. Only the first up to SuggestionSpan#SUGGESTIONS_MAX_SIZE will be considered. Null values not permitted.

flags
SuggestionSpanFlags

Additional flags indicating how this span is handled in TextView

notificationTargetClass
Class

if not null, this class will get notified when the user selects one of the suggestions. On Android android.os.Build.VERSION_CODES#Q and later this parameter is always ignored.

Attributes

Remarks

Java documentation for android.text.style.SuggestionSpan.SuggestionSpan(android.content.Context, java.util.Locale, java.lang.String[], int, java.lang.Class<?>).

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