Språk

InputConnectionWrapper.SetSelection(Int32, Int32) Method

Definition

Set the selection of the text editor.

[Android.Runtime.Register("setSelection", "(II)Z", "GetSetSelection_IIHandler")]
public virtual bool SetSelection(int start, int end);
[<Android.Runtime.Register("setSelection", "(II)Z", "GetSetSelection_IIHandler")>]
abstract member SetSelection : int * int -> bool
override this.SetSelection : int * int -> bool

Parameters

start
Int32

the character index where the selection should start.

end
Int32

the character index where the selection should end.

Returns

true on success, false if the input connection is no longer valid.

Implements

Attributes

Remarks

Set the selection of the text editor. To set the cursor position, start and end should have the same value.

Java documentation for android.view.inputmethod.InputConnectionWrapper.setSelection(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