Adding fling-to-delete.
- Also fixing issue where the drop target icon changes color slower than the text.
Change-Id: I0bfa59da5d202016342f1c3de419ebcafd81ff6f
diff --git a/src/com/android/launcher2/DropTarget.java b/src/com/android/launcher2/DropTarget.java
index e49f782..fb714c6 100644
--- a/src/com/android/launcher2/DropTarget.java
+++ b/src/com/android/launcher2/DropTarget.java
@@ -16,6 +16,7 @@
package com.android.launcher2;
+import android.graphics.PointF;
import android.graphics.Rect;
/**
@@ -92,6 +93,13 @@
void onDragExit(DragObject dragObject);
/**
+ * Handle an object being dropped as a result of flinging to delete and will be called in place
+ * of onDrop(). (This is only called on objects that are set as the DragController's
+ * fling-to-delete target.
+ */
+ void onFlingToDelete(DragObject dragObject, int x, int y, PointF vec);
+
+ /**
* Allows a DropTarget to delegate drag and drop events to another object.
*
* Most subclasses will should just return null from this method.