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

    <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:layout_width="match_parent"
        android:layout_height="@dimen/dp_50"
        android:gravity="center_vertical"
        android:orientation="horizontal">

<!--        <com.qmuiteam.qmui.alpha.QMUIAlphaButton-->
<!--            android:id="@+id/btn_table"-->
<!--            android:layout_width="0dp"-->
<!--            android:layout_height="match_parent"-->
<!--            android:layout_weight="1"-->
<!--            android:drawableLeft="@drawable/qmui_icon_topbar_back"-->
<!--            android:text="105A-2"-->
<!--            android:background="#096791"-->
<!--            android:paddingLeft="@dimen/dp_5"-->
<!--            android:gravity="center_vertical"-->
<!--            android:textColor="@color/theme_white_color"-->
<!--            android:textSize="@dimen/font_large"-->
<!--            android:textStyle="bold" />-->

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

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_table"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:background="#096791"
                android:paddingRight="@dimen/dp_10"
                android:drawableLeft="@drawable/qmui_icon_topbar_back"
                android:gravity="center_vertical"
                android:paddingLeft="@dimen/dp_5"
                android:text="105A-2"
                android:textColor="@color/theme_white_color"
                android:textSize="@dimen/font_large"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/tv_action_name"
                android:layout_width="@dimen/dp_60"
                android:layout_height="match_parent"
                android:gravity="center"
                android:background="#C50000"
                android:text="結賬"
                android:visibility="gone"
                android:textSize="@dimen/sp_18"
                android:textColor="@color/theme_white_color"/>
        </LinearLayout>

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:paddingLeft="@dimen/dp_5"
            android:gravity="center_vertical"
            android:background="#0E655F">

            <TextView
                android:id="@+id/tv_server_main"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
               android:textColor="@color/theme_white_color"
                android:textSize="@dimen/font_normal3"
                android:textStyle="bold"
                android:text="Andy Lam"/>

            <TextView
                android:id="@+id/tv_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/tv_server_main"
                android:textSize="@dimen/font_normal2"
                android:textColor="@color/theme_white_color"
                android:text="時間:14:30"/>

            <com.qmuiteam.qmui.alpha.QMUIAlphaButton
                android:id="@+id/btn_people_num"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_alignParentRight="true"
                android:background="@color/trans"
                android:drawableLeft="@mipmap/meal_people_num_white"
                android:text="8"
                android:textColor="@color/theme_white_color"
                android:textSize="@dimen/font_large"
                android:textStyle="bold"/>
        </RelativeLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="@dimen/dp_50"
        android:orientation="vertical">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_top_function"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:spanCount="3"
        android:orientation="horizontal"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_food"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        android:background="@color/theme_white_color"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

    <TextView
        android:id="@+id/tv_whole"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="合計 $1328.0"
        android:textSize="@dimen/sp_20"
        android:textStyle="bold"
        android:textColor="@color/theme_text_color"
        android:padding="@dimen/dp_10"
        android:background="@color/theme_white_color"
        android:gravity="right|center_vertical"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_order_detail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"  />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_50"
        android:orientation="horizontal"
        android:gravity="center"
       android:background="#006666"
        android:padding="@dimen/dp_5">

        <RelativeLayout
            android:id="@+id/fl_order_content"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">

            <TextView
                android:id="@+id/tv_total_text"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="Total:"
                android:textSize="@dimen/font_large"
                android:textStyle="bold"
                android:layout_gravity="left"
                android:textColor="@color/theme_white_color"
                android:paddingRight="@dimen/dp_10"
                android:gravity="right|center_vertical"/>

            <Button
                android:id="@+id/btn_order_count"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:background="@drawable/ui_shape_red_oval"
                android:singleLine="true"
                android:gravity="center"
                android:text=""
                android:layout_margin="@dimen/dp_2"
                android:layout_toRightOf="@+id/tv_total_text"
                android:visibility="invisible"
                android:textColor="@color/theme_white_color" />
        </RelativeLayout>

        <TextView
            android:id="@+id/tv_total"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:text="$1328.0"
            android:textSize="@dimen/font_large"
            android:textStyle="bold"
            android:layout_gravity="right"
            android:textColor="@color/theme_white_color"
            android:paddingRight="@dimen/dp_8"
            android:gravity="right|center_vertical"/>
         </LinearLayout>
    </LinearLayout>

    <ViewStub
        android:id="@+id/vs_transfer_food"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout="@layout/table_stub_transfer_food"
        android:layout_marginTop="@dimen/dp_50"/>

</FrameLayout>