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: Ia3c9f52a20e2139d3c8a0101c80cf6be2a1c38dd
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:40 +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();
}