Small improvement

This commit is contained in:
M66B
2022-06-12 11:38:16 +02:00
parent 4785dad757
commit e5bbe7028f
3 changed files with 6 additions and 5 deletions

View File

@@ -1493,8 +1493,7 @@ public class Helper {
static void showKeyboard(final View view) {
final Context context = view.getContext();
InputMethodManager imm =
(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
InputMethodManager imm = Helper.getSystemService(context, InputMethodManager.class);
if (imm == null)
return;
@@ -1513,8 +1512,7 @@ public class Helper {
static void hideKeyboard(final View view) {
final Context context = view.getContext();
InputMethodManager imm =
(InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
InputMethodManager imm = Helper.getSystemService(context, InputMethodManager.class);
if (imm == null)
return;