I am using SearchView
with ListView
and implementing Filterable
to filter record. Its working fine except two problems.
The problems are:
SearchView
a black bar with searched text showing.SearchView
.I want to remove both. How can I remove them?
Try this for popup
disable TextFilterEnabled on your ListView
yourListView.setTextFilterEnabled(false);
and filter your data like this:
android.widget.Filter filter = yourListAdapter.getFilter();
Also Add:
@Override
public boolean onQueryTextChange(String newText) {
System.out.println("tap");
yourAdapter ca = (yourAdapter)listview.getAdapter();
if (TextUtils.isEmpty(newText)) {
listview.clearTextFilter();
} else {
filter.filter(newText);
}
return true;
}