{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AccessibilityAction

public final class AccessibilityAction<T extends Function<@NonNull Boolean>>


Standard accessibility action.

Summary

Public constructors

<T extends Function<@NonNull Boolean>> AccessibilityAction(String label, T action)

Public methods

boolean
equals(Object other)
final T

The function to invoke when this action is performed.

final String

The description of this action

int
@NonNull String

Public constructors

AccessibilityAction

public <T extends Function<@NonNull Boolean>> AccessibilityAction(String label, T action)
Parameters
String label

The description of this action

T action

The function to invoke when this action is performed. The function should return a boolean result indicating whether the action is successfully handled. For example, a scroll forward action should return false if the widget is not enabled or has reached the end of the list. If multiple semantics blocks with the same AccessibilityAction are provided, the resulting AccessibilityAction's label/action will be the label/action of the outermost modifier with this key and nonnull label/action, or null if no nonnull label/action is found.

Public methods

equals

public boolean equals(Object other)

getAction

public final T getAction()

The function to invoke when this action is performed. The function should return a boolean result indicating whether the action is successfully handled. For example, a scroll forward action should return false if the widget is not enabled or has reached the end of the list. If multiple semantics blocks with the same AccessibilityAction are provided, the resulting AccessibilityAction's label/action will be the label/action of the outermost modifier with this key and nonnull label/action, or null if no nonnull label/action is found.

getLabel

public final String getLabel()

The description of this action

hashCode

public int hashCode()

toString

public @NonNull String toString()