Google 致力于为黑人社区推动种族平等。查看具体举措

SmoothScrollByBehavior

interface SmoothScrollByBehavior
androidx.leanback.widget.BaseGridView.SmoothScrollByBehavior

Defines behavior of duration and interpolator for smoothScrollBy().

Summary

Public methods
abstract Int

Defines duration in milliseconds of smoothScrollBy().

abstract Interpolator?

Defines interpolator of smoothScrollBy().

Public methods

configSmoothScrollByDuration

abstract fun configSmoothScrollByDuration(
    dx: Int,
    dy: Int
): Int

Defines duration in milliseconds of smoothScrollBy().

Parameters
dx Int: x distance in pixels.
dy Int: y distance in pixels.
Return
Int Duration in milliseconds or UNDEFINED_DURATION for default value.

configSmoothScrollByInterpolator

@Nullable abstract fun configSmoothScrollByInterpolator(
    dx: Int,
    dy: Int
): Interpolator?

Defines interpolator of smoothScrollBy().

Parameters
dx Int: x distance in pixels.
dy Int: y distance in pixels.
Return
Interpolator? Interpolator to be used or null for default interpolator.