mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-17 07:30:14 -05:00
Reset cursor query when closing search view #386
Without focus the search result get erased.
This commit is contained in:
parent
da83c8ff60
commit
6fab8a126a
@ -367,6 +367,16 @@ public class KeyListPublicFragment extends Fragment implements SearchView.OnQuer
|
||||
// Execute this when searching
|
||||
mSearchView.setOnQueryTextListener(this);
|
||||
|
||||
//Erase search result without focus
|
||||
mSearchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (!hasFocus) {
|
||||
mCurQuery = null;
|
||||
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user