mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
deleting some hover related code
This commit is contained in:
@ -331,7 +331,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
if (mKeyboard == null) {
|
if (mKeyboard == null) {
|
||||||
setMeasuredDimension(0, 0)
|
setMeasuredDimension(0, 0)
|
||||||
} else {
|
} else {
|
||||||
var width: Int = mKeyboard!!.mMinWidth
|
var width = mKeyboard!!.mMinWidth
|
||||||
if (MeasureSpec.getSize(widthMeasureSpec) < width + 10) {
|
if (MeasureSpec.getSize(widthMeasureSpec) < width + 10) {
|
||||||
width = MeasureSpec.getSize(widthMeasureSpec)
|
width = MeasureSpec.getSize(widthMeasureSpec)
|
||||||
}
|
}
|
||||||
@ -605,7 +605,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
oldKey.pressed = false
|
oldKey.pressed = false
|
||||||
invalidateKey(oldKeyIndex)
|
invalidateKey(oldKeyIndex)
|
||||||
val keyCode = oldKey.code
|
val keyCode = oldKey.code
|
||||||
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT, keyCode)
|
|
||||||
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, keyCode)
|
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, keyCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,7 +617,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
}
|
}
|
||||||
|
|
||||||
invalidateKey(mCurrentKeyIndex)
|
invalidateKey(mCurrentKeyIndex)
|
||||||
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER, code)
|
|
||||||
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, code)
|
sendAccessibilityEventForUnicodeCharacter(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED, code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -903,18 +901,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||||||
return false
|
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 {
|
override fun onTouchEvent(me: MotionEvent): Boolean {
|
||||||
// Convert multi-pointer up/down events to single up/down events to
|
// Convert multi-pointer up/down events to single up/down events to
|
||||||
// deal with the typical multi-pointer behavior of two-thumb typing
|
// deal with the typical multi-pointer behavior of two-thumb typing
|
||||||
|
Reference in New Issue
Block a user