<?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="viewModel"
            type="com.lukouguoji.gjj.viewModel.GjjTallyDetailsViewModel" />

    </data>

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/color_f2"
        android:orientation="vertical"
        tools:context=".activity.GjjTallyDetailsActivity">

        <include layout="@layout/title_tool_bar" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="40dp"
            android:text='@{"运单号：" + viewModel.waybillNo}'
            android:textColor="#333333"
            android:textSize="30dp"
            android:textStyle="bold" />

        <com.scwang.smart.refresh.layout.SmartRefreshLayout
            android:id="@+id/srl"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="30dp"
            android:layout_weight="1">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rv"
                itemLayoutId="@{viewModel.itemId}"
                viewHolder="@{viewModel.itemHolder}"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                tools:listitem="@layout/item_tally_add" />

        </com.scwang.smart.refresh.layout.SmartRefreshLayout>

        <androidx.appcompat.widget.LinearLayoutCompat
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#5c6890"
            android:gravity="center_vertical"
            android:paddingHorizontal="15dp">

            <TextView
                android:id="@+id/tv_total"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{viewModel.desc}"
                android:textColor="@color/white"
                android:textSize="16sp"
                android:textStyle="bold" />

        </androidx.appcompat.widget.LinearLayoutCompat>

    </androidx.appcompat.widget.LinearLayoutCompat>
</layout>