Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 872367a6235335430fb3c95b24279c07fb5288fa
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Wed Aug 03 16:20:07 2022
Removes pointer position from Overscroll APIs
Pointer position is not fundamentally part of overscroll - it's an implementation detail for certain overscroll effects that shouldn't be part of the common API surface. This makes it easier to programatically control overscroll and makes it more aligned with other APIs like NestedScrollConnection.
Test: Existing tests and OverscrollBenchmark
Fixes: b/241239306
Relnote: Removed pointerPosition from OverscrollEffect - effects that care about pointer position can use Modifier.pointerInput { } in the effectModifier to get the current pointer position instead.
Change-Id: I9f606c640cc23d7483b32ed98b7caf790c9d2e36
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/DesktopOverscroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/DraggableTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/AndroidOverscroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
https://android-review.googlesource.com/2166822
Branch: androidx-main
commit 872367a6235335430fb3c95b24279c07fb5288fa
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Wed Aug 03 16:20:07 2022
Removes pointer position from Overscroll APIs
Pointer position is not fundamentally part of overscroll - it's an implementation detail for certain overscroll effects that shouldn't be part of the common API surface. This makes it easier to programatically control overscroll and makes it more aligned with other APIs like NestedScrollConnection.
Test: Existing tests and OverscrollBenchmark
Fixes:
Relnote: Removed pointerPosition from OverscrollEffect - effects that care about pointer position can use Modifier.pointerInput { } in the effectModifier to get the current pointer position instead.
Change-Id: I9f606c640cc23d7483b32ed98b7caf790c9d2e36
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/DesktopOverscroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/DraggableTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/AndroidOverscroll.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
Description
Pointer position is more implementation-specific than generally part of overscroll - the API definition for overscroll should be more like nested scrolling: responsible for consuming scroll / fling deltas. Overscroll implementations that care about pointer position can track this separately.