Moved setKeyboardHolder before setKeyboard in order to properly manage toolbar visibility
This commit is contained in:
parent
d8dead14ea
commit
409e3f4c35
|
@ -46,8 +46,8 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
||||||
override fun onCreateInputView(): View {
|
override fun onCreateInputView(): View {
|
||||||
val keyboardHolder = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null)
|
val keyboardHolder = layoutInflater.inflate(R.layout.keyboard_view_keyboard, null)
|
||||||
keyboardView = keyboardHolder.keyboard_view as MyKeyboardView
|
keyboardView = keyboardHolder.keyboard_view as MyKeyboardView
|
||||||
keyboardView!!.setKeyboard(keyboard!!)
|
|
||||||
keyboardView!!.setKeyboardHolder(keyboardHolder.keyboard_holder)
|
keyboardView!!.setKeyboardHolder(keyboardHolder.keyboard_holder)
|
||||||
|
keyboardView!!.setKeyboard(keyboard!!)
|
||||||
keyboardView!!.setEditorInfo(currentInputEditorInfo)
|
keyboardView!!.setEditorInfo(currentInputEditorInfo)
|
||||||
keyboardView!!.mOnKeyboardActionListener = this
|
keyboardView!!.mOnKeyboardActionListener = this
|
||||||
return keyboardHolder!!
|
return keyboardHolder!!
|
||||||
|
|
|
@ -269,6 +269,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
invalidateAllKeys()
|
invalidateAllKeys()
|
||||||
computeProximityThreshold(keyboard)
|
computeProximityThreshold(keyboard)
|
||||||
mMiniKeyboardCache.clear()
|
mMiniKeyboardCache.clear()
|
||||||
|
mToolbarHolder?.beInvisibleIf(context.isDeviceLocked)
|
||||||
|
|
||||||
accessHelper = AccessHelper(this, mKeyboard?.mKeys.orEmpty())
|
accessHelper = AccessHelper(this, mKeyboard?.mKeys.orEmpty())
|
||||||
ViewCompat.setAccessibilityDelegate(this, accessHelper)
|
ViewCompat.setAccessibilityDelegate(this, accessHelper)
|
||||||
|
|
Loading…
Reference in New Issue