how to keep button disable any editText Empty ?
i've try with implementation 'androidx.core:core-ktx:1.1.0'
:
txtEmailOrNoPhone.doOnTextChanged { text, start, count, after ->
if (text.toString().isEmpty()) {
buttonLogin.isEnabled = false
} else {
txtPassword.doOnTextChanged { text, start, count, after ->
buttonLogin.isEnabled = text.toString().isNotEmpty()
}
}
}
but, not work.
because, if i run app (button enable). if i type and delete all (button disable). so, i must type first and delete to (button disable)
i want : if start app