<?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="title"
            type="String" />
        <variable
            name="adapter"
            type="com.example.jinyu_rfid.adapter.ConfigurationTableAdapter" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".ConfigurationTableActivity">

        <include
            layout="@layout/toolbar"
            app:title='@{title}' />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="44dp"
            android:layout_marginTop="2dp"
            android:layout_marginStart="5dp"
            android:layout_marginEnd="5dp"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/item_index"
                style="@style/item_text_style"
                android:layout_width="60dp"
                android:layout_height="match_parent"
                android:text="@string/write_index" />

            <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="@string/write_state" />

            <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="match_parent"
                android:layout_weight="1"
                android:text="@string/write_project" />


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


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_margin="15dp">

<!--            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginEnd="8dp"
                android:layout_weight="1"
                android:textSize="18sp"
                android:onClick="configurationAddItem"
                android:text="@string/configuration_add" />-->

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginStart="8dp"
                android:textSize="18sp"
                android:layout_weight="1"
                android:onClick="configurationSave"
                android:text="@string/configuration_save" />
        </LinearLayout>
    </LinearLayout>
</layout>