radzio/android-data-binding-recyclerview

about inner view click

coderkisoo opened this issue · 1 comments

I want to click the inner view,and I try to change the moduel.finally i failed.

you could do this

Set this on the view you want to be clickable

android:onClick="firstNameClickHandler"
android:tag="@{user}" // the viewmodel variable

and then in your activity

public void firstNameClickHandler(View v) {
    UserViewModel userViewModel = (UserViewModel)v.getTag();
}