<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout 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:orientation="vertical">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="?attr/qmui_topbar_height">

        <com.qmuiteam.qmui.widget.QMUIEmptyView
            android:id="@+id/emptyView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true" />

        <com.scwang.smartrefresh.layout.SmartRefreshLayout
            android:id="@+id/refreshLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:srlEnableLoadMore="false">

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/theme_white_color"
                    android:orientation="vertical">

                    <com.gingersoft.gsa.cloud.ui.view.base.NoScrollRecyclerView
                        android:id="@+id/recycler_area"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                        app:spanCount="1" />

                    <LinearLayout
                        android:id="@+id/ll_add_area_layout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:visibility="gone">

                        <com.rengwuxian.materialedittext.MaterialEditText
                            android:id="@+id/ed_area_name"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:background="@null"
                            android:hint="請輸入區域名稱"
                            android:maxLength="15"
                            android:layout_margin="@dimen/dp_2"
                            android:paddingLeft="@dimen/dp_10"
                            android:paddingRight="@dimen/dp_10"
                            android:singleLine="true"
                            android:textColor="@color/normal_color"
                            android:textColorHint="@color/hint_color"
                            android:textSize="@dimen/sp_16"
                            app:met_autoValidate="true"
                            app:met_clearButton="true"
                            app:met_floatingLabel="highlight"
                            app:met_iconPadding="2dp"
                            app:met_baseColor="@color/theme_black"
                            app:met_primaryColor="@color/theme_color"
                            app:met_singleLineEllipsis="false"/>

                        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
                            android:id="@+id/btn_save_area"
                            android:layout_width="@dimen/dp_60"
                            android:layout_height="@dimen/dp_38"
                            android:layout_gravity="right|center_vertical"
                            android:layout_marginLeft="@dimen/dp_8"
                            android:layout_marginRight="@dimen/dp_10"
                            android:background="@color/theme_red_color"
                            android:text="保存"
                            android:textColor="@color/theme_white_color"
                            android:textSize="@dimen/sp_14"
                            app:qmui_backgroundColor="@color/theme_color"
                            app:qmui_radius="@dimen/dp_5" />
                    </LinearLayout>
                </LinearLayout>
            </ScrollView>
        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
    </FrameLayout>

    <LinearLayout
        android:id="@+id/ll_bottom_operat"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:layout_gravity="bottom"
        android:background="@color/theme_white_color"
        android:orientation="horizontal"
        android:paddingLeft="@dimen/dp_15"
        android:paddingRight="@dimen/dp_15"
        android:visibility="gone">

        <CheckBox
            android:id="@+id/cb_all_select"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="全選"
            android:textColor="@color/theme_black"
            android:textSize="@dimen/sp_14" />

        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
            android:id="@+id/btn_sure"
            android:layout_width="@dimen/dp_60"
            android:layout_height="@dimen/dp_38"
            android:layout_gravity="right|center_vertical"
            android:text="刪除"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14"
            app:qmui_backgroundColor="@color/theme_color"
            app:qmui_radius="@dimen/dp_5" />

<!--        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
<!--            android:id="@+id/btn_save"-->
<!--            android:layout_width="@dimen/dp_60"-->
<!--            android:layout_height="@dimen/dp_38"-->
<!--            android:layout_gravity="right|center_vertical"-->
<!--            android:text="保存"-->
<!--            android:textColor="@color/theme_white_color"-->
<!--            android:textSize="@dimen/sp_14"-->
<!--            app:qmui_backgroundColor="@color/theme_color"-->
<!--            app:qmui_radius="@dimen/dp_5" />-->
    </LinearLayout>

    <!--    <com.qmuiteam.qmui.alpha.QMUIAlphaTextView-->
    <!--        android:id="@+id/tv_add_area"-->
    <!--        android:layout_width="@dimen/dp_65"-->
    <!--        android:layout_height="@dimen/dp_65"-->
    <!--        android:layout_gravity="bottom|right"-->
    <!--        android:layout_marginBottom="@dimen/dp_20"-->
    <!--        android:layout_marginRight="@dimen/dp_20"-->
    <!--        android:background="@drawable/manage_shape_add_btn_oval"-->
    <!--        android:gravity="center"-->
    <!--        android:text="+"-->
    <!--        android:textColor="@color/theme_white_color"-->
    <!--        android:textSize="@dimen/sp_14" />-->

    <com.qmuiteam.qmui.alpha.QMUIAlphaFrameLayout
        android:id="@+id/fl_add_area"
        android:layout_width="@dimen/dp_65"
        android:layout_height="@dimen/dp_65"
        android:layout_gravity="bottom|right"
        android:layout_marginBottom="@dimen/dp_15"
        android:layout_marginRight="@dimen/dp_20"
        android:background="@drawable/manage_shape_add_btn_oval">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/add_white" />
    </com.qmuiteam.qmui.alpha.QMUIAlphaFrameLayout>

    <com.qmuiteam.qmui.widget.QMUITopBarLayout
        android:id="@+id/topbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/qmui_topbar_height"
        app:qmui_topbar_title_color="@color/theme_white_color" />

</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>