<?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:orientation="vertical">

    <com.qmuiteam.qmui.widget.QMUITopBar
        android:id="@+id/topbar_measurement_unit_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" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="@dimen/dp_10">

        <LinearLayout
            android:id="@+id/layout_measurement_unit_search"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_40"
            android:background="@drawable/shape_white_eight_corners_bg"
            android:orientation="horizontal">

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

            <EditText
                android:id="@+id/ed_measurement_unit_search"
                android:layout_width="265dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="@dimen/dp_5"
                android:layout_marginRight="@dimen/dp_5"
                android:layout_weight="1"
                android:background="@null"
                android:hint="搜索計量單位"
                android:textColor="@color/theme_333_color"
                android:textColorHint="@color/hint_color"
                android:textSize="@dimen/dp_16" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_measurement_unit_search"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginTop="@dimen/dp_1"
                android:layout_marginBottom="@dimen/dp_1"
                android:background="@drawable/shape_app_btn"
                android:text="搜索"
                android:textColor="@color/white"
                android:textSize="@dimen/dp_14" />
        </LinearLayout>

        <com.scwang.smartrefresh.layout.SmartRefreshLayout
            android:id="@+id/srl_measurement"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@id/layout_measurement_unit_btn"
            android:layout_below="@id/layout_measurement_unit_search">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rv_measurement_unit_list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
        </com.scwang.smartrefresh.layout.SmartRefreshLayout>

        <LinearLayout
            android:id="@+id/layout_measurement_unit_btn"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_alignParentBottom="true">

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_new_measurement_unit"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/dp_10"
                android:background="@drawable/shape_app_btn"
                android:gravity="center"
                android:text="+新增計量單位"
                android:textColor="@color/white"
                android:textSize="@dimen/dp_16" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_measurement_unit_confirm"
                style="@style/Save_Btn_Style"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="確定"
                android:visibility="gone" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_measurement_unit_cancel"
                style="@style/Save_Btn_Style"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_20"
                android:layout_weight="1"
                android:background="@drawable/shape_black_border_small_radius"
                android:text="取消"
                android:textColor="@color/color_3c"
                android:visibility="gone" />
        </LinearLayout>
    </RelativeLayout>

</LinearLayout>