Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
watch_card.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="8dp"
android:elevation="3dp"
card_view:cardCornerRadius="2dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<ImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="16dp"
android:clickable="true"
android:scaleType="centerInside" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/thumbnail"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:textColor="@color/textColorPrimary"
android:textSize="14sp" />
<TextView
android:id="@+id/count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:textColor="@color/textColorSecondary"
android:textSize="12sp" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@id/thumbnail"
android:scaleType="centerCrop"
android:src="@drawable/ic_dots" />
</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