I use toolbar searchview. I catch input result using code:
SearchView.OnQueryTextListener queryTextListener = new SearchView.OnQueryTextListener() {
public boolean onQueryTextChange(String newText) {
return true;
}
When I have the result I am looking for the similar strings in my excel file. Then I return ArrayList (search results). And now I need to show the results in SearchView. How can I do it?
You need to use a CursorAdapter associated with your searchview.
Searchview.setSuggestionAdapter
Helpful link about the usage of a cursor from an array (Create a cursor from hardcoded array instead of DB).