mirror of https://github.com/m2049r/xmrwallet.git
fix keyboard crash when no view in focus (#693)
This commit is contained in:
parent
a93e96d34c
commit
f1b786ec3e
|
@ -167,7 +167,9 @@ public class Helper {
|
|||
|
||||
static public void showKeyboard(Activity act) {
|
||||
InputMethodManager imm = (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(act.getCurrentFocus(), InputMethodManager.SHOW_IMPLICIT);
|
||||
final View focus = act.getCurrentFocus();
|
||||
if (focus != null)
|
||||
imm.showSoftInput(focus, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
|
||||
static public void hideKeyboard(Activity act) {
|
||||
|
|
Loading…
Reference in New Issue