<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

    <data>

        <variable
            name="item"
            type="com.example.beijing_daxing.been.Stock" />
        <import type="android.view.View"/>
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/info_text_bg"
        android:orientation="vertical"
        android:layout_marginTop="5dp"
        android:padding="8dp">

        <TextView
            style="@style/item_text_style1"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:text="@{item.epcCode}" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginTop="2dp">

            <TextView
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:text="机位编码:" />

            <TextView
                style="@style/item_text_style"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="left|center"
                android:text="@{item.locationCode}" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginTop="2dp">

            <TextView
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:text="入场时间:" />

            <TextView
                style="@style/item_text_style"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="left|center"
                android:text="@{item.createTime}" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:visibility='@{(item.state.equals("跳过") || item.state.equals("异常")) ?View.VISIBLE : View.GONE }'
            android:layout_marginTop="2dp">

            <TextView
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:text='@{item.state+"原因:"}' />

            <TextView
                style="@style/item_text_style"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="left|center"
                android:text="@{item.remark}" />
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="2dp"
            android:layout_marginTop="2dp"
            android:background="@color/bg1" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="42dp"
            android:layout_marginTop="2dp">

            <TextView
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:text="巡检状态:" />

            <TextView
                style="@style/item_text_style"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="left|center"
                android:text="@{item.state}" />

            <View
                android:layout_width="1dp"
                android:layout_height="28dp"
                android:layout_gravity="center"
                android:layout_marginTop="2dp"
                android:background="@color/bg1" />

            <TextView
                android:id="@+id/item_check_click"
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:letterSpacing="0.5"
                android:visibility='@{item.state.equals("未检") ? View.VISIBLE :View.GONE}'
                android:text="跳过"
                android:textColor="@color/blue" />
        </LinearLayout>


    </LinearLayout>
</layout>