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

ViewConfiguration

public interface ViewConfiguration

Known direct subclasses

Contains methods to standard constants used in the UI for timeouts, sizes, and distances.

Summary

Public methods

abstract long

The minimum duration between the first tap's up event and the second tap's down event for an interaction to be considered a double-tap.

abstract long

The duration between the first tap's up event and the second tap's down event for an interaction to be considered a double-tap.

abstract long

The duration before a press turns into a long press.

default @NonNull DpSize

The minimum touch target size.

abstract float

Distance in pixels a touch can wander before we think the user is scrolling.

Public methods

getDoubleTapMinTimeMillis

abstract long getDoubleTapMinTimeMillis()

The minimum duration between the first tap's up event and the second tap's down event for an interaction to be considered a double-tap.

getDoubleTapTimeoutMillis

abstract long getDoubleTapTimeoutMillis()

The duration between the first tap's up event and the second tap's down event for an interaction to be considered a double-tap.

getLongPressTimeoutMillis

abstract long getLongPressTimeoutMillis()

The duration before a press turns into a long press.

getMinimumTouchTargetSize

default @NonNull DpSize getMinimumTouchTargetSize()

The minimum touch target size. If layout has reduced the pointer input bounds below this, the touch target will be expanded evenly around the layout to ensure that it is at least this big.

getTouchSlop

abstract float getTouchSlop()

Distance in pixels a touch can wander before we think the user is scrolling.