<?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.work.car.detail.operations.check.CheckCarVM" />
|
</data>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
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:id="@+id/title"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="@{viewModel.carInfo.plateNumber}"
|
android:textColor="@color/gray_10"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintBottom_toTopOf="@+id/basicLayout"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/back"
|
tools:text="粤A 88934试" />
|
|
<LinearLayout
|
android:id="@+id/basicLayout"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_2"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
app:layout_constraintBottom_toBottomOf="@+id/back"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/title">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text='@{viewModel.carInfo.vehicleColor + " |"}'
|
android:textColor="@color/gray_6"
|
android:textSize="@dimen/sp_12"
|
tools:text="白色 |" />
|
|
<com.xw.common.custom.BatteryView
|
android:id="@+id/batteryView"
|
android:layout_width="@dimen/dp_23"
|
android:layout_height="@dimen/dp_11"
|
android:layout_marginStart="@dimen/dp_5"
|
app:batteryFrame="@mipmap/ic_battery"
|
app:batteryLevel="75"
|
app:showPercentage="false" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/batteryLife"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_5"
|
android:maxLines="1"
|
android:text="543KM"
|
android:textColor="@color/green_5"
|
android:textSize="@dimen/sp_11" />
|
|
</LinearLayout>
|
|
<androidx.core.widget.NestedScrollView
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_marginTop="@dimen/dp_88"
|
android:layout_marginBottom="@dimen/dp_28"
|
app:layout_constraintBottom_toTopOf="@+id/submit"
|
app:layout_constraintTop_toTopOf="parent">
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content">
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="车身自检"
|
tools:visibility="visible"
|
android:visibility="gone"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/check"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginEnd="@dimen/dp_20"
|
tools:visibility="visible"
|
android:visibility="gone"
|
android:backgroundTint="@{viewModel.btnEnableStatus==true?@color/blue_5:@color/gray_4}"
|
android:onClick="@{viewModel.onClick}"
|
android:text="@{viewModel.btnText}"
|
android:textSize="@dimen/sp_12"
|
android:textStyle="bold"
|
app:cornerRadius="@dimen/dp_4"
|
app:layout_constraintBottom_toBottomOf="@+id/tv"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv"
|
tools:text="开始自检" />
|
|
<LinearLayout
|
android:id="@+id/layout"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_8"
|
android:gravity="center_horizontal"
|
android:orientation="vertical"
|
app:layout_constraintTop_toBottomOf="@+id/check">
|
|
<!-- show="@{viewModel.checkStatus==1}"-->
|
<androidx.appcompat.widget.AppCompatTextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
tools:visibility="visible"
|
android:visibility="gone"
|
android:text="请点击右上角按钮开始车辆自检"
|
android:textColor="@color/gray_6"
|
android:textSize="@dimen/sp_12" />
|
|
<androidx.appcompat.widget.AppCompatImageView
|
android:id="@+id/icon"
|
show="@{viewModel.checkStatus==1}"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dp_10"
|
android:adjustViewBounds="true"
|
android:src="@mipmap/img_work_car1" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rvCheck"
|
show="@{viewModel.checkStatus!=1}"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_15"
|
tools:layout_height="@dimen/dp_40" />
|
|
</LinearLayout>
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv1"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="人工检测"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/layout" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/viewDetail"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginEnd="@dimen/dp_20"
|
android:padding="4dp"
|
android:text="标准说明"
|
android:onClick="@{viewModel.onClick}"
|
android:textColor="@color/blue_5"
|
android:textSize="@dimen/sp_12"
|
android:textStyle="bold"
|
app:layout_constraintBottom_toBottomOf="@+id/tv1"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv1" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv2"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="传感器清洁"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/tv1" />
|
|
<com.xw.common.custom.SlideSwitchView
|
android:id="@+id/switch1"
|
android:layout_width="@dimen/dp_110"
|
android:layout_height="@dimen/dp_36"
|
android:layout_marginEnd="@dimen/dp_20"
|
app:layout_constraintBottom_toBottomOf="@+id/tv2"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv2"
|
app:switchBackgroundColorChecked="@color/gray_3"
|
app:switchBackgroundColorUnchecked="@color/gray_3"
|
app:switchChecked="false"
|
app:switchCornerRadius="@dimen/dp_4"
|
app:switchTextChecked="检测完成"
|
app:switchTextColorChecked="@color/white"
|
app:switchTextColorUnchecked="@color/white"
|
app:switchTextSize="@dimen/sp_12"
|
app:switchTextUnchecked="待检测"
|
app:switchThumbColorChecked="@color/green_5"
|
app:switchThumbColorUnchecked="@color/gray_6"
|
app:switchThumbCornerRadius="@dimen/dp_4"
|
app:switchThumbMargin="@dimen/dp_2" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv1"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_14"
|
app:layout_constraintTop_toBottomOf="@+id/tv2"
|
tools:layout_height="@dimen/dp_40" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv3"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="车内交互屏检查"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/rv1" />
|
|
<com.xw.common.custom.SlideSwitchView
|
android:id="@+id/switch2"
|
android:layout_width="@dimen/dp_110"
|
android:layout_height="@dimen/dp_36"
|
android:layout_marginEnd="@dimen/dp_20"
|
app:layout_constraintBottom_toBottomOf="@+id/tv3"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv3"
|
app:switchBackgroundColorChecked="@color/gray_3"
|
app:switchBackgroundColorUnchecked="@color/gray_3"
|
app:switchChecked="false"
|
app:switchCornerRadius="@dimen/dp_4"
|
app:switchTextChecked="检测完成"
|
app:switchTextColorChecked="@color/white"
|
app:switchTextColorUnchecked="@color/white"
|
app:switchTextSize="@dimen/sp_12"
|
app:switchTextUnchecked="待检测"
|
app:switchThumbColorChecked="@color/green_5"
|
app:switchThumbColorUnchecked="@color/gray_6"
|
app:switchThumbCornerRadius="@dimen/dp_4"
|
app:switchThumbMargin="@dimen/dp_2" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv2"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_14"
|
app:layout_constraintTop_toBottomOf="@+id/tv3"
|
tools:layout_height="@dimen/dp_40" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv4"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="紧急求助按钮/应答机"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/rv2" />
|
|
<com.xw.common.custom.SlideSwitchView
|
android:id="@+id/switch3"
|
android:layout_width="@dimen/dp_110"
|
android:layout_height="@dimen/dp_36"
|
android:layout_marginEnd="@dimen/dp_20"
|
app:layout_constraintBottom_toBottomOf="@+id/tv4"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv4"
|
app:switchBackgroundColorChecked="@color/gray_3"
|
app:switchBackgroundColorUnchecked="@color/gray_3"
|
app:switchChecked="false"
|
app:switchCornerRadius="@dimen/dp_4"
|
app:switchTextChecked="检测完成"
|
app:switchTextColorChecked="@color/white"
|
app:switchTextColorUnchecked="@color/white"
|
app:switchTextSize="@dimen/sp_12"
|
app:switchTextUnchecked="待检测"
|
app:switchThumbColorChecked="@color/green_5"
|
app:switchThumbColorUnchecked="@color/gray_6"
|
app:switchThumbCornerRadius="@dimen/dp_4"
|
app:switchThumbMargin="@dimen/dp_2" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv3"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_14"
|
app:layout_constraintTop_toBottomOf="@+id/tv4"
|
tools:layout_height="@dimen/dp_40" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv5"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="支付功能"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/rv3" />
|
|
<com.xw.common.custom.SlideSwitchView
|
android:id="@+id/switch4"
|
android:layout_width="@dimen/dp_110"
|
android:layout_height="@dimen/dp_36"
|
android:layout_marginEnd="@dimen/dp_20"
|
app:layout_constraintBottom_toBottomOf="@+id/tv5"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv5"
|
app:switchBackgroundColorChecked="@color/gray_3"
|
app:switchBackgroundColorUnchecked="@color/gray_3"
|
app:switchChecked="false"
|
app:switchCornerRadius="@dimen/dp_4"
|
app:switchTextChecked="检测完成"
|
app:switchTextColorChecked="@color/white"
|
app:switchTextColorUnchecked="@color/white"
|
app:switchTextSize="@dimen/sp_12"
|
app:switchTextUnchecked="待检测"
|
app:switchThumbColorChecked="@color/green_5"
|
app:switchThumbColorUnchecked="@color/gray_6"
|
app:switchThumbCornerRadius="@dimen/dp_4"
|
app:switchThumbMargin="@dimen/dp_2" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv4"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_14"
|
app:layout_constraintTop_toBottomOf="@+id/tv5"
|
tools:layout_height="@dimen/dp_40" />
|
|
<androidx.appcompat.widget.AppCompatTextView
|
android:id="@+id/tv6"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginStart="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
android:text="订单系统检查"
|
android:textColor="@color/gray_9"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/rv4" />
|
|
<com.xw.common.custom.SlideSwitchView
|
android:id="@+id/switch5"
|
android:layout_width="@dimen/dp_110"
|
android:layout_height="@dimen/dp_36"
|
android:layout_marginEnd="@dimen/dp_20"
|
app:layout_constraintBottom_toBottomOf="@+id/tv6"
|
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintTop_toTopOf="@+id/tv6"
|
app:switchBackgroundColorChecked="@color/gray_3"
|
app:switchBackgroundColorUnchecked="@color/gray_3"
|
app:switchChecked="false"
|
app:switchCornerRadius="@dimen/dp_4"
|
app:switchTextChecked="检测完成"
|
app:switchTextColorChecked="@color/white"
|
app:switchTextColorUnchecked="@color/white"
|
app:switchTextSize="@dimen/sp_12"
|
app:switchTextUnchecked="待检测"
|
app:switchThumbColorChecked="@color/green_5"
|
app:switchThumbColorUnchecked="@color/gray_6"
|
app:switchThumbCornerRadius="@dimen/dp_4"
|
app:switchThumbMargin="@dimen/dp_2" />
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv5"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_14"
|
app:layout_constraintTop_toBottomOf="@+id/tv6"
|
tools:layout_height="@dimen/dp_40" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1px"
|
android:layout_marginBottom="@dimen/dp_12"
|
android:background="@color/gray_4"
|
app:layout_constraintBottom_toTopOf="@+id/submit" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/submit"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_24"
|
android:layout_marginBottom="@dimen/dp_12"
|
android:backgroundTint="@color/blue_5"
|
android:text="提交检测结果"
|
android:onClick="@{viewModel.onClick}"
|
android:textSize="@dimen/sp_16"
|
android:textStyle="bold"
|
app:cornerRadius="@dimen/dp_4"
|
app:layout_constraintBottom_toBottomOf="parent" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
</layout>
|