<?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="adapter"
            type="com.example.beijing_daxing.adapter.CheckListAdapter" />

        <variable
            name="state"
            type="androidx.databinding.ObservableBoolean" />
        <import type="android.view.View"/>
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"

        tools:context=".CheckListActivity">

        <TextView
            style="@style/title_text"
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:letterSpacing="0"
            android:text="待巡检机位列表" />
        <LinearLayout
            android:layout_width="match_parent"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:layout_height="45dp">
            <TextView
                android:layout_width="110dp"
                android:layout_height="match_parent"
                style="@style/info_text"
                android:text="巡检状态："/>
            <Spinner
                android:id="@+id/check_list_state"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:textAlignment="center"
                android:spinnerMode="dropdown"
                android:entries="@array/checkState"/>
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:layout_height="45dp">

            <TextView
                android:id="@+id/item_index"
                style="@style/item_text_style"
                android:layout_width="40dp"
                android:layout_height="match_parent"
                android:text="序号"
                />

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


            <TextView
                style="@style/item_text_style"
                android:layout_width="115dp"
                android:layout_height="match_parent"

                android:text="机坪"
                />

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


            <TextView
                style="@style/item_text_style"
                android:layout_width="115dp"
                android:layout_height="match_parent"
                android:text="机位编码(点击)"
                />

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

            <TextView

                style="@style/item_text_style"
                android:layout_width="63dp"
                android:layout_height="match_parent"
                android:text="状态" />
              <View
                android:layout_width="2dp"
                android:layout_height="match_parent"
                android:background="@color/white" />

            <TextView

                style="@style/item_text_style"
                android:layout_width="63dp"
                android:layout_height="match_parent"
                android:text="跳过" />

        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:adapter="@{adapter}"
            android:padding="5dp"
            android:layout_weight="1"
            android:background="@color/white"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

        <Button
            style="@style/button_style"
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:layout_margin="15dp"
            android:onClick="check_start"
            android:text="创建巡检列表"
            android:visibility="@{state?View.VISIBLE:View.GONE}" />
    </LinearLayout>
</layout>