mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
fixing a glitch with popup keyboard disappearing instantly
This commit is contained in:
@ -1050,13 +1050,15 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
mMiniKeyboard!!.invalidateAllKeys()
|
mMiniKeyboard!!.invalidateAllKeys()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (coords[0] > 0 || coords[1] > 0) {
|
||||||
if (coords[0] - me.x > mPopupMaxMoveDistance || // left
|
if (coords[0] - me.x > mPopupMaxMoveDistance || // left
|
||||||
me.x - (coords[0] + mMiniKeyboard!!.width) > mPopupMaxMoveDistance // right
|
me.x - (coords[0] + mMiniKeyboard!!.measuredWidth) > mPopupMaxMoveDistance // right
|
||||||
) {
|
) {
|
||||||
dismissPopupKeyboard()
|
dismissPopupKeyboard()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||||
mMiniKeyboard?.mKeys?.firstOrNull { it.focused }?.apply {
|
mMiniKeyboard?.mKeys?.firstOrNull { it.focused }?.apply {
|
||||||
mOnKeyboardActionListener!!.onKey(code)
|
mOnKeyboardActionListener!!.onKey(code)
|
||||||
|
Reference in New Issue
Block a user