<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2018.
  ~
  ~ This file is part of MovieDB.
  ~
  ~ MovieDB is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ MovieDB is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with MovieDB.  If not, see <http://www.gnu.org/licenses/>.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <android.support.v7.widget.CardView
        android:id="@+id/cardView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="6dip">

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">

            <android.support.percent.PercentRelativeLayout
                android:id="@+id/imagePercentLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

                <ImageView
                    android:id="@+id/image"
                    android:contentDescription="@string/image_description"
                    android:scaleType="centerCrop"
                    app:layout_aspectRatio="70%"
                    app:layout_widthPercent="100%" />

            </android.support.percent.PercentRelativeLayout>

            <TextView
                android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/imagePercentLayout"
                android:background="@color/colorWhite"
                android:ellipsize="marquee"
                android:paddingBottom="4dip"
                android:paddingLeft="2dip"
                android:paddingStart="2dip"
                android:paddingTop="4dip"
                android:singleLine="true"
                android:textColor="@color/colorBlack"
                android:textStyle="bold" />
        </RelativeLayout>

        <View
            android:id="@+id/categoryColor"
            android:layout_width="match_parent"
            android:layout_height="3dip"
            android:layout_gravity="bottom"
            android:background="@color/colorGreen"
            android:visibility="gone" />

    </android.support.v7.widget.CardView>

</LinearLayout>