androidx.compose.ui.draganddrop


Interfaces

DragAndDropModifierNode

A Modifier.Node providing low level access to platform drag and drop operations.

Cmn
DragAndDropTarget

Provides a means of receiving a transfer data from a drag and drop session.

Cmn

Classes

DragAndDropEvent

A representation of an event sent by the platform during a drag and drop operation.

Cmn
android
DragAndDropTransferData

Definition for a type representing transferable data.

Cmn
android

Top-level functions summary

DragAndDropModifierNode

Creates a Modifier.Node for starting platform drag and drop sessions with the intention of transferring data.

Cmn
DragAndDropModifierNode
DragAndDropModifierNode(
    shouldStartDragAndDrop: (event: DragAndDropEvent) -> Boolean,
    target: DragAndDropTarget
)

Creates a Modifier.Node for receiving transfer data from platform drag and drop sessions.

Cmn

Extension functions summary

Set<String>

The mime types present in a DragAndDropEvent

android
DragEvent

Returns the backing DragEvent to read platform specific data

android

Top-level functions

DragAndDropModifierNode

fun DragAndDropModifierNode(): DragAndDropModifierNode

Creates a Modifier.Node for starting platform drag and drop sessions with the intention of transferring data. A drag and stop session is started by calling DragAndDropModifierNode.drag.

DragAndDropModifierNode

fun DragAndDropModifierNode(
    shouldStartDragAndDrop: (event: DragAndDropEvent) -> Boolean,
    target: DragAndDropTarget
): DragAndDropModifierNode

Creates a Modifier.Node for receiving transfer data from platform drag and drop sessions. All DragAndDropModifierNode instances provided by this function may also start drag and drop sessions by calling DragAndDropModifierNode.drag.

Parameters
shouldStartDragAndDrop: (event: DragAndDropEvent) -> Boolean

allows for inspecting the start DragAndDropEvent for a given session to decide whether or not the provided DragAndDropTarget would like to receive from it.

target: DragAndDropTarget

allows for receiving events and transfer data from a given drag and drop session.

Extension functions

mimeTypes

fun DragAndDropEvent.mimeTypes(): Set<String>

The mime types present in a DragAndDropEvent

toAndroidDragEvent

fun DragAndDropEvent.toAndroidDragEvent(): DragEvent

Returns the backing DragEvent to read platform specific data