Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about inner view click #13

Open
coderkisoo opened this issue Nov 2, 2016 · 1 comment
Open

about inner view click #13

coderkisoo opened this issue Nov 2, 2016 · 1 comment

Comments

@coderkisoo
Copy link

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

@edvaldeysteinsson
Copy link

edvaldeysteinsson commented Nov 4, 2016

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants