SelectionEvent.CreateSelectionActionEvent Method

Definition

Overloads

Name Description
CreateSelectionActionEvent(Int32, Int32, SelectionAction, TextClassification)

Creates an event specifying an action taken on a selection.

CreateSelectionActionEvent(Int32, Int32, SelectionAction)

Creates an event specifying an action taken on a selection.

CreateSelectionActionEvent(Int32, Int32, SelectionAction, TextClassification)

Creates an event specifying an action taken on a selection.

[Android.Runtime.Register("createSelectionActionEvent", "(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/SelectionEvent;", "", ApiSince=28)]
public static Android.Views.TextClassifiers.SelectionEvent CreateSelectionActionEvent(int start, int end, Android.Views.TextClassifiers.SelectionAction actionType, Android.Views.TextClassifiers.TextClassification classification);
[<Android.Runtime.Register("createSelectionActionEvent", "(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/SelectionEvent;", "", ApiSince=28)>]
static member CreateSelectionActionEvent : int * int * Android.Views.TextClassifiers.SelectionAction * Android.Views.TextClassifiers.TextClassification -> Android.Views.TextClassifiers.SelectionEvent

Parameters

start
Int32

int: the start (inclusive) index of the selection

end
Int32

int: the end (exclusive) index of the selection

actionType
SelectionAction

int: the action that was performed on the selection. Value is one of the following: ACTION_OVERTYPE ACTION_COPY ACTION_PASTE ACTION_CUT ACTION_SHARE ACTION_SMART_SHARE ACTION_DRAG ACTION_ABANDON ACTION_OTHER ACTION_SELECT_ALL ACTION_RESET

classification
TextClassification

TextClassification: the TextClassification object returned by the TextClassifier that classified the selected text. This value cannot be null.

Returns

This value cannot be null.

Attributes

Remarks

Creates an event specifying an action taken on a selection. Use when the user clicks on an action to act on the selected text and the selection's entity type is known.

Throws: IllegalArgumentException if end is less than start

Throws: IllegalArgumentException If actionType is not a valid SelectionEvent actionType

Android reference for android.view.textclassifier.SelectionEvent.createSelectionActionEvent.

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

CreateSelectionActionEvent(Int32, Int32, SelectionAction)

Creates an event specifying an action taken on a selection.

[Android.Runtime.Register("createSelectionActionEvent", "(III)Landroid/view/textclassifier/SelectionEvent;", "", ApiSince=28)]
public static Android.Views.TextClassifiers.SelectionEvent CreateSelectionActionEvent(int start, int end, Android.Views.TextClassifiers.SelectionAction actionType);
[<Android.Runtime.Register("createSelectionActionEvent", "(III)Landroid/view/textclassifier/SelectionEvent;", "", ApiSince=28)>]
static member CreateSelectionActionEvent : int * int * Android.Views.TextClassifiers.SelectionAction -> Android.Views.TextClassifiers.SelectionEvent

Parameters

start
Int32

int: the start (inclusive) index of the selection

end
Int32

int: the end (exclusive) index of the selection

actionType
SelectionAction

int: the action that was performed on the selection. Value is one of the following: ACTION_OVERTYPE ACTION_COPY ACTION_PASTE ACTION_CUT ACTION_SHARE ACTION_SMART_SHARE ACTION_DRAG ACTION_ABANDON ACTION_OTHER ACTION_SELECT_ALL ACTION_RESET

Returns

This value cannot be null.

Attributes

Remarks

Creates an event specifying an action taken on a selection. Use when the user clicks on an action to act on the selected text.

Throws: IllegalArgumentException if end is less than start

Android reference for android.view.textclassifier.SelectionEvent.createSelectionActionEvent.

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