I have a SearchView
up and ready, here is the code I use in the java file of the page that has the SearchView
:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.options_menu, menu);
// Associate searchable configuration with the SearchView
SearchManager searchManager =
(SearchManager) getSystemService(Context.SEARCH_SERVICE);
SearchView searchView =
(SearchView) menu.findItem(R.id.search).getActionView();
searchView.setSearchableInfo(searchManager.getSearchableInfo(
new ComponentName(getApplicationContext(), SearchableActivity.class)));
return true;
}
My goal is now to let this SearchView
search through a site full of TextView
s. Every TextView
contains one word. Is it possible to make the SearchView
find the TextView
that contains the word i just typed in? If so, how? If not, how can I make it happen in another way?
Kind regards, Julian