Function

SnapLayoutInfoProvider

List snapping aligns the focus line with the center of the closest item.

SnapLayoutInfoProvider

Source set: Android
public fun SnapLayoutInfoProvider(state: ListState): SnapLayoutInfoProvider

List snapping aligns the focus line with the center of the closest item. Combined with adaptive scrolling, this ensures that users have to move the same distance when swipes between items of the similar size, resulting in predictable movement.

Parameters

state The ListState to observe for layout and focus information.

Returns

A focus-aware SnapLayoutInfoProvider instance.

Last updated: