Skip to content

Instantly share code, notes, and snippets.

@hkosacki
Created March 1, 2017 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkosacki/499ac71df180fb33a8928a9aa6b38b3d to your computer and use it in GitHub Desktop.
Save hkosacki/499ac71df180fb33a8928a9aa6b38b3d to your computer and use it in GitHub Desktop.
@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