From 66404d9fc258b6a86842f42fb4e02258d100a5d8 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 26 Oct 2021 10:05:00 +0200 Subject: [PATCH] Delay showing keyboard --- app/src/main/java/eu/faircode/email/Helper.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 689dce3c8d..197e527053 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -68,6 +68,7 @@ import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.ViewTreeObserver; import android.view.WindowManager; import android.view.accessibility.AccessibilityManager; import android.view.inputmethod.EditorInfo; @@ -1256,8 +1257,13 @@ public class Helper { if (imm == null) return; - Log.i("showKeyboard view=" + view); - imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); + view.postDelayed(new Runnable() { + @Override + public void run() { + Log.i("showKeyboard view=" + view); + imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); + } + }, 250); } static void hideKeyboard(final View view) {