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

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

        <LinearLayout
            android:id="@+id/fl_order_content"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <FrameLayout
                android:layout_width="@dimen/dp_40"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_10">

                <ImageView
                    android:id="@+id/iv_shop_car"
                    android:layout_width="@dimen/dp_32"
                    android:layout_height="@dimen/dp_32"
                    android:src="@drawable/ic_shopping_car" />

                <Button
                    android:id="@+id/btn_order_count"
                    android:layout_width="@dimen/dp_16"
                    android:layout_height="@dimen/dp_16"
                    android:layout_gravity="end"
                    android:background="@drawable/ui_shape_red_oval"
                    android:gravity="center"
                    android:singleLine="true"
                    android:text="10"
                    android:textColor="@color/theme_white_color"
                    android:textSize="@dimen/dp_12"
                    android:visibility="invisible" />
            </FrameLayout>

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

        <TextView
            android:id="@+id/tv_total"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="right"
            android:layout_weight="1"
            android:gravity="right|center_vertical"
            android:paddingRight="@dimen/dp_8"
            android:text="$1328.0"
            android:textColor="@color/theme_white_color"
            android:textSize="@dimen/sp_22"
            android:textStyle="bold" />
    </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:background="@color/theme_background_color"
        android:divider="@null"
        android:fadeScrollbars="false"
        android:orientation="vertical"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:maxHeight="@dimen/dp_80" />

    <RelativeLayout
        android:id="@+id/rl_difference"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#FBF261"
        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"
            tools:text="-$140" />
    </RelativeLayout>

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

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

        <LinearLayout
            android:id="@+id/layout_keypad"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="#2F6666"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_keyboard" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_4"
                android:text="Keypad"
                android:textColor="@color/theme_white_color" />
        </LinearLayout>

        <com.qmuiteam.qmui.alpha.QMUIAlphaButton
            android:id="@+id/btn_exact"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_marginLeft="@dimen/dp_1"
            android:layout_weight="1"
            android:background="#315FC5"
            android:gravity="center"
            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_height="match_parent"
            android:layout_marginLeft="@dimen/dp_1"
            android:layout_weight="1.2"
            android:background="@color/Grass_green"
            android:gravity="center"
            android:text="確認"
            android:textColor="@color/theme_white_color" />
    </LinearLayout>

</LinearLayout>