Compartilhar via


AccessibilityNodeInfo.SetTextSelection(Int32, Int32) Method

Definition

Sets the text selection start and end.

[Android.Runtime.Register("setTextSelection", "(II)V", "GetSetTextSelection_IIHandler")]
public virtual void SetTextSelection (int start, int end);
[<Android.Runtime.Register("setTextSelection", "(II)V", "GetSetTextSelection_IIHandler")>]
abstract member SetTextSelection : int * int -> unit
override this.SetTextSelection : int * int -> unit

Parameters

start
Int32

The text selection start.

end
Int32

The text selection end.

Attributes

Exceptions

If called from an AccessibilityService.

Remarks

Sets the text selection start and end.

<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.setTextSelection(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