summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-14 19:33:37 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-14 19:33:37 -0700
commit1202b33da6a00b22f3bfd531115cfe030eddf901 (patch)
tree314d94721d138f94f652e5231103c21e157b7855 /src/com/android/launcher2
parent45167ac5cd04eb055b288707f863f33725bb11ff (diff)
downloadandroid_packages_apps_Trebuchet-1202b33da6a00b22f3bfd531115cfe030eddf901.tar.gz
android_packages_apps_Trebuchet-1202b33da6a00b22f3bfd531115cfe030eddf901.tar.bz2
android_packages_apps_Trebuchet-1202b33da6a00b22f3bfd531115cfe030eddf901.zip
Centering drag outline when placing shortcut on screen
Bug: 6452519 Change-Id: I236bbe9d570d44d10464ab21f42bb2adf5330742
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index f2c50a47b..5c91d35cc 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -702,6 +702,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
mWidgetPreviewIconPaddedDimension, Bitmap.Config.ARGB_8888);
Drawable d = image.getDrawable();
mCanvas.setBitmap(preview);
+ mCanvas.translate((mWidgetPreviewIconPaddedDimension - d.getIntrinsicWidth()) / 2,
+ (mWidgetPreviewIconPaddedDimension - d.getIntrinsicHeight()) / 2);
d.draw(mCanvas);
mCanvas.setBitmap(null);
createItemInfo.spanX = createItemInfo.spanY = 1;