mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32:16 -05:00
Merge pull request #392 from honnel/cursor-reset2
Reset cursor query when closing search view #386
This commit is contained in:
commit
7fc80be660
@ -367,6 +367,20 @@ public class KeyListPublicFragment extends Fragment implements SearchView.OnQuer
|
|||||||
// Execute this when searching
|
// Execute this when searching
|
||||||
mSearchView.setOnQueryTextListener(this);
|
mSearchView.setOnQueryTextListener(this);
|
||||||
|
|
||||||
|
//Erase search result without focus
|
||||||
|
MenuItemCompat.setOnActionExpandListener(searchItem, new MenuItemCompat.OnActionExpandListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onMenuItemActionExpand(MenuItem item) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onMenuItemActionCollapse(MenuItem item) {
|
||||||
|
mCurQuery = null;
|
||||||
|
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user