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