<How to pass the current view to a called method o...
# stackoverflow
u
How to pass the current view to a called method of the view model? I need to trim a text in my TextInputEditText after its text was changed. In short I need a something like this: And then in my view model: class TimetableEditorViewModel(app: Application) : AndroidViewModel(app) { var name = ObservableString("") fun afterNameChanged(view: TextInputEditText, s: Editable) { view.setText(s.trim()) } } Is it possible in the Android data binding framework?