【发布时间】:2016-01-22 20:10:46
【问题描述】:
“限制”onQueryTextChange 的最佳方法是什么,以便我的 performSearch() 方法每秒只调用一次,而不是每次用户键入时调用?
public boolean onQueryTextChange(final String newText) {
if (newText.length() > 3) {
// throttle to call performSearch once every second
performSearch(nextText);
}
return false;
}
【问题讨论】:
标签: java android search searchview android-search