Interface

RotarySnapLayoutInfoProvider

A provider which connects scrollableState to a rotary input for snapping scroll actions.

Source set: Android
public interface RotarySnapLayoutInfoProvider

A provider which connects scrollableState to a rotary input for snapping scroll actions.

This interface defines the essential properties and methods required for a scrollable to be controlled by rotary input and perform a snap action.

Properties

averageItemSize

Source set: Android
public val averageItemSize: Float

The average size in pixels of an item within the scrollable. This is used to estimate scrolling distances for snapping when responding to rotary input.

currentItemIndex

Source set: Android
public val currentItemIndex: Int

The index of the item that is closest to the center.

currentItemOffset

Source set: Android
public val currentItemOffset: Float

The offset in pixels of the currently centered item from its centered position. This value can be positive or negative.

totalItemCount

Source set: Android
public val totalItemCount: Int

The total number of items within the scrollable

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: