📅  最后修改于: 2022-03-11 14:53:33.240000             🧑  作者: Mango
fun View.showKeyboard() = ViewCompat.getWindowInsetsController(this)
?.show(WindowInsetsCompat.Type.ime())
//Now you can just call editText.showKeyboard() to show the keyboard for the EditText