<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/supply_chain_bg_color"
    android:fitsSystemWindows="true"
    android:orientation="vertical">

    <com.qmuiteam.qmui.widget.QMUITopBar
        android:id="@+id/topbar_purchase_list"
        android:layout_width="match_parent"
        android:layout_height="@dimen/head_height"
        android:background="@color/theme_color"
        android:fitsSystemWindows="true"
        app:qmui_topbar_title_color="@color/theme_white_color" />

    <LinearLayout
        android:id="@+id/layout_food_ingredients_search"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_48"
        android:layout_margin="@dimen/dp_10"
        android:orientation="horizontal">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/shape_white_eight_corners_bg"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/iv_purchase_list_search"
                android:layout_width="@dimen/dp_24"
                android:layout_height="@dimen/dp_24"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="@dimen/dp_10"
                android:src="@drawable/ic_search" />

            <EditText
                android:id="@+id/ed_food_ingredients_search"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="@dimen/dp_5"
                android:layout_marginRight="@dimen/dp_5"
                android:background="@null"
                android:hint="訂單編號"
                android:maxLength="20"
                android:maxLines="1"
                android:textColor="@color/theme_333_color"
                android:textColorHint="@color/hint_color"
                android:textSize="@dimen/dp_16" />
        </LinearLayout>

        <com.qmuiteam.qmui.layout.QMUILinearLayout
            android:id="@+id/layout_purchase_list_screen"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginLeft="@dimen/dp_8"
            android:layout_marginTop="@dimen/dp_4"
            android:layout_marginBottom="@dimen/dp_4"
            android:background="@drawable/shape_app_btn"
            android:gravity="center">

            <ImageView
                android:layout_width="@dimen/dp_20"
                android:layout_height="@dimen/dp_20"
                android:layout_marginLeft="@dimen/dp_10"
                android:src="@drawable/ic_screen" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_7"
                android:layout_marginRight="@dimen/dp_10"
                android:gravity="center"
                android:text="篩選"
                android:textColor="@color/white"
                android:textSize="@dimen/dp_14" />

        </com.qmuiteam.qmui.layout.QMUILinearLayout>
    </LinearLayout>

    <com.gingersoft.supply_chain.mvp.ui.widget.ScreenView
        android:id="@+id/screen_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" />

    <com.qmuiteam.qmui.widget.tab.QMUITabSegment2
        android:id="@+id/purchase_list_tabSegment"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_42"
        android:background="@color/white" />

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <View
            android:id="@+id/view_load_bg"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <com.scwang.smartrefresh.layout.SmartRefreshLayout
            android:id="@+id/srl_purchase_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:srlAccentColor="@color/theme_333_color"
            app:srlEnablePreviewInEditMode="true"
            app:srlPrimaryColor="@color/trans">

            <androidx.viewpager2.widget.ViewPager2
                android:id="@+id/contentViewPager"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true" />
        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
    </FrameLayout>

    <include layout="@layout/app_save_btn" />
</LinearLayout>