1
如何獲得從listdropdown sqlite的光標顯示建議(android.widget.SearchView):如何從onQueryTextChange()獲取建議
searchView.setOnSuggestionListener(new OnSuggestionListener() {
@Override
public boolean onSuggestionSelect(int arg0) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onSuggestionClick(int arg0) {
// TODO Auto-generated method stub
return false;
}
});
////////// ///////////////////////////
searchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String arg0) {
Log.e("onQueryTextSubmit", arg0);
return false;
}
//////////////// ///////////////
@Override
public boolean onQueryTextChange(String arg0) {
Log.e("onQueryTextChange", arg0);
// Call sqlite cursor to get names
// click on the name to get more data*
return false;
}
});
謝謝,它幫助。 –