<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?selectable_library_drawable">

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="220dp"
        android:id="@+id/card"
        android:background="@drawable/card_background">

        <ImageView
            android:id="@+id/thumbnail"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="?android:attr/colorBackground"
            tools:background="?android:attr/colorBackground"
            tools:src="@mipmap/ic_launcher"
            tools:ignore="ContentDescription" />

        <View
            android:id="@+id/gradient"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="@drawable/gradient_shape"/>

        <android.support.constraint.ConstraintLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:layout_editor_absoluteY="7dp"
            tools:layout_editor_absoluteX="7dp">
            <TextView
                android:id="@+id/unread_text"
                style="@style/TextAppearance.Regular.Caption.Light"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/colorAccentDark"
                android:paddingBottom="1dp"
                android:paddingLeft="3dp"
                android:paddingRight="3dp"
                android:paddingTop="1dp"
                android:visibility="gone"
                tools:visibility="visible"
                tools:text="120"
                app:layout_constraintLeft_toRightOf="@+id/download_text"
                android:layout_marginLeft="4dp"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginTop="4dp"/>
            <TextView
                android:id="@+id/download_text"
                style="@style/TextAppearance.Regular.Caption.Light"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/md_red_500"
                android:paddingBottom="1dp"
                android:paddingLeft="3dp"
                android:paddingRight="3dp"
                android:paddingTop="1dp"
                android:visibility="gone"
                tools:visibility="visible"
                tools:text="120"
                app:layout_constraintLeft_toRightOf="@+id/local_text"
                android:layout_marginLeft="4dp"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginTop="4dp"/>
            <TextView
                android:id="@+id/local_text"
                style="@style/TextAppearance.Regular.Caption.Light"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/md_teal_500"
                android:paddingBottom="1dp"
                android:paddingLeft="3dp"
                android:paddingRight="3dp"
                android:paddingTop="1dp"
                android:visibility="gone"
                tools:visibility="visible"
                android:text="@string/local_source_badge"
                android:layout_marginLeft="4dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:layout_marginTop="4dp"/>
        </android.support.constraint.ConstraintLayout>

        <eu.kanade.tachiyomi.widget.PTSansTextView
            android:id="@+id/title"
            style="@style/TextAppearance.Regular.Body1.Light"
            app:typeface="ptsansNarrowBold"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:ellipsize="end"
            android:lineSpacingExtra="-4dp"
            android:maxLines="2"
            android:padding="8dp"
            android:shadowColor="@color/textColorPrimaryLight"
            android:shadowDx="0"
            android:shadowDy="0"
            android:shadowRadius="4"
            tools:text="Sample name"/>

        <ProgressBar
            android:id="@+id/progress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="?android:attr/progressBarStyleSmall"
            android:visibility="gone"
            android:layout_gravity="center"/>

    </FrameLayout>

</FrameLayout>