<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="wrap_content">

    <Chronometer
        android:id="@+id/ctime"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:text="Chronometer" />

    <LinearLayout
        android:id="@+id/ll_meals"
        android:layout_width="match_parent"
        android:layout_height="266dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/ll_meals_main"
            android:layout_width="match_parent"
            android:layout_height="221dp"
            android:layout_weight="1">

            <LinearLayout
                android:id="@+id/ll_mm"
                android:layout_width="55dp"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <Button
                    android:id="@+id/btn_table"
                    android:layout_width="match_parent"
                    android:layout_height="36dp"
                    android:background="#336699"
                    android:text="Button"
                    android:textColor="@drawable/ui_selector_black_press"
                    android:textSize="20sp"
                    android:textStyle="bold" />

                <Button
                    android:id="@+id/btn_numberman"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:background="#FF51A933"
                    android:text="人數:0"
                    android:textColor="@drawable/ui_selector_white_press" />

                <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">

                        <TextView
                            android:id="@+id/btn_fid"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/dp_5"
                            android:background="@drawable/ui_selector_item_background"
                            android:drawablePadding="@dimen/dp_1"
                            android:drawableTop="@drawable/meal_info"
                            android:gravity="center"
                            android:text="PLU"
                            android:textAllCaps="false"
                            android:textColor="@color/theme_black"
                            android:textSize="@dimen/sp_12" />

                        <TextView
                            android:id="@+id/btn_meal_delete"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/dp_8"
                            android:background="@drawable/ui_selector_item_background"
                            android:drawablePadding="@dimen/dp_1"
                            android:drawableTop="@drawable/meal_delete"
                            android:gravity="center"
                            android:text="刪除"
                            android:textAllCaps="false"
                            android:textColor="@color/theme_black"
                            android:textSize="@dimen/sp_12" />

                        <!--                        <TextView-->
                        <!--                            android:id="@+id/btn_food_mode"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="wrap_content"-->
                        <!--                            android:text="堂食"-->
                        <!--                            android:background="@drawable/ui_selector_item_background"-->
                        <!--                            android:drawablePadding="@dimen/dp_1"-->
                        <!--                            android:textAllCaps="false"-->
                        <!--                            android:gravity="center"-->
                        <!--                            android:layout_marginTop="@dimen/dp_8"-->
                        <!--                            android:drawableTop="@drawable/meal_hall_mode"-->
                        <!--                            android:textColor="@color/theme_black"-->
                        <!--                            android:textSize="@dimen/sp_12"/>-->

                                                <TextView
                                                    android:id="@+id/btn_meal_discount"
                                                    android:layout_width="match_parent"
                                                    android:layout_height="wrap_content"
                                                    android:text="折扣"
                                                    android:drawablePadding="@dimen/dp_1"
                                                    android:layout_marginTop="@dimen/dp_8"
                                                    android:background="@drawable/ui_selector_item_background"
                                                    android:textAllCaps="false"
                                                    android:gravity="center"
                                                    android:drawableTop="@drawable/meal_discount"
                                                    android:textColor="@color/theme_black"
                                                    android:textSize="@dimen/sp_12"/>

                        <TextView
                            android:id="@+id/btn_multiple_selection"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/meal_multiple_selection"
                            android:drawablePadding="@dimen/dp_1"
                            android:layout_marginTop="@dimen/dp_8"
                            android:background="@drawable/ui_selector_item_background"
                            android:textAllCaps="false"
                            android:gravity="center"
                            android:drawableTop="@drawable/meal_muleiple_selection"
                            android:textColor="@color/theme_black"
                            android:textSize="@dimen/sp_12"/>

                        <!--                        <ImageButton-->
                        <!--                            android:id="@+id/btn_meal_discount"-->
                        <!--                            style="@style/ButtonBorderless"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="0dp"-->
                        <!--                            android:layout_weight="1"-->
                        <!--                            android:src="@drawable/meal_discount" />-->

                        <!--                        <TextView-->
                        <!--                            android:id="@+id/btn_temporary"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="wrap_content"-->
                        <!--                            android:background="@drawable/ui_selector_item_background"-->
                        <!--                            android:text="暫存"-->
                        <!--                            android:layout_marginTop="@dimen/dp_8"-->
                        <!--                            android:gravity="center"-->
                        <!--                            android:textAllCaps="false"-->
                        <!--                            android:textColor="@color/theme_black"-->
                        <!--                            android:visibility="visible"-->
                        <!--                            android:drawableTop="@drawable/meal_temporary"-->
                        <!--                            android:textSize="@dimen/sp_12"/>-->

                        <!--                        <ImageButton-->
                        <!--                            android:id="@+id/btn_meal_modify_restore"-->
                        <!--                            style="@style/ButtonBorderless"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="wrap_content"-->
                        <!--                            android:src="@drawable/meal_modify_restore" />-->

                        <!--                        <ImageButton-->
                        <!--                            android:id="@+id/btn_change_Language"-->
                        <!--                            style="@style/ButtonBorderless"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="wrap_content"-->
                        <!--                            android:src="@drawable/meal_change_language_index_1" />-->

                        <!--                        <ImageButton-->
                        <!--                            android:id="@+id/btn_food_merge"-->
                        <!--                            style="@style/ButtonBorderless"-->
                        <!--                            android:layout_width="match_parent"-->
                        <!--                            android:layout_height="wrap_content"-->
                        <!--                            android:src="@drawable/meal_food_merge" />-->
                    </LinearLayout>
                </ScrollView>
            </LinearLayout>

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rv_select_meal"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:divider="@null"
                android:fadeScrollbars="false"
                android:orientation="vertical" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/ll_Keys"
            android:layout_width="match_parent"
            android:layout_height="42dp">

            <!--            <Button-->
            <!--                android:id="@+id/btn_key0"-->
            <!--                style="@style/ButtonBorderless"-->
            <!--                android:layout_width="wrap_content"-->
            <!--                android:layout_height="match_parent"-->
            <!--                android:layout_weight="0.01"-->
            <!--                android:background="@drawable/meal_selector_number_keys"-->
            <!--                android:tag="1"-->
            <!--                android:text="@string/Key_0" />-->

            <Button
                android:id="@+id/btn_key1"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.01"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:tag="1"
                android:text="@string/Key_1" />

            <Button
                android:id="@+id/btn_key2"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.01"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:tag="2"
                android:text="@string/Key_2" />

            <Button
                android:id="@+id/btn_key3"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.01"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:tag="3"
                android:text="@string/Key_3" />

            <Button
                android:id="@+id/btn_key4"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.01"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:tag="4"
                android:text="@string/Key_4" />

            <Button
                android:id="@+id/btn_key5"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.01"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:tag="5"
                android:text="@string/Key_5" />

            <ImageButton
                android:id="@+id/btn_keys"
                style="@style/ButtonBorderless"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="0.00"
                android:layout_margin="@dimen/dp_1"
                android:background="@drawable/meal_selector_number_keys"
                android:src="@mipmap/meal_number_key"
                android:tag="99" />
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_modify"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:visibility="invisible">

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_select_all"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="#00B9F7"
            android:gravity="center"
            android:text="@string/all_selection"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14"
            android:visibility="gone"/>

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_anti_selection"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="#00B9F7"
            android:gravity="center"
            android:text="@string/anti_selection"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14"
            android:visibility="gone"/>

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_taste"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="#00B9F7"
            android:gravity="center"
            android:text="@string/taste"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14" />

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_msg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="#7D8888"
            android:gravity="center"
            android:text="@string/msg"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14"/>

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_delete"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="#FF5024"
            android:gravity="center"
            android:text="@string/remove"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14" />

        <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
            android:id="@+id/btn_end"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginRight="1dp"
            android:layout_weight="0.1"
            android:background="@color/Grass_green"
            android:gravity="center"
            android:text="@string/end"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_14" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_stand_oper"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/tv_no_save_return"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="#A0AAB4"
            android:gravity="center"
            android:text="@string/nosaveexit"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="@drawable/ui_selector_white_press"
            android:textSize="@dimen/sp_17" />

        <!--        <TextView-->
        <!--            android:id="@+id/tv_send_order"-->
        <!--            android:layout_width="0dp"-->
        <!--            android:layout_height="match_parent"-->
        <!--            android:layout_weight="1"-->
        <!--            android:background="@color/Grass_green"-->
        <!--            android:gravity="center"-->
        <!--            android:text="send order"-->
        <!--            android:textAppearance="?android:attr/textAppearanceLarge"-->
        <!--            android:textColor="@drawable/selector_pressed_state_black"-->
        <!--            android:textSize="@dimen/sp_17" />-->

        <FrameLayout
            android:id="@+id/fl_order_content"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/orange_500">

            <Button
                android:id="@+id/btn_order_count"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_margin="@dimen/dp_2"
                android:background="@drawable/ui_shape_red_oval"
                android:singleLine="true"
                android:textColor="@color/theme_white_color"
                android:visibility="invisible" />

            <TextView
                android:id="@+id/tv_order_content"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/meal_btn_order"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:textColor="@drawable/ui_selector_black_press"
                android:textSize="@dimen/sp_17" />
        </FrameLayout>

        <FrameLayout
            android:id="@+id/fl_send_order"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/Grass_green">

            <Button
                android:id="@+id/btn_send_order"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@android:color/transparent"
                android:gravity="center"
                android:text="送單"
                android:textColor="@drawable/ui_selector_black_press"
                android:textSize="@dimen/sp_17" />

        </FrameLayout>

        <FrameLayout
            android:id="@+id/fl_printer_order"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/blue_500"
            android:visibility="gone">

            <Button
                android:id="@+id/btn_order_printer"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@android:color/transparent"
                android:gravity="center"
                android:text="@string/meal_print"
                android:textColor="@drawable/ui_selector_black_press"
                android:textSize="@dimen/sp_17" />

            <Button
                android:id="@+id/btn_printer_machine_name"
                android:layout_width="40dp"
                android:layout_height="20dp"
                android:layout_alignParentBottom="true"
                android:layout_alignParentRight="true"
                android:background="@drawable/ui_shape_red_oval"
                android:gravity="center"
                android:singleLine="true"
                android:textColor="@color/theme_white_color"
                android:visibility="gone" />
        </FrameLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_food_group"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ll_meals"
        android:orientation="vertical">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_food_group"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <LinearLayout
            android:id="@+id/ll_food_group_point"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_5"
            android:background="@color/theme_grey_color"
            android:orientation="horizontal"
            android:visibility="invisible" />
    </LinearLayout>

    <RelativeLayout
        android:id="@+id/rl_fine_tabs"
        android:layout_width="match_parent"
        android:layout_height="38dp"
        android:layout_below="@+id/ll_meals"
        android:background="@color/theme_white_color"
        android:visibility="visible">

        <ImageView
            android:id="@+id/iv_fine_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="@dimen/normal_space"
            android:contentDescription="@string/app_name"
            android:src="@drawable/ic_black_back"
            android:visibility="visible" />

        <TextView
            android:id="@+id/tv_fine_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textSize="@dimen/sp_16"
            android:textColor="@color/black"
            android:text=""/>

        <com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/tabs_fine"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_centerInParent="true"
            app:pstsDividerColor="@color/theme_white_color"
            app:pstsIndicatorColor="@color/theme_color"
            app:pstsIndicatorHeight="@dimen/dp_2"
            app:pstsTabBackground="@android:color/transparent"
            app:pstsTabPaddingLeftRight="@dimen/dp_16"
            app:pstsTabTextSelectedColor="@color/theme_color"
            app:pstsTabTextSize="@dimen/font_normal"
            app:pstsUnderlineHeight="0dp"
            app:theme="@style/AppTheme" />
    </RelativeLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_combo"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ll_meals"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        android:visibility="gone" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_modifier"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/ll_stand_oper"
        android:layout_below="@+id/rv_combo"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        android:visibility="gone" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_discount"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/ll_stand_oper"
        android:layout_below="@+id/ll_meals"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        android:visibility="gone" />

    <!--    <androidx.recyclerview.widget.RecyclerView-->
    <!--        android:id="@+id/rv_food_group"-->
    <!--        android:layout_width="match_parent"-->
    <!--        android:layout_height="wrap_content"-->
    <!--        android:layout_below="@+id/ll_meals"-->
    <!--        android:divider="@null"-->
    <!--        android:fadeScrollbars="false"-->
    <!--        android:orientation="vertical" />-->

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_food"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/ll_stand_oper"
        android:layout_below="@+id/ll_food_group"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical" />

    <androidx.viewpager.widget.ViewPager
        android:id="@+id/pager_fine"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/ll_stand_oper"
        android:layout_below="@+id/rl_fine_tabs"
        android:visibility="invisible" />

    <!--鍵盤-->
    <com.gingersoft.gsa.cloud.ui.view.SearchKeyBoardView
        android:id="@+id/meal_stand_search_keyboard_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/ll_stand_oper"
        android:layout_below="@+id/ll_meals"
        android:visibility="gone" />

</RelativeLayout>