From 409e3f4c3510ce047e4d8cedc8a7c698f7180ed4 Mon Sep 17 00:00:00 2001 From: merkost Date: Sat, 17 Jun 2023 10:02:02 +1000 Subject: [PATCH] Moved setKeyboardHolder before setKeyboard in order to properly manage toolbar visibility --- .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 2 +- .../com/simplemobiletools/keyboard/views/MyKeyboardView.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index 8306a85..f0c2c96 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -46,8 +46,8 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared override fun onCreateInputView(): View { val keyboardHolder = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null) keyboardView = keyboardHolder.keyboard_view as MyKeyboardView - keyboardView!!.setKeyboard(keyboard!!) keyboardView!!.setKeyboardHolder(keyboardHolder.keyboard_holder) + keyboardView!!.setKeyboard(keyboard!!) keyboardView!!.setEditorInfo(currentInputEditorInfo) keyboardView!!.mOnKeyboardActionListener = this return keyboardHolder!! diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt index 6ce5c7f..d25a169 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -269,6 +269,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut invalidateAllKeys() computeProximityThreshold(keyboard) mMiniKeyboardCache.clear() + mToolbarHolder?.beInvisibleIf(context.isDeviceLocked) accessHelper = AccessHelper(this, mKeyboard?.mKeys.orEmpty()) ViewCompat.setAccessibilityDelegate(this, accessHelper)