Fixed
Status Update
Comments
an...@google.com <an...@google.com>
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 5ac0224437df94121dcff9c9a4a8e82e0d6b0627
Author: Jossi Wolf <jossiwolf@google.com>
Date: Fri May 10 16:26:03 2024
[Pager] Don't snap when already at bounds
Test: pagerAtBounds_flingTowardsBound_doesNotMove
Relnote: Fixed a bug where Pager would snap when flinging towards a bound while already settled at the bound.
Fixes: 322062020
Fixes: 339171222
Change-Id: I9f3730a6c168c19e077fd4d29325f444f54c1070
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/SingleParamBasePagerTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/PagerSnapLayoutInfoProvider.kt
https://android-review.googlesource.com/3079856
Branch: androidx-main
commit 5ac0224437df94121dcff9c9a4a8e82e0d6b0627
Author: Jossi Wolf <jossiwolf@google.com>
Date: Fri May 10 16:26:03 2024
[Pager] Don't snap when already at bounds
Test: pagerAtBounds_flingTowardsBound_doesNotMove
Relnote: Fixed a bug where Pager would snap when flinging towards a bound while already settled at the bound.
Fixes: 322062020
Fixes: 339171222
Change-Id: I9f3730a6c168c19e077fd4d29325f444f54c1070
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/PagerSnapPositionTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/pager/SingleParamBasePagerTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/snapping/PagerSnapLayoutInfoProvider.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.7.0-beta02
androidx.compose.foundation:foundation-android:1.7.0-beta02
androidx.compose.foundation:foundation-desktop:1.7.0-beta02
Description
Jetpack Compose version: 1.6.7, 1.7.0-alpha08
Jetpack Compose component(s) used: HorizontalPager, VerticalPager
Android Studio Build: AI-233.14808.21.2331.11709847
Kotlin version: 1.9.23
When trying to scroll past the last page in a Pager (both Horizontal and Vertical), Pager performs the overscroll and then snaps to a place somewhere between the last and second last page. The place is not the same every time and seems to depend on fling speed.
PageSize.Fixed
, cannot reproduce with the defaultPageSize.Fill
Expected behavior: after overscroll, pager snaps to the last page
Code used to reproduce the issue: