<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    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:layout_margin="@dimen/spacing_micro"
    app:cardBackgroundColor="?card_background"
    app:cardCornerRadius="@dimen/spacing_micro">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="@dimen/spacing_normal"
        android:paddingTop="@dimen/spacing_normal">

        <LinearLayout
            android:id="@+id/toggleHolder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/spacing_micro"
            android:orientation="horizontal">

            <com.fastaccess.ui.widgets.ForegroundImageView
                android:id="@+id/stateImage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="top"
                android:layout_marginEnd="@dimen/avatar_margin"
                android:layout_marginStart="@dimen/avatar_margin"
                android:minHeight="24dp"
                android:minWidth="24dp"
                android:paddingBottom="@dimen/spacing_normal"
                android:paddingTop="@dimen/spacing_normal"
                android:scaleType="centerCrop"
                tools:src="@drawable/ic_issue_opened"/>

            <com.fastaccess.ui.widgets.FontTextView
                android:id="@+id/name"
                style="@style/TextAppearance.AppCompat.Small"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginEnd="@dimen/spacing_normal"
                android:layout_weight="1"
                android:ellipsize="end"
                android:maxLines="2"
                android:paddingBottom="@dimen/spacing_normal"
                android:paddingTop="@dimen/spacing_normal"
                android:textColor="?android:textColorPrimary"
                tools:text="When one acquires"/>

            <com.fastaccess.ui.widgets.ForegroundImageView
                android:id="@+id/toggle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="top"
                android:background="?selectableItemBackgroundBorderless"
                android:padding="@dimen/spacing_micro"
                android:src="@drawable/ic_arrow_drop_down"/>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/minimized"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:visibility="gone"
            tools:visibility="visible">

            <com.fastaccess.ui.widgets.FontTextView
                android:id="@+id/patch"
                style="@style/TextAppearance.AppCompat.Small"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginEnd="@dimen/spacing_xs_large"
                android:layout_marginStart="@dimen/avatar_margin"
                android:background="@drawable/bottom_border"
                android:paddingBottom="@dimen/spacing_normal"
                tools:text="..."/>

            <com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView
                android:id="@+id/nestedRecyclerView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/spacing_normal"
                android:orientation="vertical"
                android:visibility="gone"
                app:layoutManager="@string/staggered_layout_manager"
                app:spanCount="@integer/micro_spans"/>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="?dividerColor"/>

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

                <com.fastaccess.ui.widgets.FontTextView
                    android:id="@+id/addCommentPreview"
                    style="@style/TextAppearance.AppCompat.Subhead"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@color/transparent"
                    android:drawableEnd="@drawable/ic_comment"
                    android:drawablePadding="@dimen/spacing_normal"
                    android:gravity="start|center"
                    android:layout_gravity="center"
                    android:hint="@string/add_comment"
                    android:paddingBottom="@dimen/spacing_normal"
                    android:paddingEnd="@dimen/spacing_xs_large"
                    android:paddingStart="@dimen/spacing_xs_large"
                    android:paddingTop="@dimen/spacing_xs_large"/>

                <com.fastaccess.ui.widgets.ForegroundImageView
                    android:id="@+id/bottomToggle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginEnd="@dimen/spacing_micro"
                    android:background="?selectableItemBackgroundBorderless"
                    android:padding="@dimen/spacing_micro"
                    android:src="@drawable/ic_arrow_drop_down"/>

            </LinearLayout>


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