EditorInfo.GetInitialSelectedText(Int32) Method

Definition

Gets the selected text, if any.

public string? GetInitialSelectedText (int flags);
member this.GetInitialSelectedText : int -> string

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.

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