diff options
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 59292a0c8..b258dfd7d 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -261,6 +261,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc private int DELETE_SLIDE_IN_SIDE_PAGE_DURATION = 250; private int DRAG_TO_DELETE_FADE_OUT_DURATION = 350; + protected boolean mEnforceRealBounds = false; // Drop to delete private View mDeleteDropTarget; @@ -663,7 +664,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc @Override public void scrollTo(int x, int y) { // In free scroll mode, we clamp the scrollX - if (mFreeScroll) { + if (mFreeScroll || mEnforceRealBounds) { x = Math.min(x, mFreeScrollMaxScrollX); x = Math.max(x, mFreeScrollMinScrollX); } diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 3a464e0ae..bba10a118 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2261,8 +2261,8 @@ public class Workspace extends SmoothPagedView if (oldStateIsOverview) { disableFreeScroll(); - } else if (stateIsOverview) { - enableFreeScroll(); + } else if (stateIsOverview){ + updateFreescrollBounds(); } if (state != State.NORMAL) { @@ -4895,4 +4895,10 @@ public class Workspace extends SmoothPagedView public boolean getHideIconLables() { return mHideIconLabels; } + + @Override + public void scrollTo(int x, int y) { + mEnforceRealBounds = isInOverviewMode(); + super.scrollTo(x, y); + } } |