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

CustomAccessibilityAction

public final class CustomAccessibilityAction


Custom accessibility action.

Summary

Public constructors

CustomAccessibilityAction(
    @NonNull String label,
    @NonNull Function0<@NonNull Boolean> action
)

Public methods

boolean
equals(Object other)
final @NonNull Function0<@NonNull Boolean>

The function to invoke when this action is performed.

final @NonNull String

The description of this action

int
@NonNull String

Public constructors

CustomAccessibilityAction

public CustomAccessibilityAction(
    @NonNull String label,
    @NonNull Function0<@NonNull Boolean> action
)
Parameters
@NonNull String label

The description of this action

@NonNull Function0<@NonNull Boolean> action

The function to invoke when this action is performed. The function should have no arguments and return a boolean result indicating whether the action is successfully handled.

Public methods

equals

public boolean equals(Object other)

getAction

public final @NonNull Function0<@NonNull BooleangetAction()

The function to invoke when this action is performed. The function should have no arguments and return a boolean result indicating whether the action is successfully handled.

getLabel

public final @NonNull String getLabel()

The description of this action

hashCode

public int hashCode()

toString

public @NonNull String toString()