forked from upstream-mirrors/quik
Show keyboard when selecting contact and contact selected
This commit is contained in:
+1
-2
@@ -24,8 +24,7 @@ import android.view.inputmethod.InputMethodManager
|
||||
|
||||
fun Activity.dismissKeyboard() {
|
||||
window.currentFocus?.let { focus ->
|
||||
val imm = getSystemService(
|
||||
Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(focus.windowToken, 0)
|
||||
|
||||
focus.clearFocus()
|
||||
|
||||
@@ -39,11 +39,16 @@ var ViewGroup.animateLayoutChanges: Boolean
|
||||
layoutTransition = if (value) LayoutTransition() else null
|
||||
}
|
||||
|
||||
|
||||
fun EditText.showKeyboard() {
|
||||
requestFocus()
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.showSoftInput(this, 0)
|
||||
imm.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
|
||||
fun EditText.hideKeyboard() {
|
||||
requestFocus()
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(windowToken, 0)
|
||||
}
|
||||
|
||||
fun ImageView.setTint(color: Int) {
|
||||
|
||||
Reference in New Issue
Block a user