Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Override
public boolean onDrag(View view, DragEvent dragEvent) {
switch (dragEvent.getAction()) {
case DragEvent.ACTION_DRAG_ENDED:
Log.d("event", "ACTION_DRAG_ENDED");
return true;
case DragEvent.ACTION_DRAG_ENTERED:
Log.d("event", "ACTION_DRAG_ENTERED");
return true;
case DragEvent.ACTION_DRAG_EXITED:
Log.d("event", "ACTION_DRAG_EXITED");
return true;
case DragEvent.ACTION_DRAG_LOCATION:
Log.d("event", "ACTION_DRAG_LOCATION");
return true;
case DragEvent.ACTION_DRAG_STARTED:
Log.d("event", "ACTION_DRAG_STARTED");
return true;
case DragEvent.ACTION_DROP:
Log.d("event", "ACTION_DRAG_DROP");
handleDropEvent(view, dragEvent);
return true;
default:
Log.e("event", "unknown");
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment