Created
September 25, 2015 22:20
-
-
Save ivacf/cb195470b5ba07246333 to your computer and use it in GitHub Desktop.
Android layout file that uses data binding to load a image 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" | |
xmlns:app="http://schemas.android.com/apk/res-auto" > | |
<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" | |
app:imageUrl="@{viewModel.imageUrl}" /> | |
</RelativeLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment