added method from AndroidUtils

This commit is contained in:
Chumva 2018-03-21 18:52:25 +02:00
parent ecb963b850
commit 9ee7a487c8

View file

@ -532,11 +532,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH) { if (actionId == EditorInfo.IME_ACTION_SEARCH) {
searchQuery += " "; searchQuery += " ";
searchEditText.clearFocus(); AndroidUtils.hideSoftKeyboard(getActivity(), searchEditText);
InputMethodManager im = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (im != null) {
im.hideSoftInputFromWindow(searchEditText.getWindowToken(), 0);
}
runSearch(); runSearch();
return true; return true;
} }