Share via


InputMethodManager.UpdateSelection(View, Int32, Int32, Int32, Int32) Method

Definition

Report the current selection range.

[Android.Runtime.Register("updateSelection", "(Landroid/view/View;IIII)V", "")]
public void UpdateSelection (Android.Views.View? view, int selStart, int selEnd, int candidatesStart, int candidatesEnd);
[<Android.Runtime.Register("updateSelection", "(Landroid/view/View;IIII)V", "")>]
member this.UpdateSelection : Android.Views.View * int * int * int * int -> unit

Parameters

view
View
selStart
Int32
selEnd
Int32
candidatesStart
Int32
candidatesEnd
Int32
Attributes

Remarks

Report the current selection range.

<strong>Editor authors</strong>, you need to call this method whenever the cursor moves in your editor. Remember that in addition to doing this, your editor needs to always supply current cursor values in EditorInfo#initialSelStart and EditorInfo#initialSelEnd every time android.view.View#onCreateInputConnection(EditorInfo) is called, which happens whenever the keyboard shows up or the focus changes to a text field, among other cases.

Java documentation for android.view.inputmethod.InputMethodManager.updateSelection(android.view.View, int, int, 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