InputMethod.OnUpdateSelection Method

Definition

Called when the application has reported a new selection region of the text.

[Android.Runtime.Register("onUpdateSelection", "(IIIIII)V", "GetOnUpdateSelection_IIIIIIHandler", ApiSince=33)]
public virtual void OnUpdateSelection (int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd);
[<Android.Runtime.Register("onUpdateSelection", "(IIIIII)V", "GetOnUpdateSelection_IIIIIIHandler", ApiSince=33)>]
abstract member OnUpdateSelection : int * int * int * int * int * int -> unit
override this.OnUpdateSelection : int * int * int * int * int * int -> unit

Parameters

oldSelStart
Int32
oldSelEnd
Int32
newSelStart
Int32
newSelEnd
Int32
candidatesStart
Int32
candidatesEnd
Int32
Attributes

Remarks

Called when the application has reported a new selection region of the text. This is called whether or not the accessibility service has requested extracted text updates, although if so it will not receive this call if the extracted text has changed as well.

Be careful about changing the text in reaction to this call with methods such as setComposingText, commitText or deleteSurroundingText. If the cursor moves as a result, this method will be called again, which may result in an infinite loop.

Java documentation for android.accessibilityservice.InputMethod.onUpdateSelection(int, int, 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