InputCallback


@RequiresCarApi(value = 2)
interface InputCallback


A listener for handling text input completion event.

Summary

Public functions

Unit

Notifies when the user finished entering text in an input box.

Unit

Notifies the current text has changed in an input box.

Public functions

onInputSubmitted

Added in 1.1.0
fun onInputSubmitted(text: String): Unit

Notifies when the user finished entering text in an input box.

This event is sent when the user finishes typing in the keyboard and pressed enter. If the user simply stops typing and closes the keyboard, this event will not be sent.

Parameters
text: String

the text that was entered, or an empty string if no text was typed.

onInputTextChanged

Added in 1.1.0
fun onInputTextChanged(text: String): Unit

Notifies the current text has changed in an input box.

The host may invoke this callback as the user types an input text. The frequency of these updates is not guaranteed to be after every individual keystroke. The host may decide to wait for several keystrokes before sending a single update.

Parameters
text: String

the current text that the user has typed