Fixed
Status Update
Comments
jo...@google.com <jo...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 452d89091e65de10088498a57e2e1ff26127b00e
Author: Levi Albuquerque <levima@google.com>
Date: Tue Apr 11 14:40:08 2023
Allow customization of shortSnapVelocityThreshold in Pager.
shortSnapVelocityThreshold was the only parameter in SnapFlingBehavior that wasn't customizable in Pager. We can enable its customization so developers can change it without the need to instantiate their own SnapFlingBehavior (which is currently not possible because the PagerLayoutInfoProvider is private).
Relnote: Introduce shortSnapVelocityThreshold in Pager's SnapFlingBehavior.
Test: Previous tests should pass.
Fixes: 275579012
Change-Id: I7379e457b8b7321aba6605a81cccd2245122a80e
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt
https://android-review.googlesource.com/2531123
Branch: androidx-main
commit 452d89091e65de10088498a57e2e1ff26127b00e
Author: Levi Albuquerque <levima@google.com>
Date: Tue Apr 11 14:40:08 2023
Allow customization of shortSnapVelocityThreshold in Pager.
shortSnapVelocityThreshold was the only parameter in SnapFlingBehavior that wasn't customizable in Pager. We can enable its customization so developers can change it without the need to instantiate their own SnapFlingBehavior (which is currently not possible because the PagerLayoutInfoProvider is private).
Relnote: Introduce shortSnapVelocityThreshold in Pager's SnapFlingBehavior.
Test: Previous tests should pass.
Fixes: 275579012
Change-Id: I7379e457b8b7321aba6605a81cccd2245122a80e
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/pager/BasePagerTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/pager/PagerScrollingTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.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
Jetpack Compose version: 1.4.0
Jetpack Compose component(s) used: Pager
It is now a lot harder to customize the required fling to snap to a page, because shortSnapVelocityThreshold parameter is not exposed to the fling creation function and everything is private inside the Pager file.
Before I could simply do something like this:
but now this is also not possible because SnapFlingBehavior is a concrete class instead of an interface and I'd need to provide all the constructor params and I cannot take advantage of the SnapLayoutInfoProvider class since it's also private.