Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Created January 20, 2019 09:57
Show Gist options
  • Save IhwanID/4fa846fd5b8dc61c5a83af140cd41e38 to your computer and use it in GitHub Desktop.
Save IhwanID/4fa846fd5b8dc61c5a83af140cd41e38 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:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="itemMovie"
type="id.ihwan.aac.viewmodel.ItemMovieViewModel"/>
</data>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:layout_margin="8dp">
<LinearLayout android:orientation="horizontal"
android:layout_margin="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/poster"
tools:text="Title Movie"
android:layout_width="75dp"
android:layout_height="75dp"
app:loadImage="@{itemMovie.poster}"
android:src="@color/colorAccent"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:layout_margin="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{itemMovie.title}"
tools:text="Title Movie"/>
<TextView
android:id="@+id/date"
android:layout_margin="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{itemMovie.date}"
tools:text="Title Movie"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment