diff options
| author | 2010-10-07 14:03:45 -0700 | |
|---|---|---|
| committer | 2010-10-07 14:14:10 -0700 | |
| commit | ca6eb210e6eb0afe84bdf0558085f555a9a32655 (patch) | |
| tree | e977822fb358324fde93b2a113b1d66312d2d866 | |
| parent | 4a962a06db88d7132448808aaae82b94728b69a6 (diff) | |
DO NOT MERGE Only show edge glow effect on 1 side at a time.
Pulling on a side should force the opposite side into "decay".
Fixes b/3061753 new list "bounce" shouldn't show on both ends
Change-Id: I4742e8c212f8e13da29ed887ebdd712903b533f7
| -rw-r--r-- | core/java/android/widget/AbsListView.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index ee57c6e54c71..6260cdbdf5ed 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -2247,8 +2247,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mTouchMode = TOUCH_MODE_OVERSCROLL; if (rawDeltaY > 0) { mEdgeGlowTop.onPull((float) overscroll / getHeight()); + if (!mEdgeGlowBottom.isFinished()) { + mEdgeGlowBottom.onRelease(); + } } else if (rawDeltaY < 0) { mEdgeGlowBottom.onPull((float) overscroll / getHeight()); + if (!mEdgeGlowTop.isFinished()) { + mEdgeGlowTop.onRelease(); + } } } } @@ -2307,8 +2313,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te !contentFits())) { if (rawDeltaY > 0) { mEdgeGlowTop.onPull((float) -incrementalDeltaY / getHeight()); + if (!mEdgeGlowBottom.isFinished()) { + mEdgeGlowBottom.onRelease(); + } } else if (rawDeltaY < 0) { mEdgeGlowBottom.onPull((float) -incrementalDeltaY / getHeight()); + if (!mEdgeGlowTop.isFinished()) { + mEdgeGlowTop.onRelease(); + } } invalidate(); } |