EditorInfo.GetInitialSelectedTextFormatted(Int32) Method

Definition

Gets the selected text, if any.

[Android.Runtime.Register("getInitialSelectedText", "(I)Ljava/lang/CharSequence;", "GetGetInitialSelectedText_IHandler", ApiSince=30)]
public virtual Java.Lang.ICharSequence? GetInitialSelectedTextFormatted (int flags);
[<Android.Runtime.Register("getInitialSelectedText", "(I)Ljava/lang/CharSequence;", "GetGetInitialSelectedText_IHandler", ApiSince=30)>]
abstract member GetInitialSelectedTextFormatted : int -> Java.Lang.ICharSequence
override this.GetInitialSelectedTextFormatted : int -> Java.Lang.ICharSequence

Parameters

flags
Int32

Supplies additional options controlling how the text is returned. May be either 0 or InputConnection#GET_TEXT_WITH_STYLES.

Returns

the text that is currently selected, if any. It could be an empty string when there is no text selected. When null is returned, the selected text might be too long or this protocol is not supported.

Attributes

Remarks

Gets the selected text, if any. May be null when the protocol is not supported or the selected text is way too long.

Java documentation for android.view.inputmethod.EditorInfo.getInitialSelectedText(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