1 EditText 添加TextChangedListener
在 TextWatcher中的 afterTextChanged 回调中添加 延迟处理的线程
editRunable 为 输入完成触发的任务
override fun afterTextChanged(s: Editable) {
if (editRunable != null) {
handler.removeCallbacks(editRunable)
} handler.postDelayed(editRunable,800)
}
2 软键盘的监听
软键盘监听难度 等同于 app 包活