onImeAction

Function

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

Action to invoke the IME action handler configured on the node, as well as specify the type of IME action provided by the node.

Expected to be used on editable text fields.

Parameters

imeActionTypeThe IME type, such as ImeAction.Next or ImeAction.Search
labelOptional label for this action.
actionAction to be performed when SemanticsActions.OnImeAction is called.