Android.Views.DragEvent Class
Represents an event that is sent out by the system at various times during a drag and drop operation.

See Also: DragEvent Members

Syntax

[Android.Runtime.Register("android/view/DragEvent", DoNotGenerateAcw=true)]
public class DragEvent : Java.Lang.Object, Android.OS.IParcelable, IDisposable

Remarks

Represents an event that is sent out by the system at various times during a drag and drop operation. It is a complex data structure that contains several important pieces of data about the operation and the underlying data.
getAction() ValuegetClipDescription()getLocalState()getX()getY()getClipData()getResult()
ACTION_DRAG_STARTEDXXXX  
ACTION_DRAG_ENTEREDXX    
ACTION_DRAG_LOCATIONXXXX  
ACTION_DRAG_EXITEDXX    
ACTION_DROPXXXXX 
ACTION_DRAG_ENDEDXX   X

Developer Guides

View objects that receive a DragEvent call DragEvent.Action, which returns an action type that indicates the state of the drag and drop operation. This allows a View object to react to a change in state by changing its appearance or performing other actions. For example, a View can react to the DragEvent.ACTION_DRAG_ENTERED action type by by changing one or more colors in its displayed image.

During a drag and drop operation, the system displays an image that the user drags. This image is called a drag shadow. Several action types reflect the position of the drag shadow relative to the View receiving the event.

Most methods return valid data only for certain event actions. This is summarized in the following table. Each possible DragEvent.Action value is listed in the first column. The other columns indicate which method or methods return valid data for that getAction() value:

The DragEvent.Action, DragEvent.DescribeContents, DragEvent.WriteToParcel(Android.OS.Parcel, Android.OS.ParcelableWriteFlags), and DragEvent.toString() methods always return valid data.

For a guide to implementing drag and drop features, read the Drag and Drop developer guide.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11