ListFocusSnapFlingBehaviorKt

Added in 1.0.0-alpha04

public final class ListFocusSnapFlingBehaviorKt


Summary

Public methods

static final @NonNull SnapLayoutInfoProvider

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

Public methods

SnapLayoutInfoProvider

public static final @NonNull SnapLayoutInfoProvider SnapLayoutInfoProvider(@NonNull ListState state)

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
@NonNull ListState state

The ListState to observe for layout and focus information.

Returns
@NonNull SnapLayoutInfoProvider

A focus-aware SnapLayoutInfoProvider instance.