Searchview - hide toast that appears when a key is pressed
I am using SearchView filter. Everything works fine, but when you leave the keyboard to type and press the button, a toast is displayed. Does anyone know how to remove it?
My code:
searchView = (SearchView) view.findViewById(R.id.buscador_lineas_transporte);
searchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
if(TextUtils.isEmpty(newText)){
lvLineasTransporte.clearTextFilter();
}
else{
lvLineasTransporte.setFilterText(newText);
}
return true;
}
});
Thank.
solved
This keyboard appears when you implement the Filterable interface in the adapter.
+3
source to share