Android 12 Developer Preview is here! Try it out, and give us your feedback!

SearchListener

public interface SearchListener

com.google.android.libraries.car.app.SearchListener


A listener for search updates.

Summary

Public methods

abstract void onSearchSubmitted(String searchText)

Notifies that the user has submitted the search and the given searchText is the final term.

abstract void onSearchTextChanged(String searchText)

Notifies the current searchText.

Public methods

onSearchSubmitted

public abstract void onSearchSubmitted (String searchText)

Notifies that the user has submitted the search and the given searchText is the final term.

Parameters
searchText String: the search text that the user typed.

onSearchTextChanged

public abstract void onSearchTextChanged (String searchText)

Notifies the current searchText.

The host may invoke this callback as the user types a search 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
searchText String: the current search text that the user has typed.