<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:paddingRight="12dp"
    android:paddingTop="12dp"
    android:paddingLeft="20dp"
    android:paddingBottom="@dimen/content_padding_small">

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

        <ImageView
            android:id="@+id/item_title_iv"
            android:layout_width="@dimen/content_padding_20"
            android:layout_height="@dimen/content_padding_20"
            android:src="@mipmap/task_ing_icon"
            android:layout_marginRight="@dimen/content_padding_small"/>

        <TextView
            android:id="@+id/item_title_tv"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:text="进行中"
            android:textColor="@color/black"
            android:textSize="15dp"
            android:layout_marginBottom="13dp"/>
        <TextView
            android:id="@+id/cancel_task_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="取消任务"
            android:minWidth="@dimen/view_size_80"
            android:textColor="@color/white"
            android:textSize="@dimen/text_size_12"
            android:gravity="center"
            android:layout_marginBottom="13dp"
            android:padding="@dimen/content_padding_3"
            android:background="@drawable/sp_bg_gradient_rectangle_blue"
            android:visibility="gone"/>
    </LinearLayout>

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/task_type_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="取消任务"
            android:minWidth="@dimen/view_size_60"
            android:textColor="@color/white"
            android:textSize="@dimen/text_size_12"
            android:gravity="center"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:padding="@dimen/content_padding_3"
            android:background="@drawable/sp_bg_gradient_rectangle_blue_change"
            android:visibility="invisible"/>
        <ImageView
            android:id="@+id/item_icon_iv"
            android:layout_width="@dimen/view_size_60"
            android:layout_height="@dimen/view_size_60"
            android:src="@drawable/icon_lj"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"/>
        <TextView
            android:id="@+id/item_money"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="+10元"
            android:textSize="18dp"
            android:textColor="@color/txt_red"
            android:layout_marginTop="@dimen/content_padding_15"
            app:layout_constraintTop_toBottomOf="@+id/item_anem_tv"
            app:layout_constraintBottom_toBottomOf="@+id/item_anem_tv"
            app:layout_constraintEnd_toEndOf="parent"/>
        <TextView
            android:id="@+id/item_anem_tv"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text=""
            android:lines="2"
            android:gravity="start"
            android:ellipsize="middle"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toEndOf="@+id/item_icon_iv"
            app:layout_constraintRight_toLeftOf="@+id/task_type_tv"
            android:layout_marginStart="15dp"
            style="@style/txt_style_15"/>
        <TextView
            android:id="@+id/item_num_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text=""
            app:layout_constraintTop_toBottomOf="@+id/item_anem_tv"
            app:layout_constraintStart_toStartOf="@+id/item_anem_tv"
            android:layout_marginTop="@dimen/content_padding_small"
            android:layout_marginBottom="@dimen/content_padding_10"
            android:textSize="@dimen/text_size_12"
            android:textColor="@color/txt_black_8e8e8e"/>
        <TextView
            android:id="@+id/item_date_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text=""
            app:layout_constraintTop_toBottomOf="@+id/item_num_tv"
            app:layout_constraintStart_toStartOf="@+id/item_num_tv"
            app:layout_constraintBottom_toBottomOf="parent"
            android:textColor="@color/txt_black_8e8e8e"
            android:layout_marginTop="@dimen/content_padding_10"
            android:textSize="@dimen/text_size_12" />
        <TextView
            android:id="@+id/detail_task_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="取消任务"
            android:minWidth="@dimen/view_size_80"
            android:textColor="@color/white"
            android:textSize="@dimen/text_size_12"
            android:gravity="center"
            android:padding="@dimen/content_padding_3"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            android:layout_marginTop="@dimen/content_padding_small"
            android:layout_marginBottom="@dimen/content_padding_10"
            android:background="@drawable/sp_bg_gradient_rectangle_blue"/>
    </android.support.constraint.ConstraintLayout>

    <TextView
        android:id="@+id/countdown_tv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/sp_rectangle_bg_gray_radius"
        android:textSize="@dimen/text_size_10"
        android:textColor="@color/txt_black_8e8e8e"
        android:text="若1小时35分22秒后任务未完成，该任务自动取消，您可以重新接受该任务"
        android:padding="@dimen/content_padding_small"
        android:visibility="gone"/>
    <TextView
        android:id="@+id/line_tv"
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:background="@color/white_bg_line"
        android:layout_marginTop="@dimen/content_padding_20"/>
</LinearLayout>
