deleting some hover related code

This commit is contained in:
tibbi 2022-01-23 12:02:31 +01:00
parent 854178b8e0
commit b8d67a3f62
1 changed files with 1 additions and 15 deletions

View File

@ -331,7 +331,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
if (mKeyboard == null) {
setMeasuredDimension(0, 0)
} else {
var width: Int = mKeyboard!!.mMinWidth
var width = mKeyboard!!.mMinWidth
if (MeasureSpec.getSize(widthMeasureSpec) < width + 10) {
width = MeasureSpec.getSize(widthMeasureSpec)
}
@ -605,7 +605,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
oldKey.pressed = false
invalidateKey(oldKeyIndex)
val keyCode = oldKey.code
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT, keyCode)
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, keyCode)
}
@ -618,7 +617,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
invalidateKey(mCurrentKeyIndex)
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER, code)
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, code)
}
}
@ -903,18 +901,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
return false
}
override fun onHoverEvent(event: MotionEvent): Boolean {
if (mAccessibilityManager.isTouchExplorationEnabled && event.pointerCount == 1) {
when (event.action) {
MotionEvent.ACTION_HOVER_ENTER -> event.action = MotionEvent.ACTION_DOWN
MotionEvent.ACTION_HOVER_MOVE -> event.action = MotionEvent.ACTION_MOVE
MotionEvent.ACTION_HOVER_EXIT -> event.action = MotionEvent.ACTION_UP
}
return onTouchEvent(event)
}
return true
}
override fun onTouchEvent(me: MotionEvent): Boolean {
// Convert multi-pointer up/down events to single up/down events to
// deal with the typical multi-pointer behavior of two-thumb typing