Allow fling gesture while dragging from AllApps to dismiss drag.

Change-Id: I5eea14336579a1374aded63dda9ad1a33e8b8d4a
This commit is contained in:
Winson Chung
2012-03-20 16:19:37 -07:00
parent 6f8cb5201d
commit a48487a814
6 changed files with 99 additions and 27 deletions

View File

@@ -25,6 +25,21 @@ import com.android.launcher2.DropTarget.DragObject;
*
*/
public interface DragSource {
/**
* @return whether items dragged from this source supports
*/
boolean supportsFlingToDelete();
void onDropCompleted(View target, DragObject d, boolean success);
/**
* A callback specifically made back to the source after an item from this source has been flung
* to be deleted on a DropTarget. In such a situation, this method will be called after
* onDropCompleted, and more importantly, after the fling animation has completed.
*/
void onFlingToDeleteCompleted();
/**
* A callback made back to the source after an item from this source has been dropped on a
* DropTarget.
*/
void onDropCompleted(View target, DragObject d, boolean isFlingToDelete, boolean success);
}