pasteText

Function

Common
fun SemanticsPropertyReceiver.pasteText(label: String? = null, action: (() -> Boolean)?)

This function adds the SemanticsActions.PasteText to the SemanticsPropertyReceiver. Use it to indicate that element is open for accepting paste data from the clipboard. There is no need to check if the clipboard data available as this is done by the framework. For this action to be triggered, the element must also have the SemanticsProperties.Focused property set.

Parameters

labelOptional label for this action.
actionAction to be performed when the SemanticsActions.PasteText is called.