FileDocCategorySizeDatePackage
DropTarget.javaAPI DocAndroid 1.5 API2513Wed May 06 22:42:46 BST 2009com.android.launcher

DropTarget

public interface DropTarget
Interface defining an object that can receive a drag.

Fields Summary
Constructors Summary
Methods Summary
public booleanacceptDrop(DragSource source, int x, int y, int xOffset, int yOffset, java.lang.Object dragInfo)
Indicates whether a drop action can occur at the specified location. The method {@link #onDrop(DragSource, int, int, int, int, Object)} will be invoked on this drop target only if this method returns true.

param
source DragSource where the drag started
param
x X coordinate of the drop location
param
y Y coordinate of the drop location
param
xOffset Horizontal offset with the object being dragged where the original touch happened
param
yOffset Vertical offset with the object being dragged where the original touch happened
param
dragInfo Data associated with the object being dragged return True if the drop is accepted, false otherwise.

public voidonDragEnter(DragSource source, int x, int y, int xOffset, int yOffset, java.lang.Object dragInfo)

public voidonDragExit(DragSource source, int x, int y, int xOffset, int yOffset, java.lang.Object dragInfo)

public voidonDragOver(DragSource source, int x, int y, int xOffset, int yOffset, java.lang.Object dragInfo)

public voidonDrop(DragSource source, int x, int y, int xOffset, int yOffset, java.lang.Object dragInfo)
Handle an object being dropped on the DropTarget

param
source DragSource where the drag started
param
x X coordinate of the drop location
param
y Y coordinate of the drop location
param
xOffset Horizontal offset with the object being dragged where the original touch happened
param
yOffset Vertical offset with the object being dragged where the original touch happened
param
dragInfo Data associated with the object being dragged