I am new to mvvmcross. In my xamarin android app, I want to change a buttons background image when the user clicks on it. I am not sure how this binding can be done. Can some one help me please.
2
votes
1 Answers
1
votes
You can bind any background image with DrawableId and DrawableName:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
local:MvxBind="DrawableId TheIntOfTheResource; Click SomeCommand" />
In SomeCommand you can change the id of TheIntOfTheResource which you bind to, so the image gets changed.