mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-01 09:26:42 +01:00
adding a crashfix at touch gestures
This commit is contained in:
parent
c7bf17f3be
commit
42e5c91591
@ -57,6 +57,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.33.32'
|
implementation 'com.simplemobiletools:commons:5.33.34'
|
||||||
implementation "androidx.print:print:1.0.0"
|
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 pointerIndex = event.findPointerIndex(mActivePointerId)
|
||||||
val x = event.getX(pointerIndex)
|
val x: Float
|
||||||
val y = event.getY(pointerIndex)
|
val y: Float
|
||||||
|
|
||||||
|
try {
|
||||||
|
x = event.getX(pointerIndex)
|
||||||
|
y = event.getY(pointerIndex)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
var newValueX = x
|
var newValueX = x
|
||||||
var newValueY = y
|
var newValueY = y
|
||||||
|
Loading…
x
Reference in New Issue
Block a user