<?xml version="1.0" encoding="utf-8"?>
|
<android.support.constraint.ConstraintLayout
|
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:orientation="horizontal"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:background="?android:attr/selectableItemBackground">
|
|
<LinearLayout
|
android:id="@+id/ll_1"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
app:layout_constraintTop_toTopOf="parent"
|
tools:ignore="RtlSymmetry">
|
|
<android.support.v7.widget.CardView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dimen16"
|
android:layout_marginBottom="@dimen/dimen8"
|
android:layout_marginTop="@dimen/dimen8"
|
android:elevation="@dimen/dimen4"
|
app:cardCornerRadius="@dimen/dimen4"
|
tools:ignore="UnusedAttribute">
|
<ImageView
|
android:id="@+id/img_task_status"
|
android:layout_width="20dp"
|
android:layout_height="20dp"
|
android:layout_gravity="end"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
android:background="@drawable/shape_task_status" />
|
<android.support.constraint.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
android:gravity="center_vertical"
|
android:paddingLeft="@dimen/dimen8"
|
android:paddingRight="@dimen/dimen8"
|
android:paddingTop="10dp"
|
android:paddingBottom="10dp"
|
android:visibility="visible">
|
|
<TextView
|
android:id="@+id/txt_type"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
tools:text="巡查"
|
style="@style/TextStyle.Tag"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"/>
|
|
<TextView
|
android:id="@+id/tv_item_task_list_name"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:minLines="2"
|
android:maxLines="2"
|
android:ellipsize="end"
|
style="@style/TextStyle.Title"
|
tools:text="任务名称"
|
android:layout_marginStart="@dimen/dimen4"
|
app:layout_constraintTop_toTopOf="@id/txt_type"
|
app:layout_constraintStart_toEndOf="@id/txt_type"
|
app:layout_constraintEnd_toEndOf="parent"/>
|
|
<TextView
|
android:id="@+id/tv_item_task_list_address"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
tools:text="任务地点"
|
style="@style/TextStyle.Abstract"
|
android:layout_marginTop="@dimen/dimen4"
|
app:layout_constraintTop_toBottomOf="@id/tv_item_task_list_name"
|
app:layout_constraintStart_toStartOf="@id/tv_item_task_list_name"
|
app:layout_constraintEnd_toEndOf="parent"/>
|
|
<ImageView
|
android:id="@+id/img_task_time"
|
android:layout_width="@dimen/dimen16"
|
android:layout_height="@dimen/dimen16"
|
android:src="@drawable/ic_clock_light_green_a700_36dp"
|
android:layout_marginTop="@dimen/dimen4"
|
app:layout_constraintTop_toBottomOf="@id/tv_item_task_list_address"
|
app:layout_constraintStart_toStartOf="@id/tv_item_task_list_name" />
|
<TextView
|
android:id="@+id/tv_item_task_list_time"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:visibility="visible"
|
android:textSize="12sp"
|
tools:text="任务时间"
|
app:layout_constraintTop_toTopOf="@id/img_task_time"
|
app:layout_constraintStart_toEndOf="@id/img_task_time"
|
app:layout_constraintEnd_toEndOf="parent"/>
|
|
|
<TextView
|
android:id="@+id/tv_item_task_list_status"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:visibility="gone"
|
tools:text="未完成"
|
android:singleLine="true"
|
android:textColor="@color/colorAccent"
|
app:layout_constraintHorizontal_bias="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
</android.support.constraint.ConstraintLayout>
|
</android.support.v7.widget.CardView>
|
|
<TextView
|
android:id="@+id/text_delete"
|
android:layout_width="100dp"
|
android:layout_height="match_parent"
|
android:layout_marginBottom="@dimen/dimen8"
|
android:layout_marginTop="@dimen/dimen8"
|
android:text="删除"
|
android:tag="swipe_del"
|
android:textColor="@android:color/white"
|
android:gravity="center_horizontal|center_vertical"
|
android:textSize="@dimen/textSize_16"
|
android:background="@android:color/holo_red_dark" />
|
</LinearLayout>
|
|
</android.support.constraint.ConstraintLayout>
|