如何从sqlite游标获取建议(android.widget.SearchView)并在listdropdown中显示:
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;
}
});