<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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="wrap_content"
    android:layout_margin="@dimen/dp_2"
    app:cardCornerRadius="@dimen/dp_5"
    app:cardElevation="@dimen/dp_5">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:orientation="vertical"
        android:paddingLeft="@dimen/dp_4"
        android:paddingTop="@dimen/dp_8"
        android:paddingRight="@dimen/dp_4"
        android:paddingBottom="@dimen/dp_8">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/iv_food_ingredient_img"
                android:layout_width="@dimen/dp_67"
                android:layout_height="@dimen/dp_67" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="@dimen/dp_4"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:visibility="gone">

                    <TextView
                        android:id="@+id/tv_food_item_no"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="@dimen/dp_10"
                        android:layout_weight="1"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textColor="@color/color_3c"
                        android:textSize="@dimen/dp_12"
                        tools:text="SP001" />

                    <TextView
                        android:id="@+id/tv_food_item_supplier_name"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ellipsize="end"
                        android:gravity="right"
                        android:maxLines="2"
                        android:textColor="@color/black"
                        android:textSize="@dimen/dp_13"
                        android:textStyle="bold"
                        tools:text="海鮮天地" />
                </LinearLayout>

                <TextView
                    android:id="@+id/tv_food_item_name"
                    style="@style/Food_Ingredient_Info_TextStyle"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:textStyle="bold"
                    tools:text="巴西肥牛" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/tv_food_item_unit"
                        style="@style/Food_Ingredient_Info_TextStyle"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.5"
                        android:textSize="@dimen/dp_12"
                        tools:text="3KG/盒" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="15/30"
                        android:textColor="@color/color_3c"
                        android:textSize="@dimen/dp_12"
                        android:textStyle="bold"
                        android:visibility="gone" />

                    <TextView
                        android:id="@+id/tv_food_item_price"
                        style="@style/Food_Ingredient_Info_TextStyle"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:gravity="end"
                        android:textColor="@color/required_color"
                        android:textStyle="bold"
                        tools:text="$100.00" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_4"
            android:gravity="bottom"
            android:orientation="horizontal">

            <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="1" />
            <!--            <LinearLayout-->
            <!--                android:id="@+id/layout_operation_food_num"-->
            <!--                android:layout_width="wrap_content"-->
            <!--                android:layout_height="wrap_content"-->
            <!--                android:divider="@color/color_3c"-->
            <!--                android:gravity="center_vertical"-->
            <!--                android:orientation="horizontal">-->
            <ImageView
                android:id="@+id/iv_commodity_edit"
                android:layout_width="@dimen/dp_26"
                android:layout_height="@dimen/dp_26"
                android:layout_marginLeft="@dimen/dp_5"
                android:layout_marginRight="@dimen/dp_5"
                android:padding="@dimen/dp_3"
                android:src="@drawable/ic_blue_edit"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/iv_commodity_delete"
                android:layout_width="@dimen/dp_26"
                android:layout_height="@dimen/dp_26"
                android:layout_marginLeft="@dimen/dp_5"
                android:layout_marginRight="@dimen/dp_5"
                android:padding="@dimen/dp_3"
                android:src="@drawable/ic_red_delete"
                android:visibility="gone" />

            <com.qmuiteam.qmui.layout.QMUIButton
                android:id="@+id/btn_food_operation_sub"
                android:layout_width="@dimen/dp_24"
                android:layout_height="@dimen/dp_24"
                android:layout_marginLeft="@dimen/dp_5"
                android:background="@drawable/ic_circle_gray_sub" />

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/ed_food_ingredient_number"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@null"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:gravity="center"
                android:includeFontPadding="false"
                android:inputType="number"
                android:maxLength="4"
                android:maxLines="1"
                android:paddingLeft="@dimen/dp_4"
                android:paddingRight="@dimen/dp_4"
                android:textColor="@color/black"
                android:textCursorDrawable="@drawable/cursor_theme"
                android:textSize="@dimen/dp_20"
                tools:text="10" />

            <com.qmuiteam.qmui.layout.QMUIButton
                android:id="@+id/btn_food_operation_add"
                android:layout_width="@dimen/dp_24"
                android:layout_height="@dimen/dp_24"
                android:background="@drawable/ic_circle_theme_add" />
            <!--            </LinearLayout>-->
        </LinearLayout>
    </LinearLayout>

</androidx.cardview.widget.CardView>