forked from mirrors/Fedilab
Fix issue #498 - Keep searched word in search field
This commit is contained in:
parent
43781d1618
commit
03f0ac4be3
1 changed files with 3 additions and 0 deletions
|
@ -122,6 +122,9 @@ public class SearchResultTabActivity extends BaseActivity {
|
||||||
inflater.inflate(R.menu.menu_search, menu);
|
inflater.inflate(R.menu.menu_search, menu);
|
||||||
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||||
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
|
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
|
||||||
|
if (search != null) {
|
||||||
|
searchView.setQuery(search, false);
|
||||||
|
}
|
||||||
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
|
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
|
||||||
searchView.setIconifiedByDefault(false);
|
searchView.setIconifiedByDefault(false);
|
||||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
|
|
Loading…
Reference in a new issue