Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/view/DragEvent#constants) \| [Inherited Constants](https://developer.android.com/reference/android/view/DragEvent#inhconstants) \| [Fields](https://developer.android.com/reference/android/view/DragEvent#lfields) \| [Methods](https://developer.android.com/reference/android/view/DragEvent#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/DragEvent#inhmethods)

# DragEvent

*** ** * ** ***

` public class DragEvent `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.DragEvent |

<br />

*** ** * ** ***

Represents an event that is sent out by the system at various times during a drag and drop operation. It is a data structure that contains several important pieces of data about the operation and the underlying data.

View objects that receive a DragEvent call `https://developer.android.com/reference/android/view/DragEvent#getAction()`, 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 `https://developer.android.com/reference/android/view/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 `https://developer.android.com/reference/android/view/DragEvent#getAction()` value is listed in the first column. The other columns indicate which method or methods return valid data for that getAction() value:

| getAction() Value | getClipDescription() | getLocalState() | getX() | getY() | getClipData() | getResult() |
|---|---|---|---|---|---|---|
| ACTION_DRAG_STARTED | X | X | X | X |   |   |
| ACTION_DRAG_ENTERED | X | X |   |   |   |   |
| ACTION_DRAG_LOCATION | X | X | X | X |   |   |
| ACTION_DRAG_EXITED | X | X |   |   |   |   |
| ACTION_DROP | X | X | X | X | X |   |
| ACTION_DRAG_ENDED |   | X |   |   |   | X |

The `https://developer.android.com/reference/android/view/DragEvent#getAction()`, `https://developer.android.com/reference/android/view/DragEvent#getLocalState()` `https://developer.android.com/reference/android/view/DragEvent#describeContents()`, `https://developer.android.com/reference/android/view/DragEvent#writeToParcel(android.os.Parcel,%20int)`, and `https://developer.android.com/reference/android/view/DragEvent#toString()` methods always return valid data.

### Developer Guides

For a guide to implementing drag and drop features, read the [Drag and Drop](https://developer.android.com/guide/topics/ui/drag-drop) developer guide.

<br />

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the drag and drop operation has concluded. |
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the drag point has entered the bounding box of the View. |
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_EXITED` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals that the user has moved the drag shadow out of the bounding box of the View or into a descendant view that can accept the data. |
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_LOCATION` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Sent to a View after `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED` while the drag shadow is still within the View object's bounding box, but not within a descendant view that can accept the data. |
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals the start of a drag and drop operation. |
| `int` | `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the user has released the drag shadow, and the drag point is within the bounding box of the View and not within a descendant view that can accept the data. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/DragEvent>` | `https://developer.android.com/reference/android/view/DragEvent#CREATOR` A container for creating a DragEvent from a Parcel. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/view/DragEvent#describeContents()() ` Returns information about the `https://developer.android.com/reference/android/os/Parcel` representation of this DragEvent object. |
| ` int` | ` https://developer.android.com/reference/android/view/DragEvent#getAction()() ` Inspect the action value of this event. |
| ` https://developer.android.com/reference/android/content/ClipData` | ` https://developer.android.com/reference/android/view/DragEvent#getClipData()() ` Returns the `https://developer.android.com/reference/android/content/ClipData` object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. |
| ` https://developer.android.com/reference/android/content/ClipDescription` | ` https://developer.android.com/reference/android/view/DragEvent#getClipDescription()() ` Returns the `https://developer.android.com/reference/android/content/ClipDescription` object contained in the `https://developer.android.com/reference/android/content/ClipData` object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. |
| ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/view/DragEvent#getLocalState()() ` Returns the local state object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/DragEvent#getResult()() ` <br /> Returns an indication of the result of the drag and drop operation. |
| ` float` | ` https://developer.android.com/reference/android/view/DragEvent#getX()() ` Gets the X coordinate of the drag point. |
| ` float` | ` https://developer.android.com/reference/android/view/DragEvent#getY()() ` Gets the Y coordinate of the drag point. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/DragEvent#toString()() ` Returns a string containing a concise, human-readable representation of this DragEvent object. |
| ` void` | ` https://developer.android.com/reference/android/view/DragEvent#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Creates a `https://developer.android.com/reference/android/os/Parcel` object from this DragEvent object. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Constants

### ACTION_DRAG_ENDED

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DRAG_ENDED
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the drag and drop operation has concluded. A View that changed its appearance during the operation should return to its usual drawing state in response to this event.

All views with listeners that returned boolean `true` for the ACTION_DRAG_STARTED event will receive the ACTION_DRAG_ENDED event even if they are not currently visible when the drag ends. Views removed during the drag operation won't receive the ACTION_DRAG_ENDED event.

The View object can call `https://developer.android.com/reference/android/view/DragEvent#getResult()` to see the result of the operation. If a View returned `true` in response to `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`, then getResult() returns `true`, otherwise it returns `false`.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED`
- `https://developer.android.com/reference/android/view/DragEvent#getResult()`

Constant Value: 4 (0x00000004)

### ACTION_DRAG_ENTERED

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DRAG_ENTERED
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the drag point has entered the bounding box of the View.

If the View can accept a drop, it can react to ACTION_DRAG_ENTERED by changing its appearance in a way that tells the user that the View is the current drop target.
The system stops sending ACTION_DRAG_LOCATION events to a View once the user moves the drag shadow out of the View object's bounding box or into a descendant view that can accept the data. If the user moves the drag shadow back into the View object's bounding box or out of a descendant view that can accept the data, the View receives an ACTION_DRAG_ENTERED again before receiving any more ACTION_DRAG_LOCATION events.

<br />

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED`
- `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_LOCATION`

Constant Value: 5 (0x00000005)

### ACTION_DRAG_EXITED

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DRAG_EXITED
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals that the user has moved the drag shadow out of the bounding box of the View or into a descendant view that can accept the data. The View can react by changing its appearance in a way that tells the user that View is no longer the immediate drop target.

After the system sends an ACTION_DRAG_EXITED event to the View, the View receives no more ACTION_DRAG_LOCATION events until the user drags the drag shadow back over the View.

<br />

<br />

Constant Value: 6 (0x00000006)

### ACTION_DRAG_LOCATION

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DRAG_LOCATION
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Sent to a View after `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED` while the drag shadow is still within the View object's bounding box, but not within a descendant view that can accept the data. The `https://developer.android.com/reference/android/view/DragEvent#getX()` and `https://developer.android.com/reference/android/view/DragEvent#getY()` methods supply the X and Y position of the drag point within the View object's bounding box.

A View receives an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED` event before receiving any ACTION_DRAG_LOCATION events.

The system stops sending ACTION_DRAG_LOCATION events to a View once the user moves the drag shadow out of the View object's bounding box or into a descendant view that can accept the data. If the user moves the drag shadow back into the View object's bounding box or out of a descendant view that can accept the data, the View receives an ACTION_DRAG_ENTERED again before receiving any more ACTION_DRAG_LOCATION events.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED`
- `https://developer.android.com/reference/android/view/DragEvent#getX()`
- `https://developer.android.com/reference/android/view/DragEvent#getY()`

Constant Value: 2 (0x00000002)

### ACTION_DRAG_STARTED

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DRAG_STARTED
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals the start of a drag and drop operation. The View should return `true` from its `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)` handler method or `https://developer.android.com/reference/android/view/View.OnDragListener#onDrag(android.view.View,%20android.view.DragEvent)` listener if it can accept a drop. The onDragEvent() or onDrag() methods usually inspect the metadata from `https://developer.android.com/reference/android/view/DragEvent#getClipDescription()` to determine if they can accept the data contained in this drag. For an operation that doesn't represent data transfer, these methods may perform other actions to determine whether or not the View should accept the data. If the View wants to indicate that it is a valid drop target, it can also react by changing its appearance.

Views added or becoming visible for the first time during a drag operation receive this event when they are added or becoming visible.

A View only receives further drag events for the drag operation if it returns `true` in response to ACTION_DRAG_STARTED.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED`
- `https://developer.android.com/reference/android/view/DragEvent#getX()`
- `https://developer.android.com/reference/android/view/DragEvent#getY()`

Constant Value: 1 (0x00000001)

### ACTION_DROP

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACTION_DROP
```

Action constant returned by `https://developer.android.com/reference/android/view/DragEvent#getAction()`: Signals to a View that the user has released the drag shadow, and the drag point is within the bounding box of the View and not within a descendant view that can accept the data. The View should retrieve the data from the DragEvent by calling `https://developer.android.com/reference/android/view/DragEvent#getClipData()`. The methods `https://developer.android.com/reference/android/view/DragEvent#getX()` and `https://developer.android.com/reference/android/view/DragEvent#getY()` return the X and Y position of the drop point within the View object's bounding box.

The View should return `true` from its `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)` handler or `https://developer.android.com/reference/android/view/View.OnDragListener#onDrag(android.view.View,%20android.view.DragEvent)` listener if it accepted the drop, and `false` if it ignored the drop.

The View can also react to this action by changing its appearance.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/DragEvent#getClipData()`
- `https://developer.android.com/reference/android/view/DragEvent#getX()`
- `https://developer.android.com/reference/android/view/DragEvent#getY()`

Constant Value: 3 (0x00000003)

## Fields

### CREATOR

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<DragEvent> CREATOR
```

A container for creating a DragEvent from a Parcel.

<br />

## Public methods

### describeContents

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Returns information about the `https://developer.android.com/reference/android/os/Parcel` representation of this DragEvent object.

<br />

| Returns ||
|---|---|
| `int` | Information about the `https://developer.android.com/reference/android/os/Parcel` representation. <br /> |

### getAction

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAction ()
```

Inspect the action value of this event.

<br />

| Returns ||
|---|---|
| `int` | One of the following action constants, in the order in which they usually occur during a drag and drop operation: - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED` - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENTERED` - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_LOCATION` - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_EXITED` - `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED` <br /> |

### getClipData

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ClipData getClipData ()
```

Returns the `https://developer.android.com/reference/android/content/ClipData` object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. This method only returns valid data if the event action is `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipData` | The ClipData sent to the system by startDragAndDrop(). <br /> |

### getClipDescription

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ClipDescription getClipDescription ()
```

Returns the `https://developer.android.com/reference/android/content/ClipDescription` object contained in the `https://developer.android.com/reference/android/content/ClipData` object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. The drag handler or listener for a View can use the metadata in this object to decide if the View can accept the dragged View object's data.

This method returns valid data for all event actions except for `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ClipDescription` | The ClipDescription that was part of the ClipData sent to the system by startDragAndDrop(). <br /> |

### getLocalState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object getLocalState ()
```

Returns the local state object sent to the system as part of the call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. The object is intended to provide local information about the drag and drop operation. For example, it can indicate whether the drag and drop operation is a copy or a move.

The local state is available only to views in the activity which has started the drag operation. In all other activities this method will return null

This method returns valid data for all event actions.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | The local state object sent to the system by startDragAndDrop(). <br /> |

### getResult

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getResult ()
```

<br />

Returns an indication of the result of the drag and drop operation. This method only returns valid data if the action type is `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED`. The return value depends on what happens after the user releases the drag shadow.

If the user releases the drag shadow on a View that can accept a drop, the system sends an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` event to the View object's drag event listener. If the listener returns `true`, then getResult() will return `true`. If the listener returns `false`, then getResult() returns `false`.

Notice that getResult() also returns `false` if no `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` is sent. This happens, for example, when the user releases the drag shadow over an area outside of the application. In this case, the system sends out `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED` for the current operation, but never sends out `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if a drag event listener returned `true` in response to `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`. If the system did not send `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` before `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED`, or if the listener returned `false` in response to `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`, then `false` is returned. <br /> |

### getX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getX ()
```

Gets the X coordinate of the drag point. The value is only valid if the event action is `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED`, `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_LOCATION` or `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`.

<br />

| Returns ||
|---|---|
| `float` | The current drag point's X coordinate <br /> |

### getY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getY ()
```

Gets the Y coordinate of the drag point. The value is only valid if the event action is `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED`, `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_LOCATION` or `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP`.

<br />

| Returns ||
|---|---|
| `float` | The current drag point's Y coordinate <br /> |

### toString

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string containing a concise, human-readable representation of this DragEvent object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A string representation of the DragEvent object. <br /> |

### writeToParcel

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Creates a `https://developer.android.com/reference/android/os/Parcel` object from this DragEvent object.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: A `https://developer.android.com/reference/android/os/Parcel` object in which to put the DragEvent object. <br /> |
| `flags` | `int`: Flags to store in the Parcel. <br /> |