DropHelper.Options


public final class DropHelper.Options


Options for configuring drop targets specified by DropHelper.

Summary

Nested types

public final class DropHelper.Options.Builder

Builder for constructing a DropHelper.Options instance.

Public methods

@ColorInt int

Returns the color used to highlight the drop target.

int

Returns the corner radius of the drop target highlighting.

@NonNull List<EditText>

Returns a list of the EditText elements contained in the drop target view hierarchy.

boolean

Indicates whether or not a drop target highlight color has been set.

boolean

Indicates whether or not a corner radius has been set for the drop target highlighting.

boolean

Indicates whether or not the app should respond to drag events when the drag operation contains local state.

Public methods

getHighlightColor

Added in 1.0.0
public @ColorInt int getHighlightColor()

Returns the color used to highlight the drop target.

Returns
@ColorInt int

The drop target highlight color.

getHighlightCornerRadiusPx

Added in 1.0.0
public int getHighlightCornerRadiusPx()

Returns the corner radius of the drop target highlighting.

Returns
int

The drop target highlighting corner radius.

getInnerEditTexts

Added in 1.0.0
public @NonNull List<EditTextgetInnerEditTexts()

Returns a list of the EditText elements contained in the drop target view hierarchy. A list of EditText elements is supplied when building this DropHelper.Options instance (see addInnerEditTexts).

Returns
@NonNull List<EditText>

The list of drop target EditText elements.

hasHighlightColor

Added in 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
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
public boolean shouldAcceptDragsWithLocalState()

Indicates whether or not the app should respond to drag events when the drag operation contains local state. 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.