<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.fragment.vm.CollectListVM" />

        <variable
            name="adapter"
            type="BindingRecyclerViewAdapter" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/color_bg"
        android:padding="10dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/bg_radius_white_5"
        android:padding="5dp"
        >

        <androidx.appcompat.widget.LinearLayoutCompat
            android:id="@+id/cl_title"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            binding:layout_constraintLeft_toLeftOf="parent"
            binding:layout_constraintRight_toRightOf="parent"
            binding:layout_constraintTop_toTopOf="parent">

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@{viewModel.title1}"
                android:textColor="@color/colorPrimary"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@{viewModel.title2}"
                android:textColor="@color/colorPrimary"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@{viewModel.title3}"
                android:textColor="@color/colorPrimary" />

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="@{viewModel.title4}"
                android:textColor="@color/colorPrimary" />
        </androidx.appcompat.widget.LinearLayoutCompat>

        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_0"
            binding:adapter="@{adapter}"
            binding:itemBinding="@{viewModel.itemBinding}"
            binding:items="@{viewModel.observableList}"
            binding:layoutManager="@{LayoutManagers.linear()}"
            binding:layout_constraintBottom_toBottomOf="parent"
            binding:layout_constraintRight_toRightOf="parent"
            binding:layout_constraintStart_toStartOf="parent"
            binding:layout_constraintTop_toBottomOf="@+id/cl_title" />
    </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>

