From 4eac9129bcc6c6945f01277a79791455ae2303e2 Mon Sep 17 00:00:00 2001 From: teach Date: Thu, 20 May 2021 16:46:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consecutivescroller/ConsecutiveScrollerLayout.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java index 5f98bf5..f0b06de 100644 --- a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java +++ b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java @@ -720,14 +720,15 @@ public boolean onTouchEvent(MotionEvent ev) { mScrollConsumed[1] = 0; int y = (int) ev.getY(pointerIndex); int deltaY = mTouchY - y; + mTouchY = y; if (dispatchNestedPreScroll(0, deltaY, mScrollConsumed, mScrollOffset, ViewCompat.TYPE_TOUCH)) { deltaY -= mScrollConsumed[1]; ev.offsetLocation(0, mScrollOffset[1]); mNestedYOffset += mScrollOffset[1]; + mTouchY -= mScrollOffset[1]; getParent().requestDisallowInterceptTouchEvent(true); } - mTouchY = y - mScrollOffset[1]; int oldScrollY = mSecondScrollY; if (mScrollState != SCROLL_STATE_DRAGGING) {