Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccd3a6a5 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "Fix nested prescrolling bug in ScrollView"

parents c3d8b0f2 e9a0d6a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -628,7 +628,7 @@ public class ScrollView extends FrameLayout {
                final int y = (int) ev.getY(activePointerIndex);
                final int y = (int) ev.getY(activePointerIndex);
                int deltaY = mLastMotionY - y;
                int deltaY = mLastMotionY - y;
                if (dispatchNestedPreScroll(0, deltaY, mScrollConsumed, mScrollOffset)) {
                if (dispatchNestedPreScroll(0, deltaY, mScrollConsumed, mScrollOffset)) {
                    deltaY -= mScrollConsumed[1] + mScrollOffset[1];
                    deltaY -= mScrollConsumed[1];
                    vtev.offsetLocation(0, mScrollOffset[1]);
                    vtev.offsetLocation(0, mScrollOffset[1]);
                }
                }
                if (!mIsBeingDragged && Math.abs(deltaY) > mTouchSlop) {
                if (!mIsBeingDragged && Math.abs(deltaY) > mTouchSlop) {
@@ -645,7 +645,7 @@ public class ScrollView extends FrameLayout {
                }
                }
                if (mIsBeingDragged) {
                if (mIsBeingDragged) {
                    // Scroll to follow the motion event
                    // Scroll to follow the motion event
                    mLastMotionY = y;
                    mLastMotionY = y - mScrollOffset[1];


                    final int oldY = mScrollY;
                    final int oldY = mScrollY;
                    final int range = getScrollRange();
                    final int range = getScrollRange();