Skip to content

Instantly share code, notes, and snippets.

@TristanWiley
Created September 30, 2015 18:07
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 TristanWiley/93ac4a9b86621ba44b8c to your computer and use it in GitHub Desktop.
Save TristanWiley/93ac4a9b86621ba44b8c to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:elevation="@dimen/cardview_default_elevation"
android:id="@+id/cv"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="128dp"
android:id="@+id/book_thumbnail"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:adjustViewBounds="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/book_title"
android:layout_toEndOf="@+id/book_thumbnail"
android:layout_toRightOf="@+id/book_thumbnail"
android:layout_alignParentTop="true"
android:textSize="30sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/book_thumbnail"
android:layout_toRightOf="@+id/book_thumbnail"
android:layout_below="@+id/book_title"
android:id="@+id/book_author"
/>
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/ratingBarStyleIndicator"
android:id="@+id/book_rating"
android:layout_toEndOf="@+id/book_thumbnail"
android:layout_toRightOf="@+id/book_thumbnail"
android:layout_below="@+id/book_author"
/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment