diff options
Diffstat (limited to 'src/com/android/launcher2/AllAppsPagedView.java')
-rw-r--r-- | src/com/android/launcher2/AllAppsPagedView.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java index 3924c5752..c05fe75d5 100644 --- a/src/com/android/launcher2/AllAppsPagedView.java +++ b/src/com/android/launcher2/AllAppsPagedView.java @@ -66,6 +66,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All private boolean mAllowHardwareLayerCreation; private int mPageContentWidth; + private boolean mHasMadeSuccessfulDrop; public AllAppsPagedView(Context context) { this(context, null); @@ -138,6 +139,10 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All } } + void resetSuccessfulDropFlag() { + mHasMadeSuccessfulDrop = false; + } + @Override public void zoom(float zoom, boolean animate) { mZoom = zoom; @@ -322,6 +327,12 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All tearDownDragMode(); mLauncher.getWorkspace().onDragStopped(success); mLauncher.unlockScreenOrientation(); + + if (!success && !mHasMadeSuccessfulDrop) { + mLauncher.getWorkspace().shrink(Workspace.ShrinkState.BOTTOM_HIDDEN); + } else { + mHasMadeSuccessfulDrop |= success; + } } int getPageContentWidth() { |