1
0
Fork 0

added a workaround to show the MainView on older Android devices < 9 (#310)

---------

Co-authored-by: Alex Knop <alexknoptech@protonmail.com>
Co-authored-by: Dimo Karaivanov <doftor.livain@gmail.com>
This commit is contained in:
alexknop 2023-07-26 09:16:19 -04:00 committed by GitHub
parent 60da04fa6e
commit b985eb1849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}