From 37bd006b73b4399ba10bb46e7f57a56b2e133e86 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Fri, 7 Aug 2015 16:26:00 -0700 Subject: [PATCH] Fixing drag view transition jump for scaled-down icons. There was a jump upon a transition from DragView to the framework shadow for hotseat icons (which are scaled down). Bug: 22028725 Change-Id: If4f5ed4501836667ff3a8eaa9da4577bdf98e880 --- src/com/android/launcher3/DragView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/DragView.java b/src/com/android/launcher3/DragView.java index 91dadf3c7e..89577353bd 100644 --- a/src/com/android/launcher3/DragView.java +++ b/src/com/android/launcher3/DragView.java @@ -199,8 +199,8 @@ public class DragView extends View { public void provideDragShadowMetrics(Point size, Point touch) { size.set((int)(mBitmap.getWidth() * getScaleX()), (int)(mBitmap.getHeight() * getScaleY())); - final float xGrowth = mBitmap.getWidth() * (getScaleX() - mInitialScale); - final float yGrowth = mBitmap.getHeight() * (getScaleY() - mInitialScale); + final float xGrowth = mBitmap.getWidth() * (getScaleX() - 1); + final float yGrowth = mBitmap.getHeight() * (getScaleY() - 1); touch.set( mRegistrationX + (int)Math.round(xGrowth / 2), mRegistrationY + (int)Math.round(yGrowth / 2));