setTextSubstitution

Function

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

Action to set the text substitution of this node.

Expected to be used on non-editable text.

Note, this action doesn't show the text substitution. Please call SemanticsPropertyReceiver.showTextSubstitution to show the text substitution.

Parameters

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