contentReceiver
@ExperimentalFoundationApi
fun Modifier.contentReceiver(receiveContentListener: ReceiveContentListener): Modifier
Configures the current node and any children nodes as a Content Receiver.
Content in this context refers to a TransferableContent that could be received from another app through Drag-and-Drop, Copy/Paste, or from the Software Keyboard.
There is no pre-filtering for the received content by media type, e.g. software Keyboard would assume that the app can handle any content that's sent to it. Therefore, it's crucial to check the received content's type and other related information before reading and processing it. Please refer to TransferableContent.hasMediaType and TransferableContent.clipMetadata to learn more about how to do proper checks on the received item.
Note that only androidx.compose.foundation.text.input.TextFieldState override of the text field supports being a content receiver.
Parameters
| receiveContentListener | Listener to respond to the receive event. This interface also includes a set of callbacks for certain Drag-and-Drop state changes. Please checkout ReceiveContentListener docs for an explanation of each callback. |