SearchViewCompat.OnQueryTextListenerCompat
public static abstract class SearchViewCompat.OnQueryTextListenerCompat
extends Object
java.lang.Object |
↳ |
android.support.v4.widget.SearchViewCompat.OnQueryTextListenerCompat |
对查询文本进行更改的回调。
Summary
Public constructors
SearchViewCompat.OnQueryTextListenerCompat
SearchViewCompat.OnQueryTextListenerCompat ()
Public methods
onQueryTextChange
boolean onQueryTextChange (String newText)
当查询文本被用户更改时调用。
Parameters |
newText |
String : the new content of the query text field. |
Returns |
boolean |
false if the SearchView should perform the default action of showing any suggestions if available, true if the action was handled by the listener. |
onQueryTextSubmit
boolean onQueryTextSubmit (String query)
当用户提交查询时调用。 这可能是由于按键盘上的按键或按下提交按钮。 侦听器可以通过返回true来覆盖标准行为,以表明它已处理提交请求。 否则,返回false让SearchView通过启动任何关联的意图来处理提交。
Parameters |
query |
String : the query text that is to be submitted |
Returns |
boolean |
true if the query has been handled by the listener, false to let the SearchView perform the default action. |