<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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:id="@+id/milestoneFrame"
    android:background="?attr/primaryBackgroundColor"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:id="@+id/milestoneId" />

    <TextView
        android:id="@+id/milestoneStatus"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        tools:visibility="visible" />

    <LinearLayout
        android:id="@+id/mainFrame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_margin="15dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/frameTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/milestoneTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0"
                android:textColor="?attr/primaryTextColor"
                android:textIsSelectable="true"
                android:textSize="18sp" />

            <ProgressBar
                android:id="@+id/milestoneProgress"
                style="@style/Widget.AppCompat.ProgressBar.Horizontal"
                android:layout_width="0dp"
                android:layout_height="10dp"
                android:layout_marginStart="15dp"
                android:layout_marginEnd="10dp"
                android:layout_weight="1"
                android:indeterminate="false"
                android:progress="50"
                android:progressDrawable="@drawable/progress_bar"
                android:progressTint="@color/btnBackground" />

        </LinearLayout>

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

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginEnd="15dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:layout_width="18dp"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:contentDescription="@string/generalImgContentText"
                    app:srcCompat="@drawable/ic_calendar" />

                <TextView
                    android:id="@+id/milestoneDueDate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/dueDate"
                    android:textColor="?attr/primaryTextColor"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginEnd="15dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:layout_width="18dp"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:contentDescription="@string/generalImgContentText"
                    app:srcCompat="@drawable/ic_issue" />

                <TextView
                    android:id="@+id/milestoneIssuesOpen"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/repoStars"
                    android:textColor="?attr/primaryTextColor"
                    android:textSize="14sp" />
            </LinearLayout>

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

                <ImageView
                    android:layout_width="18dp"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:contentDescription="@string/generalImgContentText"
                    app:srcCompat="@drawable/ic_issue_closed" />

                <TextView
                    android:id="@+id/milestoneIssuesClosed"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/repoWatchers"
                    android:textColor="?attr/primaryTextColor"
                    android:textSize="14sp" />
            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/milestoneDateMenuFrame"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:orientation="horizontal">

            <RelativeLayout
                android:id="@+id/dueDateFrame"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="3dp"
                android:layout_weight=".90"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/milestoneDescription"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/repoDescription"
                    android:textColor="?attr/primaryTextColor"
                    android:textIsSelectable="true"
                    android:textSize="14sp"
                    android:visibility="visible" />

            </RelativeLayout>

            <ImageView
                android:id="@+id/milestonesMenu"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="end|bottom"
                android:layout_weight=".10"
                android:contentDescription="@string/menuContentDesc"
                android:scaleType="fitEnd"
                android:src="@drawable/ic_dotted_menu_horizontal" />

        </LinearLayout>

    </LinearLayout>

    <View
        android:layout_below="@id/mainFrame"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:id="@+id/divider"
        android:background="?attr/dividerColor" />

</RelativeLayout>
