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