fixing a glitch with popup keyboard disappearing instantly
This commit is contained in:
parent
3875b35348
commit
3735d727f4
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue