Merge "Fix for ScrollView absorbing fling stretch" into udc-dev am: 10a96d83b2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23920040

Change-Id: I1f479ca023a9b0b4ea41d7c63f6a16e1ce964de6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
George Mount
2023-07-12 17:20:43 +00:00
committed by Automerger Merge Worker

View File

@@ -1550,6 +1550,7 @@ public class ScrollView extends FrameLayout {
float deltaDistance = -unconsumed * FLING_DESTRETCH_FACTOR / size;
int consumed = Math.round(-size / FLING_DESTRETCH_FACTOR
* mEdgeGlowTop.onPullDistance(deltaDistance, 0.5f));
mEdgeGlowTop.onRelease();
if (consumed != unconsumed) {
mEdgeGlowTop.finish();
}
@@ -1560,6 +1561,7 @@ public class ScrollView extends FrameLayout {
float deltaDistance = unconsumed * FLING_DESTRETCH_FACTOR / size;
int consumed = Math.round(size / FLING_DESTRETCH_FACTOR
* mEdgeGlowBottom.onPullDistance(deltaDistance, 0.5f));
mEdgeGlowBottom.onRelease();
if (consumed != unconsumed) {
mEdgeGlowBottom.finish();
}