# DropHelper.Options

Artifact: [androidx.draganddrop:draganddrop](https://developer.android.com/jetpack/androidx/releases/draganddrop) [View Source](https://cs.android.com/search?q=file:androidx/draganddrop/DropHelper.java+class:androidx.draganddrop.DropHelper.Options) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

*** ** * ** ***


```
public final class DropHelper.Options
```

<br />

*** ** * ** ***

Options for configuring drop targets specified by `https://developer.android.com/reference/androidx/draganddrop/DropHelper`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options.Builder` Builder for constructing a `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options` instance. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#getHighlightColor()()` Returns the color used to highlight the drop target. |
| `int` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#getHighlightCornerRadiusPx()()` Returns the corner radius of the drop target highlighting. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/widget/EditText.html>` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#getInnerEditTexts()()` Returns a list of the `https://developer.android.com/reference/android/widget/EditText.html` elements contained in the drop target view hierarchy. |
| `boolean` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#hasHighlightColor()()` Indicates whether or not a drop target highlight color has been set. |
| `boolean` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#hasHighlightCornerRadiusPx()()` Indicates whether or not a corner radius has been set for the drop target highlighting. |
| `boolean` | `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#shouldAcceptDragsWithLocalState()()` Indicates whether or not the app should respond to drag events when the drag operation contains `https://developer.android.com/reference/android/view/DragEvent.html#getLocalState()`. |

## Public methods

### getHighlightColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public @ColorInt int getHighlightColor()
```

Returns the color used to highlight the drop target.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | The drop target highlight color. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#hasHighlightColor()` |   |

### getHighlightCornerRadiusPx

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public int getHighlightCornerRadiusPx()
```

Returns the corner radius of the drop target highlighting.

| Returns |
|---|---|
| `int` | The drop target highlighting corner radius. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options#hasHighlightCornerRadiusPx()` |   |

### getInnerEditTexts

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public @NonNull List<EditText> getInnerEditTexts()
```

Returns a list of the `https://developer.android.com/reference/android/widget/EditText.html` elements contained in the drop target view hierarchy. A list of `EditText` elements is supplied when building this `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options` instance (see `https://developer.android.com/reference/androidx/draganddrop/DropHelper.Options.Builder#addInnerEditTexts(android.widget.EditText...)`).

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/widget/EditText.html>` | The list of drop target `EditText` elements. |

### hasHighlightColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public boolean hasHighlightColor()
```

Indicates whether or not a drop target highlight color has been set. If not, a default is used.

| Returns |
|---|---|
| `boolean` | True if a highlight color has been set, false otherwise. |

### hasHighlightCornerRadiusPx

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public boolean hasHighlightCornerRadiusPx()
```

Indicates whether or not a corner radius has been set for the drop target highlighting. If not, a default is used.

| Returns |
|---|---|
| `boolean` | True if a corner radius has been set, false otherwise. |

### shouldAcceptDragsWithLocalState

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/draganddrop#1.0.0)

```
public boolean shouldAcceptDragsWithLocalState()
```

Indicates whether or not the app should respond to drag events when the drag operation contains `https://developer.android.com/reference/android/view/DragEvent.html#getLocalState()`. By default, the app does not respond to drag events that have local state. Setting local state is only possible when the drag operation originated from this activity.

| Returns |
|---|---|
| `boolean` | True if drag events will be accepted when the local state is non-null, otherwise false. |