<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:binding="http://schemas.android.com/apk/res-auto">

    <data>

        <import type="me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter" />

        <import type="me.goldze.mvvmhabit.binding.viewadapter.recyclerview.LayoutManagers" />

        <variable
            name="viewModel"
            type="com.phlx.anchorcollect.ui.setting.SettingVM" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@mipmap/home_bg">

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/guideline_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            binding:layout_constraintGuide_percent="0.60" />

        <androidx.appcompat.widget.LinearLayoutCompat
            android:id="@+id/ll_button"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_marginTop="15dp"
            android:orientation="horizontal"
            binding:layout_constraintLeft_toLeftOf="parent"
            binding:layout_constraintRight_toLeftOf="@+id/guideline_vertical"
            binding:layout_constraintTop_toTopOf="parent">

            <androidx.appcompat.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="刷新"
                binding:onClickCommand="@{viewModel.OnRefreshClickCommand}" />

            <androidx.appcompat.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="停止"
                binding:onClickCommand="@{viewModel.OnStopClickCommand}" />

            <androidx.appcompat.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="连接"
                binding:onClickCommand="@{viewModel.OnConnectionClickCommand}" />

            <androidx.appcompat.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="断开"
                binding:onClickCommand="@{viewModel.OnDisconnectionClickCommand}" />
        </androidx.appcompat.widget.LinearLayoutCompat>

        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="0dp"
            android:layout_height="@dimen/dp_0"
            binding:itemBinding="@{viewModel.itemBinding}"
            binding:items="@{viewModel.observableList}"
            binding:layoutManager="@{LayoutManagers.linear()}"
            binding:layout_constraintBottom_toBottomOf="parent"
            binding:layout_constraintLeft_toLeftOf="parent"
            binding:layout_constraintRight_toLeftOf="@+id/guideline_vertical"
            binding:layout_constraintTop_toBottomOf="@+id/ll_button" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            binding:layout_constraintLeft_toRightOf="@+id/guideline_vertical"
            binding:layout_constraintRight_toRightOf="parent"
            binding:layout_constraintTop_toTopOf="parent"
            binding:layout_constraintBottom_toBottomOf="parent"
            >

            <!-- base_archives -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_base_archives_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:text="@string/base_archives"
                binding:layout_constraintTop_toTopOf="parent"
                binding:layout_constraintLeft_toLeftOf="parent"
                binding:layout_constraintBottom_toTopOf="@+id/btn_sign_measure_sync"
                binding:onClickCommand="@{viewModel.OnBaseArchivesSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_base_archives_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_base_archives_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_base_archives_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="111111111"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_base_archives_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_base_archives_sync"
                />

            <!-- sign_measure -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_sign_measure_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/sign_measure"
                binding:layout_constraintTop_toBottomOf="@+id/btn_base_archives_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toTopOf="@+id/btn_weighting_manage_sync"
                binding:onClickCommand="@{viewModel.OnSignMeasureSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_sign_measure_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_sign_measure_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_sign_measure_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_sign_measure_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="11111111"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_sign_measure_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_sign_measure_sync"
                />

            <!-- weighting_manage -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_weighting_manage_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/weighting_manage"
                binding:layout_constraintTop_toBottomOf="@+id/btn_sign_measure_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toTopOf="@+id/btn_treatment_record_sync"
                binding:onClickCommand="@{viewModel.OnWeightingManageSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_weighting_manage_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_weighting_manage_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_weighting_manage_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_weighting_manage_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="11111"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_weighting_manage_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_weighting_manage_sync"
                />

            <!-- treatment_record -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_treatment_record_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/treatment_record"
                binding:layout_constraintTop_toBottomOf="@+id/btn_weighting_manage_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toTopOf="@+id/btn_immun_record_sync"
                binding:onClickCommand="@{viewModel.OnTreatmentRecordSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_treatment_record_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_treatment_record_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_treatment_record_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_treatment_record_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="1111111111111111"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_treatment_record_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_treatment_record_sync"
                />

            <!-- immun_record -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_immun_record_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/immun_record"
                binding:layout_constraintTop_toBottomOf="@+id/btn_treatment_record_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toTopOf="@+id/btn_breeding_record_sync"
                binding:onClickCommand="@{viewModel.OnImmunRecordSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_immun_record_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_immun_record_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_immun_record_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_immun_record_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="111"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_immun_record_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_immun_record_sync"
                />

            <!-- breeding_record -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_breeding_record_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/breeding_record"
                binding:layout_constraintTop_toBottomOf="@+id/btn_immun_record_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toTopOf="@+id/btn_breeding_record_detail_sync"
                binding:onClickCommand="@{viewModel.OnBreedingRecordSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_breeding_record_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_breeding_record_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_breeding_record_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_breeding_record_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="222"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_breeding_record_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_breeding_record_sync"
                />

            <!-- breeding_record_detail -->
            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_breeding_record_detail_sync"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/breeding_record_detail"
                binding:layout_constraintTop_toBottomOf="@+id/btn_breeding_record_sync"
                binding:layout_constraintLeft_toLeftOf="@+id/btn_base_archives_sync"
                binding:layout_constraintBottom_toBottomOf="parent"
                binding:onClickCommand="@{viewModel.OnBreedingRecordDetailSyncClickCommand}"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_breeding_record_detail_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="(0)"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/btn_breeding_record_detail_sync"
                binding:layout_constraintBaseline_toBaselineOf="@+id/btn_breeding_record_detail_sync"
                />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_breeding_record_detail_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="222"
                android:textColor="@color/white"
                binding:layout_constraintLeft_toRightOf="@+id/tv_breeding_record_detail_count"
                binding:layout_constraintBaseline_toBaselineOf="@+id/tv_breeding_record_detail_count"
                />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>