mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
OnFocusChangeListener replaced with OnActionExpandListener
For same behaviour like contacts app #386 #387
This commit is contained in:
parent
6fab8a126a
commit
506782b689
@ -368,13 +368,17 @@ public class KeyListPublicFragment extends Fragment implements SearchView.OnQuer
|
||||
mSearchView.setOnQueryTextListener(this);
|
||||
|
||||
//Erase search result without focus
|
||||
mSearchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
MenuItemCompat.setOnActionExpandListener(searchItem, new MenuItemCompat.OnActionExpandListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (!hasFocus) {
|
||||
mCurQuery = null;
|
||||
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
||||
}
|
||||
public boolean onMenuItemActionExpand(MenuItem item) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMenuItemActionCollapse(MenuItem item) {
|
||||
mCurQuery = null;
|
||||
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user