From b985eb1849fff5d6e827a1135a191ea060e85969 Mon Sep 17 00:00:00 2001 From: alexknop Date: Wed, 26 Jul 2023 09:16:19 -0400 Subject: [PATCH] added a workaround to show the MainView on older Android devices < 9 (#310) --------- Co-authored-by: Alex Knop Co-authored-by: Dimo Karaivanov --- src/io/github/sspanak/tt9/ime/TraditionalT9.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/io/github/sspanak/tt9/ime/TraditionalT9.java b/src/io/github/sspanak/tt9/ime/TraditionalT9.java index a97bf3fa..f1c17d60 100644 --- a/src/io/github/sspanak/tt9/ime/TraditionalT9.java +++ b/src/io/github/sspanak/tt9/ime/TraditionalT9.java @@ -795,11 +795,13 @@ public class TraditionalT9 extends KeyPadHandler { * are invisible. This function forces the InputMethodManager to show our window. */ protected void forceShowWindowIfHidden() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P - && !mInputMode.isPassthrough() - && !isInputViewShown() - ) { + if (mInputMode.isPassthrough() || isInputViewShown()) { + return; + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { requestShowSelf(InputMethodManager.SHOW_IMPLICIT); + } else { + showWindow(true); } }