Share via


View.IOnDragListener.OnDrag(View, DragEvent) Method

Definition

Called when a drag event is dispatched to a view.

[Android.Runtime.Register("onDrag", "(Landroid/view/View;Landroid/view/DragEvent;)Z", "GetOnDrag_Landroid_view_View_Landroid_view_DragEvent_Handler:Android.Views.View/IOnDragListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnDrag (Android.Views.View? v, Android.Views.DragEvent? e);
[<Android.Runtime.Register("onDrag", "(Landroid/view/View;Landroid/view/DragEvent;)Z", "GetOnDrag_Landroid_view_View_Landroid_view_DragEvent_Handler:Android.Views.View/IOnDragListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnDrag : Android.Views.View * Android.Views.DragEvent -> bool

Parameters

v
View

The View that received the drag event.

e
DragEvent

The DragEvent object for the drag event.

Returns

true if the drag event was handled successfully; false, if the drag event was not handled. <b>Note:</b> A false return value triggers the view's #onDragEvent(DragEvent) handler.

Attributes

Remarks

Called when a drag event is dispatched to a view. Enables listeners to override the base behavior provided by #onDragEvent(DragEvent).

Java documentation for android.view.View.OnDragListener.onDrag(android.view.View, android.view.DragEvent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to