diff options
author | Winson Chung <winsonc@google.com> | 2012-02-06 16:43:52 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-02-07 16:16:27 -0800 |
commit | 42c29aedf2b518c4317fc534f3c87711b57bc9b5 (patch) | |
tree | 634f6f3152ea96be08a361328f3a54d8dff99dea /src/com/android/launcher2/FolderIcon.java | |
parent | 6af9af057f2e40c54a4ed447c4628eef7dc15683 (diff) | |
download | android_packages_apps_Trebuchet-42c29aedf2b518c4317fc534f3c87711b57bc9b5.tar.gz android_packages_apps_Trebuchet-42c29aedf2b518c4317fc534f3c87711b57bc9b5.tar.bz2 android_packages_apps_Trebuchet-42c29aedf2b518c4317fc534f3c87711b57bc9b5.zip |
Animating the drag view scale up and down when dragging items.
- Also fixing up how we draw the drag view alpha
Change-Id: Ied82aec9d52274b0fe65c989eab818b0264a9eb2
Diffstat (limited to 'src/com/android/launcher2/FolderIcon.java')
-rw-r--r-- | src/com/android/launcher2/FolderIcon.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/launcher2/FolderIcon.java b/src/com/android/launcher2/FolderIcon.java index 2a711f88b..a02351630 100644 --- a/src/com/android/launcher2/FolderIcon.java +++ b/src/com/android/launcher2/FolderIcon.java @@ -295,14 +295,14 @@ public class FolderIcon extends LinearLayout implements FolderListener { } public void performCreateAnimation(final ShortcutInfo destInfo, final View destView, - final ShortcutInfo srcInfo, final View srcView, Rect dstRect, + final ShortcutInfo srcInfo, final DragView srcView, Rect dstRect, float scaleRelativeToDragLayer, Runnable postAnimationRunnable) { Drawable animateDrawable = ((TextView) destView).getCompoundDrawables()[1]; computePreviewDrawingParams(animateDrawable.getIntrinsicWidth(), destView.getMeasuredWidth()); // This will animate the dragView (srcView) into the new folder - onDrop(srcInfo, srcView, dstRect, scaleRelativeToDragLayer, 1, postAnimationRunnable); + onDrop(srcInfo, srcView, dstRect, scaleRelativeToDragLayer, 1, postAnimationRunnable, null); // This will animate the first item from it's position as an icon into its // position as the first item in the preview @@ -320,8 +320,9 @@ public class FolderIcon extends LinearLayout implements FolderListener { mFolderRingAnimator.animateToNaturalState(); } - private void onDrop(final ShortcutInfo item, View animateView, Rect finalRect, - float scaleRelativeToDragLayer, int index, Runnable postAnimationRunnable) { + private void onDrop(final ShortcutInfo item, DragView animateView, Rect finalRect, + float scaleRelativeToDragLayer, int index, Runnable postAnimationRunnable, + DragObject d) { item.cellX = -1; item.cellY = -1; @@ -382,7 +383,7 @@ public class FolderIcon extends LinearLayout implements FolderListener { item = (ShortcutInfo) d.dragInfo; } mFolder.notifyDrop(); - onDrop(item, d.dragView, null, 1.0f, mInfo.contents.size(), d.postAnimationRunnable); + onDrop(item, d.dragView, null, 1.0f, mInfo.contents.size(), d.postAnimationRunnable, d); } public DropTarget getDropTargetDelegate(DragObject d) { |