<?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">

    <data>
        <variable
            name="item"
            type="com.example.tyre.maintenance.been.Order" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/item_order_layout"
        android:layout_width="match_parent"
        android:layout_height="115dp"
        android:layout_marginTop="12dp"
        android:background="@drawable/card_bg">

        <TextView
            android:id="@+id/textView"
            android:layout_width="wrap_content"
            android:layout_height="40dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:gravity="center"
            android:text="@{item.plateNumber}"
            android:textColor="@color/textColor1"
            android:textSize="20sp"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/textView3"
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:layout_marginStart="12dp"
            android:gravity="center|left"
            android:text="@{item.typeName}"
            android:textColor="@color/textColor2"
            android:textSize="16sp"

            app:layout_constraintBottom_toBottomOf="@+id/textView"
            app:layout_constraintStart_toEndOf="@+id/textView" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="12dp"
            android:background="@drawable/item_bg_1"
            android:gravity="center"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:text='@{"操作人\t"+item.createBy}'
            android:textColor="@color/textColor2"
            android:textSize="16sp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/textView" />

        <TextView
            android:layout_width="100dp"
            android:layout_height="45dp"
            android:layout_marginEnd="16dp"
            android:background="@drawable/bg_order_state_selector"
            android:gravity="center"
            android:letterSpacing="0.1"
            android:text='@{item.status.equals("COMPLETED")?"已完成":"未完成"}'
            android:selected='@{item.status.equals("COMPLETED")}'
            android:textColor="@color/white"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>