From f3c7d4294dee6a271e417d81bdd74c87e57ce5b3 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Fri, 4 Dec 2009 15:38:22 -0800 Subject: [PATCH] Report SCROLL_STATE_IDLE after the user finishes a scroll (not a fling.) When the user lifts her finger up, AbsListView computes the fling velocity and report a SCROLL_STATE_FLING if the velocity is high enough. However, when the fling is not initiated because the velocity is too low (case of a normal scroll), the idle state was not set nor reported. --- core/java/android/widget/AbsListView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index e353501a21efb..92ff31553297b 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2109,6 +2109,9 @@ public abstract class AbsListView extends AdapterView implements Te } reportScrollStateChange(OnScrollListener.SCROLL_STATE_FLING); mFlingRunnable.start(-initialVelocity); + } else { + mTouchMode = TOUCH_MODE_REST; + reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE); } } } else {