<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    style="?attr/cardStyle"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="@dimen/card_vertical_margin"
    android:layout_marginEnd="@dimen/card_horizontal_margin"
    android:layout_marginStart="@dimen/card_horizontal_margin"
    android:layout_marginTop="@dimen/card_vertical_margin"
    android:minHeight="?android:attr/listPreferredItemHeight"
    card_view:cardCornerRadius="@dimen/card_corner_radius"
    card_view:cardElevation="@dimen/card_elevation">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?android:attr/listPreferredItemHeight"
        android:padding="@dimen/card_layout_padding">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical">

            <TextView
                android:id="@+id/title"
                android:layout_width="@dimen/card_textview_width"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_alignParentTop="true"
                android:layout_marginTop="0dp"
                android:maxLines="1"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textIsSelectable="false"/>

            <TextView
                android:id="@+id/version_name"
                android:layout_width="@dimen/card_textview_width"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_below="@id/title"
                android:text="@string/no_info_provided"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="@android:color/tertiary_text_dark"
                android:textIsSelectable="false"
                android:textStyle="bold|italic"/>

            <TextView
                android:id="@+id/author"
                android:layout_width="@dimen/card_textview_width"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_below="@id/version_name"
                android:text="@string/no_info_provided"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="@android:color/tertiary_text_dark"
                android:textIsSelectable="false"
                android:textStyle="bold|italic"/>

            <TextView
                android:id="@+id/description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_below="@id/author"
                android:layout_gravity="center_vertical"
                android:text="@string/no_info_provided"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textIsSelectable="false"/>

            <ImageView
                android:id="@+id/update"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBaseline="@id/title"
                android:layout_alignParentEnd="true"
                android:layout_gravity="end"
                android:background="@drawable/ic_file_download_black"
                android:backgroundTint="@color/icon_grey"
                android:focusable="false"
                android:gravity="end"/>


            <LinearLayout
                android:id="@+id/expand_layout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_below="@id/description"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:orientation="horizontal">

                    <ImageView
                        android:id="@+id/changeLog"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/card_imageview_margin"
                        android:layout_marginStart="@dimen/card_imageview_margin"
                        android:background="?android:attr/selectableItemBackground"
                        android:padding="15dp"
                        android:src="@drawable/ic_changelog"
                        android:tint="@color/icon_grey"/>

                    <ImageView
                        android:id="@+id/authorLink"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/card_imageview_margin"
                        android:layout_marginStart="@dimen/card_imageview_margin"
                        android:background="?android:attr/selectableItemBackground"
                        android:padding="15dp"
                        android:src="@drawable/ic_person"
                        android:tint="@color/icon_grey"/>

                    <ImageView
                        android:id="@+id/supportLink"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/card_imageview_margin"
                        android:layout_marginStart="@dimen/card_imageview_margin"
                        android:background="?android:attr/selectableItemBackground"
                        android:padding="15dp"
                        android:src="@drawable/ic_help"
                        android:tint="@color/icon_grey"/>

                </LinearLayout>

            </LinearLayout>


        </RelativeLayout>

        <ImageView
            android:id="@+id/installed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/card_imageview_margin"
            android:layout_marginStart="@dimen/card_imageview_margin"
            android:focusable="false"
            android:gravity="end"
            android:visibility="gone"/>

    </RelativeLayout>


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


