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

AccessibilityManager

public interface AccessibilityManager


Interface for managing accessibility.

Summary

Public methods

abstract long
calculateRecommendedTimeoutMillis(
    long originalTimeoutMillis,
    boolean containsIcons,
    boolean containsText,
    boolean containsControls
)

Calculate the recommended timeout for changes to the UI needed by this user.

Public methods

calculateRecommendedTimeoutMillis

abstract long calculateRecommendedTimeoutMillis(
    long originalTimeoutMillis,
    boolean containsIcons,
    boolean containsText,
    boolean containsControls
)

Calculate the recommended timeout for changes to the UI needed by this user. Controls should remain on the screen for at least this long to give users time to react. Some users may need extra time to review the controls, or to reach them, or to activate assistive technology to activate the controls automatically.

Use the boolean parameters to indicate contents of UI. For example, set [containsIcons] and [containsText] to true for message notification which contains icons and text, or set [containsText] and [containsControls] to true for button dialog which contains text and button controls.

Parameters
long originalTimeoutMillis

The timeout appropriate for users with no accessibility needs in milliseconds.

boolean containsIcons

The contents of UI contain icons.

boolean containsText

The contents of UI contain text.

boolean containsControls

The contents of UI contain controls.

Returns
long

The recommended UI timeout for the current user in milliseconds.