Fixed
Status Update
Comments
ni...@google.com <ni...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Thanks! This looks like a bug, thank you for reporting!
na...@google.com <na...@google.com> #3
I would also recommend setting the value to 10%. When you do that, the behavior is wild.
Dragging up to 10% or between 50% and 90% will cause it to snap back to the start anchor.
Dragging between 10% and 50% or past 90% will cause it to snap to the end anchor.
Dragging up to 10% or between 50% and 90% will cause it to snap back to the start anchor.
Dragging between 10% and 50% or past 90% will cause it to snap to the end anchor.
Description
LazyList has a SnapInfoProvider that we can import and pass into a LazyList to get snapping behavior, but there isn't one for LazyGrid.https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt?q=snapping%20-f:test%20l:kt
demo:https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/snapping/LazyGridSnapLayoutInfoProvider.kt