Smoothing out transitions when adding from AllAppsCustomize

-> Making sure the dragview animates to the proper final position
-> Preventing add if item is released too early in the transition

Change-Id: I77882c02a6ce569436a6c8b5c3f4ed0023d5807e
This commit is contained in:
Adam Cohen
2011-07-21 14:24:06 -07:00
parent fc53cd22c9
commit 4b285c5a60
3 changed files with 146 additions and 83 deletions

View File

@@ -34,7 +34,7 @@ import com.android.launcher.R;
public class DeleteDropTarget extends ButtonDropTarget {
private static int DELETE_ANIMATION_DURATION = 220;
private static int DELETE_ANIMATION_DURATION = 250;
private ColorStateList mOriginalTextColor;
private TransitionDrawable mDrawable;
private int mHoverColor = 0xFFFF0000;
@@ -175,9 +175,9 @@ public class DeleteDropTarget extends ButtonDropTarget {
completeDrop(d);
}
};
dragLayer.animateView(d.dragView, from, to, 0f, 0.1f,
dragLayer.animateView(d.dragView, from, to, 0.1f, 0.1f,
DELETE_ANIMATION_DURATION, new DecelerateInterpolator(2),
new AccelerateInterpolator(2), onAnimationEndRunnable, false);
new DecelerateInterpolator(1.5f), onAnimationEndRunnable, false);
}
private void completeDrop(DragObject d) {