From e20a193754edec182fc0ea13f84a2a1e50add99f Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Fri, 25 Feb 2011 14:54:11 -0800 Subject: [PATCH] OnScrollListener fix in AbsListView Starting from a list at position 0 (first element displayed at the top), touch and scroll down. The list cannot go further down and the glow is displayed. A connecter scrollListener will receive a FLING but will not receive the IDLE after. The reason is that the springback motion that should be started at that point is not started because the overscroll distance is set to 0. The fix is to report an IDLE state in that case. Change-Id: I383babaf8412ee74d598efcf61e91cff44068c79 --- core/java/android/widget/AbsListView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index eb53e56b4b0d4..f09607739e26c 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -3508,6 +3508,7 @@ public abstract class AbsListView extends AdapterView implements Te post(this); } else { mTouchMode = TOUCH_MODE_REST; + reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE); } }