Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
teach committed Apr 21, 2021
1 parent 2649df8 commit a714713
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1380,10 +1380,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);
}
}
}

Expand Down

0 comments on commit a714713

Please sign in to comment.