Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Last active July 24, 2019 23:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mitchtabian/75e39f7f62a2d265f0fd7d1b7d442586 to your computer and use it in GitHub Desktop.
Save mitchtabian/75e39f7f62a2d265f0fd7d1b7d442586 to your computer and use it in GitHub Desktop.
switch(dragEvent.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
Log.d(TAG, "onDrag: drag started.");
return true;
case DragEvent.ACTION_DRAG_ENTERED:
Log.d(TAG, "onDrag: drag entered.");
return true;
case DragEvent.ACTION_DRAG_LOCATION:
Log.d(TAG, "onDrag: current point: ( " + dragEvent.getX() + " , " + dragEvent.getY() + " )" );
return true;
case DragEvent.ACTION_DRAG_EXITED:
Log.d(TAG, "onDrag: exited.");
return true;
case DragEvent.ACTION_DROP:
Log.d(TAG, "onDrag: dropped.");
return true;
case DragEvent.ACTION_DRAG_ENDED:
Log.d(TAG, "onDrag: ended.");
return true;
// An unknown action type was received.
default:
Log.e(TAG,"Unknown action type received by OnStartDragListener.");
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment