adding a crashfix at touch gestures
This commit is contained in:
parent
c7bf17f3be
commit
42e5c91591
|
@ -57,6 +57,6 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.33.32'
|
||||
implementation 'com.simplemobiletools:commons:5.33.34'
|
||||
implementation "androidx.print:print:1.0.0"
|
||||
}
|
||||
|
|
|
@ -270,8 +270,15 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) {
|
|||
}
|
||||
|
||||
val pointerIndex = event.findPointerIndex(mActivePointerId)
|
||||
val x = event.getX(pointerIndex)
|
||||
val y = event.getY(pointerIndex)
|
||||
val x: Float
|
||||
val y: Float
|
||||
|
||||
try {
|
||||
x = event.getX(pointerIndex)
|
||||
y = event.getY(pointerIndex)
|
||||
} catch (e: Exception) {
|
||||
return true
|
||||
}
|
||||
|
||||
var newValueX = x
|
||||
var newValueY = y
|
||||
|
|
Loading…
Reference in New Issue