Clear focus on restoring search

This will keep the keyboard collapsed, preventing lists not drawing
This commit is contained in:
M66B 2019-03-20 10:32:11 +00:00
parent 9783dd0ac7
commit 4e12c09eef
4 changed files with 4 additions and 0 deletions

View File

@ -222,6 +222,7 @@ public class FragmentAccounts extends FragmentBase {
if (!TextUtils.isEmpty(searching)) {
menuSearch.expandActionView();
searchView.setQuery(searching, false);
searchView.clearFocus();
}
searchView.setQueryHint(getString(R.string.title_search_device));

View File

@ -124,6 +124,7 @@ public class FragmentContacts extends FragmentBase {
if (!TextUtils.isEmpty(searching)) {
menuSearch.expandActionView();
searchView.setQuery(searching, true);
searchView.clearFocus();
}
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {

View File

@ -349,6 +349,7 @@ public class FragmentFolders extends FragmentBase {
if (!TextUtils.isEmpty(searching)) {
menuSearch.expandActionView();
searchView.setQuery(searching, false);
searchView.clearFocus();
}
searchView.setQueryHint(getString(R.string.title_search_device));

View File

@ -1774,6 +1774,7 @@ public class FragmentMessages extends FragmentBase {
if (!TextUtils.isEmpty(searching)) {
menuSearch.expandActionView();
searchView.setQuery(searching, false);
searchView.clearFocus();
}
searchView.setQueryHint(getString(folder < 0 ? R.string.title_search_device : R.string.title_search_hint));