mirror of
https://github.com/m2049r/xmrwallet
synced 2025-04-16 20:41:12 +02:00
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) {
|
static public void showKeyboard(Activity act) {
|
||||||
InputMethodManager imm = (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE);
|
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) {
|
static public void hideKeyboard(Activity act) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user