DropHelper.Options


class DropHelper.Options


Options for configuring drop targets specified by DropHelper.

Summary

Nested types

Builder for constructing a DropHelper.Options instance.

Public functions

@ColorInt Int

Returns the color used to highlight the drop target.

Int

Returns the corner radius of the drop target highlighting.

(Mutable)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 functions

getHighlightColor

Added in 1.0.0
fun getHighlightColor(): @ColorInt Int

Returns the color used to highlight the drop target.

Returns
@ColorInt Int

The drop target highlight color.

getHighlightCornerRadiusPx

Added in 1.0.0
fun getHighlightCornerRadiusPx(): Int

Returns the corner radius of the drop target highlighting.

Returns
Int

The drop target highlighting corner radius.

getInnerEditTexts

Added in 1.0.0
fun getInnerEditTexts(): (Mutable)List<EditText!>

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
(Mutable)List<EditText!>

The list of drop target EditText elements.

hasHighlightColor

Added in 1.0.0
fun hasHighlightColor(): Boolean

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
fun hasHighlightCornerRadiusPx(): Boolean

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
fun shouldAcceptDragsWithLocalState(): Boolean

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.