AccessibilityNodeInfo.AccessibilityAction

public static final class AccessibilityNodeInfo.AccessibilityAction
extends Object implements Parcelable

java.lang.Object
   ↳ android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction


A class defining an action that can be performed on an AccessibilityNodeInfo. Each action has a unique id that is mandatory and optional data.

There are three categories of actions:

  • Standard actions - These are actions that are reported and handled by the standard UI widgets in the platform. For each standard action there is a static constant 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.
  • Overridden 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.

Actions are typically added to an AccessibilityNodeInfo by using AccessibilityNodeInfo#addAction(AccessibilityAction) within View#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo) and are performed within View#performAccessibilityAction(int, Bundle).