Post show/hide keyboard

This commit is contained in:
M66B 2024-05-23 18:06:44 +02:00
parent 1a00102301
commit 7f96e25ff8
1 changed files with 14 additions and 12 deletions

View File

@ -2090,21 +2090,23 @@ public class Helper {
}
static void showKeyboard(final View view) {
try {
Log.i("showKeyboard view=" + view);
new SoftwareKeyboardControllerCompat(view).show();
} catch (Throwable ex) {
Log.e(ex);
}
view.post(new RunnableEx("showKeyboard") {
@Override
protected void delegate() {
Log.i("showKeyboard view=" + view);
new SoftwareKeyboardControllerCompat(view).show();
}
});
}
static void hideKeyboard(final View view) {
try {
Log.i("hideKeyboard view=" + view);
new SoftwareKeyboardControllerCompat(view).hide();
} catch (Throwable ex) {
Log.e(ex);
}
view.post(new RunnableEx("hideKeyboard") {
@Override
protected void delegate() {
Log.i("hideKeyboard view=" + view);
new SoftwareKeyboardControllerCompat(view).hide();
}
});
}
static boolean isKeyboardVisible(final View view) {