Fixed
Status Update
Comments
ni...@google.com <ni...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 75fbf93ef7c96da96d96c6c8be58bed70f1bc3b7
Author: Levi Albuquerque <levima@google.com>
Date: Tue Mar 07 16:56:24 2023
Move LazyGridSnapLayoutInfoProvider to be an actual API
Move for LazyGridSnapLayoutInfoProvider to be provided as an actual API instead of a demo solution.
Relnote: Introduce a SnapLayoutInfoProvider that can be used with LazyGridState.
Test: Additional tests to verify new behavior.
Fixes: 269237141
Fixes: 260914964
Change-Id: I92134d4e64e639774e0239814a2705d44467bbcf
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/snapping/LazyGridSnappingDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/snapping/RowSnapLayoutInfoProvider.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyGridSnapFlingBehaviorTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyGridSnapLayoutInfoProviderTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyListSnapFlingBehaviorTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPositionInLayout.kt
https://android-review.googlesource.com/2475165
Branch: androidx-main
commit 75fbf93ef7c96da96d96c6c8be58bed70f1bc3b7
Author: Levi Albuquerque <levima@google.com>
Date: Tue Mar 07 16:56:24 2023
Move LazyGridSnapLayoutInfoProvider to be an actual API
Move for LazyGridSnapLayoutInfoProvider to be provided as an actual API instead of a demo solution.
Relnote: Introduce a SnapLayoutInfoProvider that can be used with LazyGridState.
Test: Additional tests to verify new behavior.
Fixes: 269237141
Fixes: 260914964
Change-Id: I92134d4e64e639774e0239814a2705d44467bbcf
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/snapping/LazyGridSnappingDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/snapping/RowSnapLayoutInfoProvider.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyGridSnapFlingBehaviorTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyGridSnapLayoutInfoProviderTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/gesture/snapping/LazyListSnapFlingBehaviorTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyGridSnapLayoutInfoProvider.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/LazyListSnapLayoutInfoProvider.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/SnapPositionInLayout.kt
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.5.0-alpha04
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