Sdílet prostřednictvím


EditorInfo.GetInitialTextAfterCursorFormatted(Int32, Int32) Method

Definition

Get <var>length</var> characters of text after the current cursor position.

[Android.Runtime.Register("getInitialTextAfterCursor", "(II)Ljava/lang/CharSequence;", "GetGetInitialTextAfterCursor_IIHandler", ApiSince=30)]
public virtual Java.Lang.ICharSequence? GetInitialTextAfterCursorFormatted (int length, int flags);
[<Android.Runtime.Register("getInitialTextAfterCursor", "(II)Ljava/lang/CharSequence;", "GetGetInitialTextAfterCursor_IIHandler", ApiSince=30)>]
abstract member GetInitialTextAfterCursorFormatted : int * int -> Java.Lang.ICharSequence
override this.GetInitialTextAfterCursorFormatted : int * int -> Java.Lang.ICharSequence

Parameters

length
Int32

The expected length of the text.

flags
Int32

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

Returns

the text after the cursor position; the length of the returned text might be less than <var>length</var>. When there is no text after the cursor, an empty string will be returned. It could also be null when the editor or system could not support this protocol.

Attributes

Remarks

Get <var>length</var> characters of text after the current cursor position. May be null when the protocol is not supported.

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