diff options
Diffstat (limited to 'src/com/android/launcher3/DragView.java')
-rw-r--r-- | src/com/android/launcher3/DragView.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DragView.java b/src/com/android/launcher3/DragView.java index 686cf62ff..ea34e46f9 100644 --- a/src/com/android/launcher3/DragView.java +++ b/src/com/android/launcher3/DragView.java @@ -14,7 +14,6 @@ * limitations under the License. */ - package com.android.launcher3; import android.animation.ValueAnimator; @@ -30,8 +29,6 @@ import android.graphics.Rect; import android.view.View; import android.view.animation.DecelerateInterpolator; -import com.android.launcher3.R; - public class DragView extends View { private static float sDragAlpha = 1f; @@ -51,6 +48,9 @@ public class DragView extends View { private float mOffsetX = 0.0f; private float mOffsetY = 0.0f; private float mInitialScale = 1f; + // The intrinsic icon scale factor is the scale factor for a drag icon over the workspace + // size. This is ignored for non-icons. + private float mIntrinsicIconScale = 1f; /** * Construct the drag view. @@ -120,6 +120,15 @@ public class DragView extends View { mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); } + /** Sets the scale of the view over the normal workspace icon size. */ + public void setIntrinsicIconScaleFactor(float scale) { + mIntrinsicIconScale = scale; + } + + public float getIntrinsicIconScaleFactor() { + return mIntrinsicIconScale; + } + public float getOffsetY() { return mOffsetY; } |