Created
September 24, 2015 23:08
-
-
Save ivacf/4f5212319cb1b1ed6f67 to your computer and use it in GitHub Desktop.
Android layout that uses data binding to load a drawable into an ImageView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<data> | |
<variable | |
name="viewModel" | |
type="uk.ivanc.imagedatabinding.ProfileViewModel" /> | |
</data> | |
<RelativeLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:layout_width="200dp" | |
android:layout_height="200dp" | |
android:src="@{viewModel.profileImage}"/> | |
</RelativeLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment