RotaryScrollableBehavior

Interface

Android
public interface RotaryScrollableBehavior

An interface for handling scroll events. Has implementations for handling scroll with/without fling FlingRotaryScrollableBehavior and for handling snap LowResSnapRotaryScrollableBehavior, HighResSnapRotaryScrollableBehavior (see Modifier.rotaryScrollable for descriptions of low-res and high-res devices). Note: It's not recommended to extend this interface directly. Please use the provided implementations instead.

Functions

public suspend fun CoroutineScope.performScroll(
        timestampMillis: Long,
        delta: Float,
        inputDeviceId: Int,
        orientation: Orientation,
    )

Executes a scrolling operation based on rotary input.

Parameters

timestampMillisThe time in milliseconds at which this even occurred
deltaThe amount to scroll, in pixels
inputDeviceIdThe id for the input device that this event came from
orientationOrientation of the scrolling