InputCallback


@RequiresCarApi(value = 2)
public interface InputCallback


A listener for handling text input completion event.

Summary

Public methods

default void

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

default void

Notifies the current text has changed in an input box.

Public methods

onInputSubmitted

Added in 1.1.0
default void onInputSubmitted(@NonNull String text)

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
@NonNull String text

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

onInputTextChanged

Added in 1.1.0
default void onInputTextChanged(@NonNull String text)

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
@NonNull String text

the current text that the user has typed