Share via


EditorInfo.InitialSelEnd Property

Definition

The text offset of the end of the selection at the time editing begins; -1 if not known.

[Android.Runtime.Register("initialSelEnd")]
public int InitialSelEnd { get; set; }
[<Android.Runtime.Register("initialSelEnd")>]
member this.InitialSelEnd : int with get, set

Property Value

Attributes

Remarks

The text offset of the end of the selection at the time editing begins; -1 if not known. Keep in mind that, without knowing the cursor position, many IMEs will not be able to offer their full feature set and may behave in unpredictable ways: pass the actual cursor position here if possible at all.

Also, this needs to be the cursor position <strong>right now</strong>, not at some point in the past, even if input is starting in the same text field as before. When the app is filling this object, input is about to start by definition, and this value will override any value the app may have passed to InputMethodManager#updateSelection(android.view.View, int, int, int, int) before.

Java documentation for android.view.inputmethod.EditorInfo.initialSelEnd.

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