diff --git a/src/com/android/launcher3/DragView.java b/src/com/android/launcher3/DragView.java index a4e7ca7b3f..91dadf3c7e 100644 --- a/src/com/android/launcher3/DragView.java +++ b/src/com/android/launcher3/DragView.java @@ -199,9 +199,11 @@ public class DragView extends View { public void provideDragShadowMetrics(Point size, Point touch) { size.set((int)(mBitmap.getWidth() * getScaleX()), (int)(mBitmap.getHeight() * getScaleY())); - final int xGrowth = (int)(mBitmap.getWidth() * (getScaleX() - mInitialScale)); - final int yGrowth = (int)(mBitmap.getHeight() * (getScaleY() - mInitialScale)); - touch.set(mRegistrationX + xGrowth / 2, mRegistrationY + yGrowth / 2); + final float xGrowth = mBitmap.getWidth() * (getScaleX() - mInitialScale); + final float yGrowth = mBitmap.getHeight() * (getScaleY() - mInitialScale); + touch.set( + mRegistrationX + (int)Math.round(xGrowth / 2), + mRegistrationY + (int)Math.round(yGrowth / 2)); } @Override