summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-05-09 12:43:44 -0700
committerJon Miranda <jonmiranda@google.com>2017-05-09 13:00:49 -0700
commitaa6f66aad29171bda85e0633c93530beefdac307 (patch)
tree62b162d55c4b1b73971eb5b39757156e4fe557bf /src/com/android/launcher3/Workspace.java
parent38d2add77bb2475513403ece64ccfcaa0d7b1ccb (diff)
downloadandroid_packages_apps_Trebuchet-aa6f66aad29171bda85e0633c93530beefdac307.tar.gz
android_packages_apps_Trebuchet-aa6f66aad29171bda85e0633c93530beefdac307.tar.bz2
android_packages_apps_Trebuchet-aa6f66aad29171bda85e0633c93530beefdac307.zip
Fix bug where deep shortcut drag view target was skewed to the right.
Bug: 38140665 Change-Id: I9386bf70cf51b6be33264f85cbfe9e8049d0c32e
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 48a62d981..369d80d77 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -75,6 +75,7 @@ import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.DragPreviewProvider;
import com.android.launcher3.graphics.PreloadIconDrawable;
import com.android.launcher3.popup.PopupContainerWithArrow;
+import com.android.launcher3.shortcuts.ShortcutDragPreviewProvider;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ItemInfoMatcher;
@@ -2257,6 +2258,8 @@ public class Workspace extends PagedView
int previewSize = grid.folderIconSizePx;
dragVisualizeOffset = new Point(- halfPadding, halfPadding - child.getPaddingTop());
dragRect = new Rect(0, child.getPaddingTop(), child.getWidth(), previewSize);
+ } else if (previewProvider instanceof ShortcutDragPreviewProvider) {
+ dragVisualizeOffset = new Point(- halfPadding, halfPadding);
}
// Clear the pressed state if necessary