<?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">

    <data>

        <variable
            name="presenter"
            type="com.dayu.order.presenter.homeorder.HomeOrderPresenter" />
    </data>

    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/cl_white">

        <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:elevation="0dp"
            >

            <android.support.v7.widget.Toolbar
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_scrollFlags="scroll|enterAlways|snap">

                <TextView
                    style="@style/text_title"
                    android:layout_gravity="center"
                    android:text="@string/order_title" />

                <TextView
                    android:id="@+id/tv_right_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="end"
                    android:layout_marginRight="@dimen/dp_13.3"
                    android:onClick="@{()->presenter.dumpToOrderRecordActivity()}"
                    android:text="@string/history_order"
                    android:textColor="#3faafc"
                    android:textSize="@dimen/dp_13.3" />
            </android.support.v7.widget.Toolbar>

            <android.support.design.widget.TabLayout
                android:id="@+id/tb_home"
                android:layout_width="match_parent"
                android:layout_height="78dp"
                app:tabIndicatorColor="@color/cl_tab_line"
                app:tabMaxWidth="0dp"
                app:tabMode="fixed" />

        </android.support.design.widget.AppBarLayout>

        <android.support.v4.view.ViewPager
            android:id="@+id/vp_home"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />
    </android.support.design.widget.CoordinatorLayout>
</layout>