@Deprecated(
message =
"This interface is deprecated in favor to " +
"DragAndDropSourceModifierNode and DragAndDropTargetModifierNode",
replaceWith = ReplaceWith("DragAndDropSourceModifierNode"),
)
public interface DragAndDropModifierNode : DelegatableNode, DragAndDropTarget
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.
Functions
drag
@Deprecated("Use DragAndDropSourceModifierNode.requestDragAndDropTransfer instead")
public fun drag(
transferData: DragAndDropTransferData,
decorationSize: Size,
drawDragDecoration: DrawScope.() -> Unit,
)
Begins a drag and drop session for transferring data.
Parameters
| transferData | the data to be transferred after successful completion of the drag and drop gesture. |
| decorationSize | the size of the drag decoration to be drawn. |
| drawDragDecoration | provides the visual representation of the item dragged during the drag and drop gesture. |
acceptDragAndDropTransfer
public fun acceptDragAndDropTransfer(startEvent: DragAndDropEvent): Boolean
The entry point to register interest in a drag and drop session for receiving data.
All DragAndDropModifierNode instances in the hierarchy will be given an opportunity to participate in a drag and drop session via this method.
Return
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.