mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Disable soft input in dialpad
This commit is contained in:
@ -205,6 +205,7 @@ class CallActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call_sim_id.setTextColor(getProperTextColor().getContrastColor())
|
call_sim_id.setTextColor(getProperTextColor().getContrastColor())
|
||||||
|
dialpad_input.disableKeyboard()
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
@ -99,7 +99,7 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
dialpad_input.requestFocus()
|
dialpad_input.requestFocus()
|
||||||
|
|
||||||
SimpleContactsHelper(this).getAvailableContacts(false) { gotContacts(it) }
|
SimpleContactsHelper(this).getAvailableContacts(false) { gotContacts(it) }
|
||||||
disableKeyboardPopping()
|
dialpad_input.disableKeyboard()
|
||||||
|
|
||||||
val properPrimaryColor = getProperPrimaryColor()
|
val properPrimaryColor = getProperPrimaryColor()
|
||||||
val callIconId = if (areMultipleSIMsAvailable()) {
|
val callIconId = if (areMultipleSIMsAvailable()) {
|
||||||
@ -179,10 +179,6 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
dialpad_input.setText("")
|
dialpad_input.setText("")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun disableKeyboardPopping() {
|
|
||||||
dialpad_input.showSoftInputOnFocus = false
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun gotContacts(newContacts: ArrayList<SimpleContact>) {
|
private fun gotContacts(newContacts: ArrayList<SimpleContact>) {
|
||||||
allContacts = newContacts
|
allContacts = newContacts
|
||||||
|
|
||||||
|
@ -2,7 +2,11 @@ package com.simplemobiletools.dialer.extensions
|
|||||||
|
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.widget.EditText
|
||||||
|
|
||||||
val View.boundingBox
|
val View.boundingBox
|
||||||
get() = Rect().also { getGlobalVisibleRect(it) }
|
get() = Rect().also { getGlobalVisibleRect(it) }
|
||||||
|
|
||||||
|
fun EditText.disableKeyboard() {
|
||||||
|
showSoftInputOnFocus = false
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user