diff options
author | Tony Wickham <twickham@google.com> | 2016-10-05 09:05:42 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2016-11-02 15:07:57 -0700 |
commit | ea62fe0be19c54f8fbb434c6334418b96626f70d (patch) | |
tree | f9d9c9794f37f8f60e9eb8c1f6ee79e4bb53a005 /src/com/android/launcher3/folder | |
parent | df3bc52ca9c4271398d35b17cf550ca9099b8249 (diff) | |
download | android_packages_apps_Trebuchet-ea62fe0be19c54f8fbb434c6334418b96626f70d.tar.gz android_packages_apps_Trebuchet-ea62fe0be19c54f8fbb434c6334418b96626f70d.tar.bz2 android_packages_apps_Trebuchet-ea62fe0be19c54f8fbb434c6334418b96626f70d.zip |
Animate icons back to where they were picked up.
We do this for pre-dragged icons instead of calling onDrop().
- Removes need for special logic in onDrop() to check if mIsInPreDrag
- Dropping from pre-drag in all apps also animates instead of jumping
We also do this when dropping an icon while still transitioning
to spring-loaded mode, to avoid having a janky jump at the end
- Bug: 27135377
Change-Id: I4548c3e2fef3423d1ba36057fb53807b1b4ad0fc
Diffstat (limited to 'src/com/android/launcher3/folder')
-rw-r--r-- | src/com/android/launcher3/folder/Folder.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 2952196fa..53c12b5b1 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -1331,10 +1331,7 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC mIsExternalDrag = false; } else { currentDragView = mCurrentDragView; - // The view was never removed from this folder if we are still in the pre-drag. - if (!mDragController.isInPreDrag()) { - mContent.addViewForRank(currentDragView, si, mEmptyCellRank); - } + mContent.addViewForRank(currentDragView, si, mEmptyCellRank); } if (d.dragView.hasDrawn()) { @@ -1355,12 +1352,9 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC mItemsInvalidated = true; rearrangeChildren(); - // The ShortcutInfo was never removed if we are still in the pre-drag. - if (!mDragController.isInPreDrag()) { - // Temporarily suppress the listener, as we did all the work already here. - try (SuppressInfoChanges s = new SuppressInfoChanges()) { - mInfo.add(si, false); - } + // Temporarily suppress the listener, as we did all the work already here. + try (SuppressInfoChanges s = new SuppressInfoChanges()) { + mInfo.add(si, false); } // Clear the drag info, as it is no longer being dragged. |