Skip to content

Instantly share code, notes, and snippets.

@Marchuck
Created June 14, 2018 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marchuck/5d63ff4ad348a54429d584e09d1f2f61 to your computer and use it in GitHub Desktop.
Save Marchuck/5d63ff4ad348a54429d584e09d1f2f61 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="personModel"
type="pl.marchuck.pagingexample.pagination.adapter.SwapiPersonViewModel" />
</data>
<android.support.v7.widget.CardView ...>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
...
android:text="@{personModel.name}"
tools:text="Luke" />
<ImageView
...
android:genderImage="@{personModel.gender}"
/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment