summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/IconDropTarget.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-05-24 14:07:08 -0700
committerAdam Cohen <adamcohen@google.com>2011-05-24 16:17:13 -0700
commitcb3382b1bfe1a534b1b44f5c4def9b2db605ac90 (patch)
tree7f1b1e4538e0143f713582b055530d1a53f03499 /src/com/android/launcher2/IconDropTarget.java
parent7d7207f6bca8584c28c8b0b6586f262e543f2d68 (diff)
downloadandroid_packages_apps_Trebuchet-cb3382b1bfe1a534b1b44f5c4def9b2db605ac90.tar.gz
android_packages_apps_Trebuchet-cb3382b1bfe1a534b1b44f5c4def9b2db605ac90.tar.bz2
android_packages_apps_Trebuchet-cb3382b1bfe1a534b1b44f5c4def9b2db605ac90.zip
Refactor of Launcher drag and drop to use a DragObject
-> DragObject contains a bunch of parameters instead of pssing them each individually Change-Id: I709cf320fe4234d71e19325d5c761dd9a9bba405
Diffstat (limited to 'src/com/android/launcher2/IconDropTarget.java')
-rw-r--r--src/com/android/launcher2/IconDropTarget.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/com/android/launcher2/IconDropTarget.java b/src/com/android/launcher2/IconDropTarget.java
index 4d018e64f..a091f6c5d 100644
--- a/src/com/android/launcher2/IconDropTarget.java
+++ b/src/com/android/launcher2/IconDropTarget.java
@@ -82,32 +82,27 @@ public class IconDropTarget extends TextView implements DropTarget, DragControll
mDragAndDropEnabled = enabled;
}
- public boolean acceptDrop(DragSource source, int x, int y, int xOffset, int yOffset,
- DragView dragView, Object dragInfo) {
+ public boolean acceptDrop(DragObject d) {
return false;
}
- public void onDrop(DragSource source, int x, int y, int xOffset, int yOffset,
- DragView dragView, Object dragInfo) {
+ public void onDrop(DragObject d) {
// Do nothing
}
- public void onDragEnter(DragSource source, int x, int y, int xOffset, int yOffset,
- DragView dragView, Object dragInfo) {
+ public void onDragEnter(DragObject d) {
if (mDragAndDropEnabled) {
- dragView.setPaint(mHoverPaint);
+ d.dragView.setPaint(mHoverPaint);
}
}
- public void onDragOver(DragSource source, int x, int y, int xOffset, int yOffset,
- DragView dragView, Object dragInfo) {
+ public void onDragOver(DragObject d) {
// Do nothing
}
- public void onDragExit(DragSource source, int x, int y, int xOffset, int yOffset,
- DragView dragView, Object dragInfo) {
+ public void onDragExit(DragObject d) {
if (mDragAndDropEnabled) {
- dragView.setPaint(null);
+ d.dragView.setPaint(null);
}
}
@@ -135,8 +130,7 @@ public class IconDropTarget extends TextView implements DropTarget, DragControll
}
@Override
- public DropTarget getDropTargetDelegate(DragSource source, int x, int y, int xOffset,
- int yOffset, DragView dragView, Object dragInfo) {
+ public DropTarget getDropTargetDelegate(DragObject d) {
return null;
}
}