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

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/shape_white_eight_corners_bg"
        android:orientation="vertical">

        <FrameLayout
            android:layout_width="@dimen/dp_269"
            android:layout_height="@dimen/dp_269">

            <com.gingersoft.gsa.cloud.ui.view.imageview.mask.PorterShapeImageView
                android:id="@+id/iv_goods_details"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:siShape="@drawable/shape_top_radius" />

            <TextView
                android:id="@+id/tv_goods_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:background="@color/alpha_60_black"
                android:padding="@dimen/dp_5"
                android:textColor="@color/white"
                android:textSize="@dimen/dp_15"
                tools:text="巴西费缪" />
        </FrameLayout>

        <LinearLayout
            android:layout_width="@dimen/dp_269"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="@dimen/dp_9">

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

                <TextView
                    android:id="@+id/tv_supplier_name"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_17"
                    android:textStyle="bold"
                    tools:text="海鮮天地" />

                <TextView
                    android:id="@+id/tv_goods_no"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_5"
                    android:layout_weight="1"
                    android:gravity="right"
                    android:text="SP001"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_17" />
            </LinearLayout>

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

                <com.qmuiteam.qmui.widget.textview.QMUISpanTouchFixTextView
                    android:id="@+id/tv_goods_price"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:includeFontPadding="false"
                    android:text="單價：$100.0"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_15" />

                <TextView
                    android:id="@+id/tv_goods_specification"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_5"
                    android:layout_weight="0.5"
                    android:gravity="right"
                    android:includeFontPadding="false"
                    android:text="1KG/盒"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_15" />
            </LinearLayout>

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

                <requestFocus />

                <TextView
                    android:id="@+id/tv_goods_stock"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="庫存：15/60"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_15"
                    android:visibility="invisible" />

                <LinearLayout
                    android:id="@+id/layout_operation_food_num"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:descendantFocusability="beforeDescendants"
                    android:divider="@color/color_3c"
                    android:focusable="true"
                    android:focusableInTouchMode="true"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <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:background="@drawable/ic_circle_gray_sub" />

                    <androidx.appcompat.widget.AppCompatEditText
                        android:id="@+id/ed_food_ingredient_number"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/dp_4"
                        android:layout_marginRight="@dimen/dp_4"
                        android:background="@null"
                        android:gravity="center"
                        android:inputType="number"
                        android:maxLength="4"
                        android:maxLines="1"
                        android:minWidth="@dimen/dp_30"
                        android:textColor="@color/black"
                        android:textCursorDrawable="@drawable/cursor_theme"
                        android:textSize="@dimen/dp_22"
                        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>
    </LinearLayout>

    <ImageView
        android:id="@+id/iv_popup_close"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/dp_19"
        android:layout_marginBottom="@dimen/dp_10"
        android:src="@drawable/dialog_close" />
</LinearLayout>