public static interface SearchBar.QueryListener
This method is invoked only when the user starts to enter text in the search bar. It will not be invoked when the text is still being edited in the input method window.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
onQueryChanged(String newText) |
Called when the user enters query text in the search bar.
|
boolean |
onQuerySubmit(String query) |
Called when the user submits the query, either by tapping the submit button or by pressing the Enter key on
the keyboard.
|
boolean onQuerySubmit(String query)
query - Indicates the query text in the search bar.true if the listener wants to override the default action; returns false to
perform the default action.boolean onQueryChanged(String newText)
newText - Indicates the new query text entered in the search bar.true if the listener wants to override the default action; returns false to
perform the default action.