AccessibilityNodeInfoCompat.AccessibilityActionCompat

Added in 1.1.0

public class AccessibilityNodeInfoCompat.AccessibilityActionCompat


A class defining an action that can be performed on an AccessibilityNodeInfo. Each action has a unique id and a label.

There are three categories of actions:

  • Standard actions - These are actions that are reported and handled by the standard UI widgets in the platform. Each standard action is associated with a resource id, e.g. accessibilityActionScrollUp. Note that actions were formerly associated with static constants defined in this class, e.g. ACTION_FOCUS. These actions will have null labels.
  • Custom actions action - These are actions that are reported and handled by custom widgets. i.e. ones that are not part of the UI toolkit. For example, an application may define a custom action for clearing the user history.
  • Overriden standard actions - These are actions that override standard actions to customize them. For example, an app may add a label to the standard ACTION_CLICK action to indicate to the user that this action clears browsing history.

Note: Views which support these actions should invoke setImportantForAccessibility with IMPORTANT_FOR_ACCESSIBILITY_YES to ensure an android.accessibilityservice.AccessibilityService can discover the set of supported actions.

Summary

Constants

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that gives accessibility focus to the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that clears accessibility focus of the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that clears input focus of the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that deselects the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that clicks on the node info.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to collapse an expandable node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that context clicks the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to copy the current selection to the clipboard.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to cut the current selection and place it to the clipboard.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to dismiss a dismissable node.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to cancel a drag.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to trigger a drop of the content being dragged.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to start a drag.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to expand an expandable node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that gives input focus to the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to hide a tooltip.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to send an ime actionId which is from actionId.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that long clicks on the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move a window to a new location.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that requests to go to the next entity in this node's text at a given movement granularity.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the next HTML element of a given type.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the page below.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the page left.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the page right.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the page above.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to paste the current clipboard content.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that presses and holds a node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that requests to go to the previous entity in this node's text at a given movement granularity.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to move to the previous HTML element of a given type.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content backward.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content down.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content forward.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that brings fully on screen the next node in the specified direction.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content left.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content right.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that scrolls the node to make the specified collection position visible on screen.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to scroll the node content up.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that selects the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that sets progress between RangeInfo.getMin() and RangeInfo.getMax().

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to set the selection.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that sets the text of the node.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action that requests the node make its bounding rectangle visible on the screen, scrolling if necessary just enough.

static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to show suggestions for editable text.

static final AccessibilityNodeInfoCompat.AccessibilityActionCompat

Action to show a tooltip.

Public constructors

AccessibilityActionCompat(int actionId, CharSequence label)

Creates a new instance.

Public methods

boolean
int

Gets the id for this action.

CharSequence

Gets the label for this action.

int
@NonNull String

Constants

ACTION_ACCESSIBILITY_FOCUS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_ACCESSIBILITY_FOCUS

Action that gives accessibility focus to the node.

The UI element that implements this should send a TYPE_VIEW_ACCESSIBILITY_FOCUSED event if successful. The node that is focused should return true for isAccessibilityFocused.

This is intended to be used by screen readers to assist with user navigation. Apps changing focus can confuse screen readers, so the resulting behavior can vary by device and screen reader version.

This is distinct from ACTION_FOCUS, which refers to system focus. System focus is typically used to convey targets for keyboard navigation.

ACTION_CLEAR_ACCESSIBILITY_FOCUS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CLEAR_ACCESSIBILITY_FOCUS

Action that clears accessibility focus of the node.

The UI element that implements this should send a TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED event if successful. The node that is cleared should return false for isAccessibilityFocused.

ACTION_CLEAR_FOCUS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CLEAR_FOCUS

Action that clears input focus of the node.

The node that is cleared should return false for isFocused.

ACTION_CLEAR_SELECTION

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CLEAR_SELECTION

Action that deselects the node.

ACTION_CLICK

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CLICK

Action that clicks on the node info.

The UI element that implements this should send a TYPE_VIEW_CLICKED event. In the View system, the default handling of this action when performed by a service is to call performClick, and setting a setOnClickListener automatically adds this action.

isClickable should return true if this action is available.

ACTION_COLLAPSE

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_COLLAPSE

Action to collapse an expandable node.

ACTION_CONTEXT_CLICK

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CONTEXT_CLICK

Action that context clicks the node.

The UI element that implements this should send a TYPE_VIEW_CONTEXT_CLICKED event. In the View system, the default handling of this action when performed by a service is to call performContextClick, and setting a setOnContextClickListener automatically adds this action.

A context click usually occurs from a mouse pointer right-click or a stylus button press.

isContextClickable should return true if this action is available.

ACTION_COPY

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_COPY

Action to copy the current selection to the clipboard.

ACTION_CUT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_CUT

Action to cut the current selection and place it to the clipboard.

ACTION_DISMISS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_DISMISS

Action to dismiss a dismissable node.

ACTION_DRAG_CANCEL

Added in 1.9.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_DRAG_CANCEL

Action to cancel a drag.

This action is added to the source that started a drag with ACTION_DRAG_START.

ACTION_DRAG_DROP

Added in 1.9.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_DRAG_DROP

Action to trigger a drop of the content being dragged.

This action is added to potential drop targets if the source started a drag with ACTION_DRAG_START. In View, these targets are Views that accepted ACTION_DRAG_STARTED and have an View.OnDragListener.

ACTION_DRAG_START

Added in 1.9.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_DRAG_START

Action to start a drag.

This action initiates a drag &drop within the system. The source's dragged content is prepared before the drag begins. In View, this action should prepare the arguments to startDragAndDrop} and then call the method. The equivalent should be performed for other UI toolkits.

ACTION_EXPAND

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_EXPAND

Action to expand an expandable node.

ACTION_FOCUS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_FOCUS

Action that gives input focus to the node.

The focus request sends an event of TYPE_VIEW_FOCUSED if successful. In the View system, this is handled by requestFocus.

The node that is focused should return true for isFocused.

See also
ACTION_ACCESSIBILITY_FOCUS

for the difference between system focus and accessibility focus.

ACTION_HIDE_TOOLTIP

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_HIDE_TOOLTIP

Action to hide a tooltip. A node should expose this action only for views that are currently showing a tooltip.

ACTION_IME_ENTER

Added in 1.5.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_IME_ENTER

Action to send an ime actionId which is from actionId. This ime actionId sets by setImeActionLabel, or it would be IME_ACTION_UNSPECIFIED if no specific actionId has set. A node should expose this action only for views that are currently with input focus and editable.

ACTION_LONG_CLICK

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_LONG_CLICK

Action that long clicks on the node.

The UI element that implements this should send a TYPE_VIEW_LONG_CLICKED event. In the View system, the default handling of this action when performed by a service is to call performLongClick, and setting a setOnLongClickListener automatically adds this action.

isLongClickable should return true if this action is available.

ACTION_MOVE_WINDOW

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_MOVE_WINDOW

Action to move a window to a new location.

Arguments:ACTION_ARGUMENT_MOVE_WINDOW_XACTION_ARGUMENT_MOVE_WINDOW_Y

ACTION_NEXT_AT_MOVEMENT_GRANULARITY

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_NEXT_AT_MOVEMENT_GRANULARITY

Action that requests to go to the next entity in this node's text at a given movement granularity. For example, move to the next character, word, etc.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT, AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEANExample: Move to the previous character and do not extend selection.

          

  Bundle arguments = new Bundle();
  arguments.putInt(AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT,
          AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER);
  arguments.putBoolean(
          AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN, false);
  info.performAction(
          AccessibilityActionCompat.ACTION_NEXT_AT_MOVEMENT_GRANULARITY.getId(),
          arguments);

See also
ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT

ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN

setMovementGranularities

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN

getMovementGranularities

AccessibilityNodeInfoCompat.getMovementGranularities()

MOVEMENT_GRANULARITY_CHARACTER

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER

MOVEMENT_GRANULARITY_WORD

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_WORD

MOVEMENT_GRANULARITY_LINE

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_LINE

MOVEMENT_GRANULARITY_PARAGRAPH

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_PARAGRAPH

MOVEMENT_GRANULARITY_PAGE

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_PAGE

ACTION_NEXT_HTML_ELEMENT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_NEXT_HTML_ELEMENT

Action to move to the next HTML element of a given type. For example, move to the BUTTON, INPUT, TABLE, etc.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_HTML_ELEMENT_STRINGExample:

          

  Bundle arguments = new Bundle();
  arguments.putString(
          AccessibilityNodeInfoCompat.ACTION_ARGUMENT_HTML_ELEMENT_STRING, "BUTTON");
  info.performAction(
          AccessibilityActionCompat.ACTION_NEXT_HTML_ELEMENT.getId(), arguments);

ACTION_PAGE_DOWN

Added in 1.2.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PAGE_DOWN

Action to move to the page below.

ACTION_PAGE_LEFT

Added in 1.2.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PAGE_LEFT

Action to move to the page left.

ACTION_PAGE_RIGHT

Added in 1.2.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PAGE_RIGHT

Action to move to the page right.

ACTION_PAGE_UP

Added in 1.2.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PAGE_UP

Action to move to the page above.

ACTION_PASTE

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PASTE

Action to paste the current clipboard content.

ACTION_PRESS_AND_HOLD

Added in 1.5.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PRESS_AND_HOLD

Action that presses and holds a node.

This action is for nodes that have distinct behavior that depends on how long a press is held. Nodes having a single action for long press should use ACTION_LONG_CLICK instead of this action, and nodes should not expose both actions.

When calling performAction(ACTION_PRESS_AND_HOLD, bundle, use ACTION_ARGUMENT_PRESS_AND_HOLD_DURATION_MILLIS_INT to specify how long the node is pressed. The first time an accessibility service performs ACTION_PRES_AND_HOLD on a node, it must specify 0 as ACTION_ARGUMENT_PRESS_AND_HOLD, so the application is notified that the held state has started. To ensure reasonable behavior, the values must be increased incrementally and may not exceed 10,000. UIs requested to hold for times outside of this range should ignore the action.

The total time the element is held could be specified by an accessibility user up-front, or may depend on what happens on the UI as the user continues to request the hold.

Note: The time between dispatching the action and it arriving in the UI process is not guaranteed. It is possible on a busy system for the time to expire unexpectedly. For the case of holding down a key for a repeating action, a delayed arrival should be benign. Please do not use this sort of action in cases where such delays will lead to unexpected UI behavior.

ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY

Action that requests to go to the previous entity in this node's text at a given movement granularity. For example, move to the next character, word, etc.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT, AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEANExample: Move to the next character and do not extend selection.

          

  Bundle arguments = new Bundle();
  arguments.putInt(AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT,
          AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER);
  arguments.putBoolean(
          AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN, false);
  info.performAction(
          AccessibilityActionCompat.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY.getId(),
          arguments);

See also
ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT

ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN

setMovementGranularities

AccessibilityNodeInfoCompat.setMovementGranularities(int)

getMovementGranularities

AccessibilityNodeInfoCompat.getMovementGranularities()

MOVEMENT_GRANULARITY_CHARACTER

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER

MOVEMENT_GRANULARITY_WORD

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_WORD

MOVEMENT_GRANULARITY_LINE

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_LINE

MOVEMENT_GRANULARITY_PARAGRAPH

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_PARAGRAPH

MOVEMENT_GRANULARITY_PAGE

AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_PAGE

ACTION_PREVIOUS_HTML_ELEMENT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_PREVIOUS_HTML_ELEMENT

Action to move to the previous HTML element of a given type. For example, move to the BUTTON, INPUT, TABLE, etc.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_HTML_ELEMENT_STRINGExample:

          

  Bundle arguments = new Bundle();
  arguments.putString(
          AccessibilityNodeInfoCompat.ACTION_ARGUMENT_HTML_ELEMENT_STRING, "BUTTON");
  info.performAction(
          AccessibilityActionCompat.ACTION_PREVIOUS_HTML_ELEMENT.getId(), arguments);

ACTION_SCROLL_BACKWARD

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_BACKWARD

Action to scroll the node content backward.

ACTION_SCROLL_DOWN

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_DOWN

Action to scroll the node content down.

ACTION_SCROLL_FORWARD

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_FORWARD

Action to scroll the node content forward.

ACTION_SCROLL_IN_DIRECTION

Added in 1.12.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_IN_DIRECTION

Action that brings fully on screen the next node in the specified direction.

This should include wrapping around to the next/previous row, column, etc. in a collection if one is available. If there is no node in that direction, the action should fail and return false.

This action should be used instead of ACTION_SCROLL_TO_POSITION when a widget does not have clear row and column semantics or if a directional search is needed to find a node in a complex ViewGroup where individual nodes may span multiple rows or columns. The implementing widget must send a TYPE_VIEW_TARGETED_BY_SCROLL accessibility event with the scroll target as the source. An accessibility service can listen for this event, inspect its source, and use the result when determining where to place accessibility focus.

Arguments:ACTION_ARGUMENT_DIRECTION_INT. This is a required argument.

ACTION_SCROLL_LEFT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_LEFT

Action to scroll the node content left.

ACTION_SCROLL_RIGHT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_RIGHT

Action to scroll the node content right.

ACTION_SCROLL_TO_POSITION

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_TO_POSITION

Action that scrolls the node to make the specified collection position visible on screen.

Arguments:

ACTION_SCROLL_UP

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SCROLL_UP

Action to scroll the node content up.

ACTION_SELECT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SELECT

Action that selects the node.

ACTION_SET_PROGRESS

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SET_PROGRESS

Action that sets progress between RangeInfo.getMin() and RangeInfo.getMax(). It should use the same value type as RangeInfo.getType()

Arguments:ACTION_ARGUMENT_PROGRESS_VALUE

ACTION_SET_SELECTION

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SET_SELECTION

Action to set the selection. Performing this action with no arguments clears the selection.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_START_INT, AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_END_INTExample:

          

  Bundle arguments = new Bundle();
  arguments.putInt(AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_START_INT, 1);
  arguments.putInt(AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_END_INT, 2);
  info.performAction(AccessibilityActionCompat.ACTION_SET_SELECTION.getId(), arguments);

If this is a text selection, the UI element that implements this should send a TYPE_VIEW_TEXT_SELECTION_CHANGED event if its selection is updated. This element should also return true for isTextSelectable.

See also
ACTION_ARGUMENT_SELECTION_START_INT

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_START_INT

ACTION_ARGUMENT_SELECTION_END_INT

AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SELECTION_END_INT

ACTION_SET_TEXT

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SET_TEXT

Action that sets the text of the node. Performing the action without argument, using null or empty CharSequence will clear the text. This action will also put the cursor at the end of text.

Arguments:AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCEExample:

          

  Bundle arguments = new Bundle();
  arguments.putCharSequence(AccessibilityNodeInfoCompat.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE,
      "android");
 info.performAction(AccessibilityActionCompat.ACTION_SET_TEXT.getId(), arguments);

The UI element that implements this should send a TYPE_VIEW_TEXT_CHANGED event if its text is updated. This element should also return true for isEditable.

ACTION_SHOW_ON_SCREEN

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SHOW_ON_SCREEN

Action that requests the node make its bounding rectangle visible on the screen, scrolling if necessary just enough.

ACTION_SHOW_TEXT_SUGGESTIONS

Added in 1.9.0
public static final @NonNull AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SHOW_TEXT_SUGGESTIONS

Action to show suggestions for editable text.

ACTION_SHOW_TOOLTIP

Added in 1.1.0
public static final AccessibilityNodeInfoCompat.AccessibilityActionCompat ACTION_SHOW_TOOLTIP

Action to show a tooltip.

Public constructors

AccessibilityActionCompat

Added in 1.1.0
public AccessibilityActionCompat(int actionId, CharSequence label)

Creates a new instance.

Parameters
int actionId

The action id.

CharSequence label

The action label.

Public methods

equals

public boolean equals(@Nullable Object obj)

getId

Added in 1.1.0
public int getId()

Gets the id for this action.

Returns
int

The action id.

getLabel

Added in 1.1.0
public CharSequence getLabel()

Gets the label for this action. Its purpose is to describe the action to user.

Returns
CharSequence

The label.

hashCode

public int hashCode()

toString

public @NonNull String toString()