Function

setTextSubstitution

Action to set the text substitution of this node.

setTextSubstitution

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

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

label Optional label for this action.
action Action to be performed when SemanticsActions.SetTextSubstitution is called.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: