From 8b9348b12f6bcd938d172defe80b6da18fabbc5b Mon Sep 17 00:00:00 2001 From: teach Date: Wed, 21 Apr 2021 11:38:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consecutivescroller/ConsecutiveScrollerLayout.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java index 84e8066..fb67644 100644 --- a/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java +++ b/consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveScrollerLayout.java @@ -1379,10 +1379,12 @@ private void recycleAdjustVelocityTracker() { * 停止滑动 */ public void stopScroll() { - mScroller.abortAnimation(); - stopNestedScroll(ViewCompat.TYPE_NON_TOUCH); - if (mScrollToIndex == -1) { - setScrollState(SCROLL_STATE_IDLE); + if (!mScroller.isFinished()) { + mScroller.abortAnimation(); + stopNestedScroll(ViewCompat.TYPE_NON_TOUCH); + if (mScrollToIndex == -1) { + setScrollState(SCROLL_STATE_IDLE); + } } }