mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -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);
|
mSearchView.setOnQueryTextListener(this);
|
||||||
|
|
||||||
//Erase search result without focus
|
//Erase search result without focus
|
||||||
mSearchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
MenuItemCompat.setOnActionExpandListener(searchItem, new MenuItemCompat.OnActionExpandListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View v, boolean hasFocus) {
|
public boolean onMenuItemActionExpand(MenuItem item) {
|
||||||
if (!hasFocus) {
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onMenuItemActionCollapse(MenuItem item) {
|
||||||
mCurQuery = null;
|
mCurQuery = null;
|
||||||
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
getLoaderManager().restartLoader(0, null, KeyListPublicFragment.this);
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user