summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DragController.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-11-13 15:47:05 -0800
committerDanesh M <daneshm90@gmail.com>2014-06-06 22:54:14 -0700
commit57529fe246212966da65700afa20fc135c2bbc88 (patch)
treecaaf2a37ed7296388c725691490bdd0b1a2d625d /src/com/android/launcher3/DragController.java
parent32f1110ae23676000fa3ef59df8b03213a2ece6a (diff)
downloadandroid_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.tar.gz
android_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.tar.bz2
android_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.zip
Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic grid scales icons down, due to the drawable bounds not being equal to their bitmap sizes. Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
Diffstat (limited to 'src/com/android/launcher3/DragController.java')
-rw-r--r--src/com/android/launcher3/DragController.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DragController.java b/src/com/android/launcher3/DragController.java
index ab4823343..1bfaa233b 100644
--- a/src/com/android/launcher3/DragController.java
+++ b/src/com/android/launcher3/DragController.java
@@ -198,7 +198,7 @@ public class DragController {
* @param dragRegion Coordinates within the bitmap b for the position of item being dragged.
* Makes dragging feel more precise, e.g. you can clip out a transparent border
*/
- public void startDrag(Bitmap b, int dragLayerX, int dragLayerY,
+ public DragView startDrag(Bitmap b, int dragLayerX, int dragLayerY,
DragSource source, Object dragInfo, int dragAction, Point dragOffset, Rect dragRegion,
float initialDragViewScale) {
if (PROFILE_DRAWING_DURING_DRAG) {
@@ -245,6 +245,7 @@ public class DragController {
mLauncher.getDragLayer().performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
dragView.show(mMotionDownX, mMotionDownY);
handleMoveEvent(mMotionDownX, mMotionDownY);
+ return dragView;
}
/**