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

Role

value public final class Role


The type of user interface element. Accessibility services might use this to describe the element or do customizations. Most roles can be automatically resolved by the semantics properties of this element. But some elements with subtle differences need an exact role. If an exact role is not listed, SemanticsPropertyReceiver.role should not be set and the framework will automatically resolve it.

Summary

Nested types

public static class Role.Companion

Public methods

@NonNull String

Public methods

toString

public @NonNull String toString()