textChange

fun EditText.textChange(timeout: Int = 300, ignoreEmpty: Boolean = true, action: (text: String) -> Unit)

EditText文本变化监听器,文本变化后,以timeout为时间间隔触发actionignoreEmpty=true: 输入文本为 空时,不触发action. timeout默认300ms,默认ignoreEmpty=true,忽略空字符串.

Since

3.0.0 灵感:RxBinding TextView.textChanges。这里直接以EditText实现,android.widget.TextView没有必要.