Request focus before calling ShowInputMethod, closes #1132

This commit is contained in:
Philipp Crocoll
2020-02-15 09:35:49 +01:00
parent 2b2deb291a
commit ff95c32c2d

View File

@@ -785,6 +785,8 @@ namespace keepass2android
}
Util.SetNoPersonalizedLearning(FindViewById<EditText>(Resource.Id.password_edit));
}
private void InitializeToolbarCollapsing()
@@ -1774,9 +1776,12 @@ namespace keepass2android
pwd.PostDelayed(() =>
{
InputMethodManager keyboard = (InputMethodManager) GetSystemService(InputMethodService);
if (showKeyboard)
keyboard.ShowSoftInput(pwd, 0);
else
if (showKeyboard)
{
pwd.RequestFocus();
keyboard.ShowSoftInput(pwd, 0);
}
else
keyboard.HideSoftInputFromWindow(pwd.WindowToken, HideSoftInputFlags.ImplicitOnly);
}, 50);
}