<?xml version="1.0" encoding="utf-8"?>
|
<layout 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">
|
|
<data>
|
|
<variable
|
name="viewModel"
|
type="com.xw.yunwei.ui.task.accident.detail.AccidentDetailVM" />
|
|
</data>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:id="@+id/parentLayout"
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:background="@color/white">
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:id="@+id/back"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_56"
|
android:onClick="@{viewModel::onBack}"
|
android:src="@drawable/svg_back"
|
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="@{viewModel.title}"
|
android:textColor="@color/gray_10"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintBottom_toBottomOf="@+id/back"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/back"
|
tools:text="待到达" />
|
|
<ScrollView
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_marginTop="@dimen/dp_88"
|
android:fillViewport="true"
|
android:scrollbars="none"
|
app:layout_constraintBottom_toTopOf="@+id/bottomLayout"
|
app:layout_constraintTop_toTopOf="parent">
|
|
<RelativeLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content">
|
|
<androidx.appcompat.widget.AppCompatImageView
|
show="@{viewModel.taskDetail.status!=1}"
|
src="@{viewModel.topBgId}"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:adjustViewBounds="true"
|
android:scaleType="fitXY"
|
app:layout_constraintTop_toTopOf="parent"
|
tools:src="@mipmap/img_accident_top_bg_blue" />
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:paddingHorizontal="@dimen/dp_20"
|
android:paddingTop="@dimen/dp_16">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="@dimen/dp_24"
|
android:gravity="center_vertical"
|
android:orientation="horizontal">
|
|
<androidx.appcompat.widget.AppCompatImageView
|
src="@{viewModel.levelId}"
|
android:layout_width="@dimen/dp_33"
|
android:layout_height="@dimen/dp_20"
|
tools:src="@mipmap/ic_accident_one" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_4"
|
android:layout_weight="1"
|
android:text="@{viewModel.taskDetail.plateNumber}"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
tools:text="粤P·XV7029试" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_30"
|
android:background="@drawable/shape_gray_3_bg_4"
|
android:paddingHorizontal="@dimen/dp_8"
|
android:paddingVertical="@dimen/dp_4"
|
android:text="@{viewModel.taskDetail.vehicleColor}"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_12"
|
tools:text="白色" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_8"
|
android:background="@drawable/shape_gray_3_bg_4"
|
android:paddingHorizontal="@dimen/dp_8"
|
android:paddingVertical="@dimen/dp_4"
|
android:text='@{"车身编码:" + viewModel.taskDetail.vehicleCode}'
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_12"
|
tools:text="车身编码:01234" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
show="@{!viewModel.isTimeOut && viewModel.taskDetail.status == 0}"
|
android:layout_width="match_parent"
|
android:layout_height="@dimen/dp_98"
|
android:layout_marginTop="@dimen/dp_14"
|
android:gravity="center"
|
android:orientation="vertical">
|
|
<LinearLayout
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="@dimen/dp_38"
|
android:layout_height="@dimen/dp_30"
|
android:background="@{viewModel.showRed?@drawable/shape_fa3e3e_bg_4:@drawable/shape_blue_5_bg_4}"
|
android:gravity="center"
|
android:text="@{viewModel.hour}"
|
android:textColor="@color/white"
|
android:textSize="@dimen/sp_20"
|
android:textStyle="bold"
|
tools:background="@drawable/shape_blue_5_bg_4"
|
tools:text="11" />
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:layout_width="@dimen/dp_4"
|
android:layout_height="@dimen/dp_24"
|
android:layout_marginHorizontal="@dimen/dp_3"
|
android:layout_marginTop="@dimen/dp_3"
|
src="@{viewModel.icon1}"
|
tools:src="@mipmap/ic_task_item_colon_b" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="@dimen/dp_38"
|
android:layout_height="@dimen/dp_30"
|
android:background="@{viewModel.showRed?@drawable/shape_fa3e3e_bg_4:@drawable/shape_blue_5_bg_4}"
|
android:gravity="center"
|
android:text="@{viewModel.minutes}"
|
android:textColor="@color/white"
|
android:textSize="@dimen/sp_20"
|
android:textStyle="bold"
|
tools:background="@drawable/shape_blue_5_bg_4"
|
tools:text="33" />
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:layout_width="@dimen/dp_4"
|
android:layout_height="@dimen/dp_24"
|
android:layout_marginHorizontal="@dimen/dp_3"
|
src="@{viewModel.icon1}"
|
android:layout_marginTop="@dimen/dp_3"
|
tools:src="@mipmap/ic_task_item_colon_b" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="@dimen/dp_38"
|
android:layout_height="@dimen/dp_30"
|
android:background="@{viewModel.showRed?@drawable/shape_fa3e3e_bg_4:@drawable/shape_blue_5_bg_4}"
|
android:gravity="center"
|
android:text="@{viewModel.second}"
|
android:textColor="@color/white"
|
android:textSize="@dimen/sp_20"
|
android:textStyle="bold"
|
tools:background="@drawable/shape_blue_5_bg_4"
|
tools:text="09" />
|
|
</LinearLayout>
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_5"
|
android:text="倒计时结束前,务必到达现场"
|
android:textColor="@color/blue_5"
|
android:textSize="@dimen/sp_14" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
show="@{viewModel.isTimeOut && viewModel.taskDetail.status == 0}"
|
android:layout_width="match_parent"
|
android:layout_height="@dimen/dp_98"
|
android:layout_marginTop="@dimen/dp_14"
|
android:gravity="center"
|
android:orientation="vertical">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:gravity="center"
|
android:text="已超时!"
|
android:textColor="#ffEC5340"
|
android:textSize="@dimen/sp_20"
|
android:textStyle="bold" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_8"
|
android:gravity="center"
|
android:text="系统已自动通知相关负责人,请尽快处理该事故单!"
|
android:textColor="#ffEC5340"
|
android:textSize="@dimen/sp_14"
|
android:textStyle="bold" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_12"
|
android:background="@mipmap/img_map"
|
android:minHeight="@dimen/dp_58">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_gravity="center_vertical"
|
android:layout_marginStart="@dimen/dp_12"
|
android:layout_weight="1"
|
android:text="@{viewModel.taskDetail.vehicleLocation}"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_14"
|
android:textStyle="bold"
|
tools:text="点击导航至定位地点" />
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:id="@+id/nav"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_gravity="end|center_vertical"
|
android:layout_margin="@dimen/dp_12"
|
android:src="@drawable/svg_map_nav" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_12"
|
android:orientation="vertical">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingVertical="@dimen/dp_6">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="车辆VIN码"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_16"
|
android:layout_weight="1"
|
android:ellipsize="end"
|
android:gravity="end"
|
android:maxLines="1"
|
android:singleLine="true"
|
android:text="@{String.valueOf(viewModel.taskDetail.vehicleVin)}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14"
|
tools:text="LINSPGHB2LA004618" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingVertical="@dimen/dp_6">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="详细地址"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_16"
|
android:layout_weight="1"
|
android:gravity="end"
|
android:singleLine="true"
|
android:text="@{viewModel.taskDetail.vehicleLocation}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14"
|
tools:text="深圳市南山区南大街龙葵小区7栋1701" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingVertical="@dimen/dp_6">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="事故单号"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_16"
|
android:layout_weight="1"
|
android:ellipsize="end"
|
android:gravity="end"
|
android:maxLines="1"
|
android:singleLine="true"
|
android:text="@{viewModel.taskDetail.taskCode}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14"
|
tools:text="331483672472134" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingVertical="@dimen/dp_6">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="创建时间"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_16"
|
android:layout_weight="1"
|
android:ellipsize="end"
|
android:gravity="end"
|
android:maxLines="1"
|
android:singleLine="true"
|
android:text="@{viewModel.taskDetail.createTime}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14"
|
tools:text="2026-1-25 17:43:02" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingVertical="@dimen/dp_6">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="创建人"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_16"
|
android:layout_weight="1"
|
android:ellipsize="end"
|
android:gravity="end"
|
android:maxLines="1"
|
android:singleLine="true"
|
android:text="@{viewModel.taskDetail.createBy}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_14"
|
tools:text="沐沐磊" />
|
|
</LinearLayout>
|
|
<!-- show="@{viewModel.taskDetail.status == 1}"-->
|
<LinearLayout
|
android:baselineAligned="false"
|
android:visibility="gone"
|
tools:visibility="visible"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
|
<LinearLayout
|
android:id="@+id/unlockDoor"
|
android:layout_width="0dp"
|
android:layout_height="@dimen/dp_48"
|
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginEnd="@dimen/dp_6"
|
android:layout_weight="1"
|
android:background="@drawable/shape_blue1_bg_4"
|
android:gravity="center"
|
android:onClick="@{viewModel.onClick}"
|
android:orientation="horizontal"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintRight_toLeftOf="@+id/unlockBox"
|
app:layout_constraintTop_toBottomOf="@+id/icon">
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:src="@drawable/svg_car_cmjs"
|
android:tint="@color/blue_5" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginEnd="@dimen/dp_20"
|
android:layout_weight="1"
|
android:gravity="center"
|
android:text="车门解锁"
|
android:textColor="@color/blue_5"
|
android:textSize="@dimen/sp_14" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:id="@+id/unlockBox"
|
android:layout_width="0dp"
|
android:layout_height="@dimen/dp_48"
|
android:layout_marginStart="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_12"
|
android:layout_weight="1"
|
android:background="@drawable/shape_blue1_bg_4"
|
android:gravity="center"
|
android:onClick="@{viewModel.onClick}"
|
android:orientation="horizontal"
|
app:layout_constraintLeft_toRightOf="@+id/unlockDoor"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/icon">
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:src="@drawable/svg_car_hbxjs"
|
android:tint="@color/blue_5" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_marginEnd="@dimen/dp_20"
|
android:layout_weight="1"
|
android:gravity="center"
|
android:text="后备箱解锁"
|
android:textColor="@color/blue_5"
|
android:textSize="@dimen/sp_14" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1px"
|
android:layout_marginVertical="@dimen/dp_12"
|
android:background="@color/gray_4" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="事故类型"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold" />
|
|
<LinearLayout
|
android:id="@+id/accidentLayout"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_8"
|
android:gravity="center_vertical"
|
android:orientation="vertical">
|
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1px"
|
android:layout_marginVertical="@dimen/dp_8"
|
android:background="@color/gray_4" />
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_8"
|
android:text="事故描述"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_8"
|
android:text="@{viewModel.taskDetail.taskDescription}"
|
android:textColor="@color/gray_7"
|
android:textSize="@dimen/sp_16"
|
tools:text="事故描述事故描述事故描述事故描述事故描述事故描述事故描述事故描述" />
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1px"
|
android:layout_marginVertical="@dimen/dp_8"
|
android:background="@color/gray_4" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginBottom="@dimen/dp_16" />
|
|
</LinearLayout>
|
|
</RelativeLayout>
|
|
</ScrollView>
|
|
<RelativeLayout
|
android:id="@+id/bottomLayout"
|
show="@{viewModel.actionPermissions}"
|
android:layout_width="match_parent"
|
android:layout_height="@dimen/dp_66"
|
android:background="@color/white"
|
app:layout_constraintBottom_toBottomOf="parent">
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1px"
|
android:background="@color/gray_4" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tvControl"
|
android:layout_width="match_parent"
|
android:layout_height="@dimen/dp_40"
|
android:layout_centerVertical="true"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:background="@drawable/shape_blue_5_bg_4"
|
android:gravity="center"
|
android:onClick="@{viewModel.onClick}"
|
android:text="@{viewModel.actionName}"
|
android:textColor="@color/white"
|
android:textSize="@dimen/sp_16"
|
tools:text="事故处理" />
|
|
</RelativeLayout>
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</layout>
|