diff options
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 18832c680..4a85b448f 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -567,6 +567,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc public void scrollTo(int x, int y) { // In free scroll mode, we clamp the scrollX if (mFreeScroll) { + // If the scroller is trying to move to a location beyond the maximum allowed + // in the free scroll mode, we make sure to end the scroll operation. + if (!mScroller.isFinished() && + (x > mFreeScrollMaxScrollX || x < mFreeScrollMinScrollX)) { + forceFinishScroller(); + } + x = Math.min(x, mFreeScrollMaxScrollX); x = Math.max(x, mFreeScrollMinScrollX); } |