DragAndDropModifierNode

Added in 1.6.0
Deprecated in 1.8.0-rc01

A Modifier.Node providing low level access to platform drag and drop operations. In most cases, you will want to delegate to the DragAndDropModifierNode returned by the eponymous factory method.

Summary

Public functions

Boolean

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
Unit
drag(
    transferData: DragAndDropTransferData,
    decorationSize: Size,
    drawDragDecoration: DrawScope.() -> Unit
)

This function is deprecated. Use DragAndDropSourceModifierNode.requestDragAndDropTransfer instead

Cmn

Inherited functions

From androidx.compose.ui.node.DelegatableNode
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
From androidx.compose.ui.draganddrop.DragAndDropTarget
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
Boolean

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn
open Unit

This function is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn

Inherited properties

From androidx.compose.ui.node.DelegatableNode
Modifier.Node

This property is deprecated. This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode

Cmn

Public functions

acceptDragAndDropTransfer

fun acceptDragAndDropTransfer(startEvent: DragAndDropEvent): Boolean

The entry point to register interest in a drag and drop session for receiving data.

Returns
Boolean

true to indicate interest in the contents of a drag and drop session, false indicates no interest. If false is returned, this Modifier will not receive any DragAndDropTarget events.

All DragAndDropModifierNode instances in the hierarchy will be given an opportunity to participate in a drag and drop session via this method.

drag

fun drag(
    transferData: DragAndDropTransferData,
    decorationSize: Size,
    drawDragDecoration: DrawScope.() -> Unit
): Unit

Begins a drag and drop session for transferring data.

Parameters
transferData: DragAndDropTransferData

the data to be transferred after successful completion of the drag and drop gesture.

decorationSize: Size

the size of the drag decoration to be drawn.

drawDragDecoration: DrawScope.() -> Unit

provides the visual representation of the item dragged during the drag and drop gesture.