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

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:background='@{item.state.equals("Y")?@color/green:@color/item_bg}'
        android:orientation="horizontal">

        <TextView
            android:id="@+id/item_index"
            style="@style/item_text_style"
            android:layout_width="40dp"
            android:layout_height="match_parent"
            android:text='@{String.valueOf(item.index)}' />

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



            <TextView
                style="@style/item_text_style"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:minHeight="45dp"
                android:layout_weight="1"
                android:text="@{item.epcCode}" />



        <View
            android:layout_width="2dp"
            android:layout_height="match_parent"
            android:background="@color/white" />
            <TextView
                style="@style/item_text_style"
                android:layout_width="100dp"
                android:layout_height="match_parent"
                android:text="@{item.locationCode}" />








    </LinearLayout>
</layout>