<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/theme_white_color"
    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">

        <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: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:background="#0E655F"
            android:gravity="center_vertical"
            android:padding="@dimen/dp_5">

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

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

            <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="@drawable/meal_people_num_white"
                android:text="8"
                android:textColor="@color/theme_white_color"
                android:textSize="@dimen/font_large"
                android:textStyle="bold" />
        </RelativeLayout>
    </LinearLayout>

    <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"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

    <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"
        android:layout_marginTop="@dimen/dp_10"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_45"
        android:orientation="horizontal"
        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/sp_22"
                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/sp_22"
            android:textStyle="bold"
            android:layout_gravity="right"
            android:textColor="@color/theme_white_color"
            android:paddingRight="@dimen/dp_10"
            android:gravity="right|center_vertical"/>
    </LinearLayout>

    <com.gingersoft.gsa.cloud.ui.view.MaxHeightRecyclerView
        android:id="@+id/rv_bill_money"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        android:background="@color/theme_background_color"
        app:maxHeight="@dimen/dp_80"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/yellow"
        android:padding="@dimen/dp_5">

        <TextView
            android:id="@+id/tv_difference_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="尚欠："
            android:textSize="@dimen/sp_20"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/tv_difference_money"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:textColor="@color/red"
            android:textSize="@dimen/sp_20"
            android:textStyle="bold" />
    </RelativeLayout>

    <com.gingersoft.gsa.cloud.ui.view.MaxHeightRecyclerView
        android:id="@+id/rv_bill_method"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        app:maxHeight="@dimen/dp_100"
        app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
        app:spanCount="4"/>

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

        <com.qmuiteam.qmui.alpha.QMUIAlphaButton
            android:id="@+id/btn_keypad"
            android:layout_width="@dimen/dp_100"
            android:layout_height="match_parent"
            android:background="#2F6666"
            android:text="Keypad"
            android:textColor="@color/theme_white_color"/>

        <com.qmuiteam.qmui.alpha.QMUIAlphaButton
            android:id="@+id/btn_exact"
            android:layout_width="@dimen/dp_100"
            android:layout_height="match_parent"
            android:background="#315FC5"
            android:layout_marginLeft="@dimen/dp_1"
            android:text="Exact"
            android:textColor="@color/theme_white_color"/>

        <com.qmuiteam.qmui.alpha.QMUIAlphaButton
            android:id="@+id/btn_sure_pay"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_marginLeft="@dimen/dp_1"
            android:layout_height="match_parent"
            android:background="@color/Grass_green"
            android:text="確認"
            android:textColor="@color/theme_white_color"/>
    </LinearLayout>
</LinearLayout>