fix hideKeyboard() in other activities as well, just to be safe

This commit is contained in:
Vincent Breitmoser 2014-10-02 19:40:43 +02:00
parent a361e82a4d
commit 08bfc2ae73
4 changed files with 12 additions and 0 deletions

View File

@ -166,6 +166,9 @@ public class CreateKeyInputFragment extends Fragment {
}
private void hideKeyboard() {
if (getActivity() == null) {
return;
}
InputMethodManager inputManager = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);

View File

@ -159,6 +159,9 @@ public class ImportKeysCloudFragment extends Fragment {
}
private void hideKeyboard() {
if (getActivity() == null) {
return;
}
InputMethodManager inputManager = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);

View File

@ -206,6 +206,9 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
}
private void hideKeyboard() {
if (getActivity() == null) {
return;
}
InputMethodManager inputManager = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);

View File

@ -200,6 +200,9 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
}
private void hideKeyboard() {
if (getActivity() == null) {
return;
}
InputMethodManager inputManager = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);