Animating the widget previews on drag from AppsCustomize.
Change-Id: I223d66bb447c40e6870be46bb27f107f0e428a95
diff --git a/src/com/android/launcher2/DragView.java b/src/com/android/launcher2/DragView.java
index 79f9b81..1b30293 100644
--- a/src/com/android/launcher2/DragView.java
+++ b/src/com/android/launcher2/DragView.java
@@ -62,7 +62,7 @@
* @param registrationY The y coordinate of the registration point.
*/
public DragView(Launcher launcher, Bitmap bitmap, int registrationX, int registrationY,
- int left, int top, int width, int height) {
+ int left, int top, int width, int height, final float initialScale) {
super(launcher);
mDragLayer = launcher.getDragLayer();
@@ -86,8 +86,8 @@
mOffsetX += deltaX;
mOffsetY += deltaY;
- setScaleX(1f + (value * (scale - 1f)));
- setScaleY(1f + (value * (scale - 1f)));
+ setScaleX(initialScale + (value * (scale - initialScale)));
+ setScaleY(initialScale + (value * (scale - initialScale)));
if (sDragAlpha != 1f) {
setAlpha(sDragAlpha * value + (1f - value));
}