Added in API level 11
OnDragListener
interface OnDragListener
android.view.View.OnDragListener |
Interface definition for a listener that's invoked when a drag event is dispatched to this view. The listener is invoked before the view's own onDragEvent(android.view.DragEvent)
method. To fall back to the view's onDragEvent(DragEvent)
behavior, return false
from the listener method.
Summary
Public methods | |
---|---|
abstract Boolean |
Called when a drag event is dispatched to a view. |
Public methods
onDrag
Added in API level 11
abstract fun onDrag(
v: View!,
event: DragEvent!
): Boolean
Called when a drag event is dispatched to a view. Enables listeners to override the base behavior provided by onDragEvent(android.view.DragEvent)
.
Parameters | |
---|---|
v |
View!: The View that received the drag event. |
event |
DragEvent!: The event object for the drag event. |
Return | |
---|---|
Boolean |
true if the drag event was handled successfully; false , if the drag event was not handled. Note: A false return value triggers the view's onDragEvent(android.view.DragEvent) handler. |