mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-19 20:31:52 -05:00
Merge branch 'development' of github.com:open-keychain/open-keychain into development
This commit is contained in:
commit
d6b9fc27b7
@ -50,7 +50,6 @@ public class ImportKeysCloudFragment extends Fragment {
|
|||||||
private View mSearchButton;
|
private View mSearchButton;
|
||||||
private AutoCompleteTextView mQueryEditText;
|
private AutoCompleteTextView mQueryEditText;
|
||||||
private View mConfigButton;
|
private View mConfigButton;
|
||||||
private ArrayAdapter<String> mServerAdapter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new instance of this fragment
|
* Creates new instance of this fragment
|
||||||
@ -136,11 +135,7 @@ public class ImportKeysCloudFragment extends Fragment {
|
|||||||
} else {
|
} else {
|
||||||
// open keyboard
|
// open keyboard
|
||||||
mQueryEditText.requestFocus();
|
mQueryEditText.requestFocus();
|
||||||
InputMethodManager inputMethodManager = (InputMethodManager)
|
toggleKeyboard(true);
|
||||||
getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
||||||
if (inputMethodManager != null) {
|
|
||||||
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getArguments().getBoolean(ARG_DISABLE_QUERY_EDIT, false)) {
|
if (getArguments().getBoolean(ARG_DISABLE_QUERY_EDIT, false)) {
|
||||||
@ -159,10 +154,10 @@ public class ImportKeysCloudFragment extends Fragment {
|
|||||||
private void search(String query) {
|
private void search(String query) {
|
||||||
Preferences prefs = Preferences.getPreferences(getActivity());
|
Preferences prefs = Preferences.getPreferences(getActivity());
|
||||||
mImportActivity.loadCallback(new ImportKeysListFragment.CloudLoaderState(query, prefs.getCloudSearchPrefs()));
|
mImportActivity.loadCallback(new ImportKeysListFragment.CloudLoaderState(query, prefs.getCloudSearchPrefs()));
|
||||||
hideKeyboard();
|
toggleKeyboard(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideKeyboard() {
|
private void toggleKeyboard(boolean show) {
|
||||||
if (getActivity() == null) {
|
if (getActivity() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -171,10 +166,15 @@ public class ImportKeysCloudFragment extends Fragment {
|
|||||||
|
|
||||||
// check if no view has focus
|
// check if no view has focus
|
||||||
View v = getActivity().getCurrentFocus();
|
View v = getActivity().getCurrentFocus();
|
||||||
if (v == null)
|
if (v == null) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (show) {
|
||||||
|
inputManager.showSoftInput(v, InputMethodManager.SHOW_IMPLICIT);
|
||||||
|
} else {
|
||||||
inputManager.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
inputManager.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user