In Yigit Boyar and George Mount\'s talk on Android Databinding they illustrate how easy it is to bind to TextWatcher\'s onTextChanged (at 13:41). O
If you just need text parameter after text has changed, you could use android:afterTextChanged binding adapter. for example:
android:afterTextChanged="@{(text) -> viewModel.onTextChange(text)}"
Then in your ViewModel just implement like this:
fun onTextChange(editable: Editable?) {
Log.d("TAG","New text: ${editable.toString()}")
}
Furthermore, there is android:beforeTextChanged which used to know old text before text change event, usage is same as android:afterTextChanged.