SearchTemplate
@CarProtocol
public final class SearchTemplate implements Template
A model that allows the user to enter text searches, and can display results in a list.
Template Restrictions In regards to template refreshes, as described inonGetTemplate, this template supports any content changes as refreshes. This allows apps to interactively update the search results as the user types without the templates being counted against the quota.
Summary
Nested types |
|---|
public final class SearchTemplate.BuilderA builder of |
public interface SearchTemplate.SearchCallbackA listener for search updates. |
Public methods |
|
|---|---|
boolean |
|
@Nullable ActionStrip |
Returns the |
@Nullable Action |
Returns the |
@Nullable String |
Returns the optional initial search text. |
@Nullable ItemList |
Returns the |
@NonNull SearchCallbackDelegate |
Returns the |
@Nullable String |
Returns the optional search hint. |
int |
hashCode() |
boolean |
Returns whether the template is loading. |
boolean |
Returns whether to show the keyboard by default. |
@NonNull String |
toString() |
Public methods
getActionStrip
public @Nullable ActionStrip getActionStrip()
Returns the ActionStrip for this template or null if not set.
| See also | |
|---|---|
setActionStrip |
getHeaderAction
public @Nullable Action getHeaderAction()
Returns the Action that is set to be displayed in the header of the template, or null if not set.
| See also | |
|---|---|
setHeaderAction |
getInitialSearchText
public @Nullable String getInitialSearchText()
Returns the optional initial search text.
| See also | |
|---|---|
setInitialSearchText |
getItemList
public @Nullable ItemList getItemList()
Returns the ItemList for search results or null if not set.
| See also | |
|---|---|
getItemList |
getSearchCallbackDelegate
public @NonNull SearchCallbackDelegate getSearchCallbackDelegate()
Returns the SearchCallbackDelegate for search callbacks.
getSearchHint
public @Nullable String getSearchHint()
Returns the optional search hint.
| See also | |
|---|---|
setSearchHint |
isLoading
public boolean isLoading()
Returns whether the template is loading.
| See also | |
|---|---|
setLoading |
isShowKeyboardByDefault
public boolean isShowKeyboardByDefault()
Returns whether to show the keyboard by default.
| See also | |
|---|---|
setShowKeyboardByDefault |