<?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"
    xmlns:tools="http://schemas.android.com/tools"
    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_food_ingredients"
        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_category"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/layout_category_search"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_40"
            android:layout_margin="@dimen/dp_10"
            android:background="@drawable/shape_white_eight_corners_bg"
            android:orientation="horizontal"
            android:visibility="gone">

            <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_category_search"
                android:layout_width="0dp"
                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_category_search"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_margin="@dimen/dp_3"
                android:background="@drawable/shape_app_btn_small_radius"
                android:text="搜索"
                android:textColor="@color/white"
                android:textSize="@dimen/dp_14" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="@dimen/dp_10"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical">

                <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                    android:id="@+id/btn_add_first_category"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_marginRight="@dimen/dp_10"
                    android:background="@drawable/shape_app_btn_small_radius"
                    android:gravity="center"
                    android:paddingTop="@dimen/dp_2"
                    android:paddingBottom="@dimen/dp_2"
                    android:text="+種類"
                    android:textColor="@color/white"
                    android:textSize="@dimen/dp_14" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_first_category"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="@dimen/dp_10"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="4"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/rv_second_category_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/supply_chain_category_title_bg"
                    android:gravity="center"
                    android:paddingTop="@dimen/dp_4"
                    android:paddingBottom="@dimen/dp_4"
                    android:textColor="@color/white"
                    android:textSize="@dimen/dp_14"
                    android:visibility="gone"
                    tools:text="水果類" />

                <androidx.cardview.widget.CardView
                    android:id="@+id/card_second_category"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:minHeight="@dimen/dp_70"
                    app:cardCornerRadius="@dimen/dp_0"
                    app:cardElevation="@dimen/dp_5">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_second_category"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/dp_7"
                        android:layout_marginRight="@dimen/dp_7"
                        android:paddingBottom="@dimen/dp_8" />

                    <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                        android:id="@+id/tv_new_second_category"
                        style="@style/Second_Category_Style"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:visibility="gone"
                        android:layout_marginLeft="@dimen/dp_15"
                        android:layout_marginTop="@dimen/dp_8"
                        android:background="@drawable/shape_border_white_bg"
                        android:gravity="center"
                        android:text="+新增類別"
                        android:textColor="@color/theme_color" />

                </androidx.cardview.widget.CardView>

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="@dimen/dp_7"
                    android:layout_marginRight="@dimen/dp_4">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_third_category"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:background="@color/white"
                        android:paddingLeft="@dimen/dp_4"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

                    <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                        android:id="@+id/tv_new_third_category"
                        style="@style/Second_Category_Style"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/dp_13"
                        android:layout_marginTop="@dimen/dp_8"
                        android:visibility="gone"
                        android:background="@drawable/shape_color_da_stoke_fifteen_corners"
                        android:gravity="center"
                        android:text="+新增類別"
                        android:textColor="@color/theme_color" />
                </FrameLayout>
            </LinearLayout>
        </LinearLayout>

    </LinearLayout>

</LinearLayout>