I\'m using a single activity to display SearchView as well as to display search results. The search results is just a subset of items so the search acts as a filter. Everythin
There is one other trick:
searchView.setOnSearchViewListener(new MaterialSearchView.SearchViewListener() {
@Override
public void onSearchViewShown() {
if(!txtToolbarTitle.getText().toString().isEmpty()){
searchView.setQuery(txtToolbarTitle.getText().toString()+ " ", false);
}
}
@Override
public void onSearchViewClosed() {
if(txtToolbarTitle.getText().toString().isEmpty()){
finish();
}
}
});