mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-03-20 13:20:19 +01:00
adding a crashfix at dialpad keys
This commit is contained in:
parent
f8c89ce7ec
commit
434282d28d
@ -62,7 +62,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:28a2a4ad46'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:02ac8df059'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ import kotlinx.android.synthetic.main.dialpad.*
|
||||
import java.util.*
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
class DialpadActivity : SimpleActivity() {
|
||||
private var allContacts = ArrayList<SimpleContact>()
|
||||
private var speedDialValues = ArrayList<SpeedDial>()
|
||||
@ -352,7 +351,12 @@ class DialpadActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
val viewContainsTouchEvent = view.boundingBox.contains(event.rawX.roundToInt(), event.rawY.roundToInt())
|
||||
val viewContainsTouchEvent = if (event.rawX.isNaN() || event.rawY.isNaN()) {
|
||||
false
|
||||
} else {
|
||||
view.boundingBox.contains(event.rawX.roundToInt(), event.rawY.roundToInt())
|
||||
}
|
||||
|
||||
if (!viewContainsTouchEvent) {
|
||||
stopDialpadTone(char)
|
||||
if (longClickable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user