OSDN Git Service

Handle DOWN/MOVE/UP gestures with fling.
authorJeff Brown <jeffbrown@google.com>
Sat, 10 Sep 2011 00:15:31 +0000 (17:15 -0700)
committerJeff Brown <jeffbrown@google.com>
Sat, 10 Sep 2011 00:15:31 +0000 (17:15 -0700)
commit78f6e63031da4ff06057be9a9e6c77ea83da4673
treea79f924a49e3d054601215cc05ce6ec3fbccef1d
parent581761d4aa0133fe7354cc9e4a5dd3d9d7258c5f
Handle DOWN/MOVE/UP gestures with fling.
Bug: 5265814

When MOVE events are batched, a ListView may not receive only
one MOVE event followed immediately by an UP in the case of
a quick fling.  Unfortunately, the old code relied on there
being at least one additional MOVE event following the first
in order to really scroll or fling.

This change extracts common code from onTouchEvent to
handle scrolls as soon as they are started if there is additional
remaining motion beyond the initial touch slop (taken care of by
mMotionCorrection).

Change-Id: I8c8f03f580bfba96aa69cf111d245ba7fd3b4c2a
core/java/android/widget/AbsListView.java