<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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_background_color"
    android:descendantFocusability="blocksDescendants"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/layout_sales"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingLeft="@dimen/dp_10"
        android:paddingRight="@dimen/dp_10">

        <com.lihang.ShadowLayout
            android:id="@+id/layout_business_chart"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_10"
            android:paddingBottom="@dimen/dp_15"
            app:hl_cornerRadius="@dimen/dp_4"
            app:hl_dy="@dimen/main_shadow_dy"
            app:hl_shadowBackColor="@color/white"
            app:hl_shadowColor="@color/shadow_color"
            app:hl_shadowLimit="@dimen/main_shadow_limit">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingRight="@dimen/dp_10"
                android:paddingBottom="@dimen/dp_10">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_marginTop="@dimen/dp_10"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="食品銷售金額"
                        android:textColor="#181818"
                        android:textSize="@dimen/sp_17" />

                    <TextView
                        android:id="@+id/tv_start_time"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="#181818"
                        android:textSize="@dimen/sp_10" />

                    <com.gingersoft.gsa.cloud.ui.view.TriangleView
                        android:id="@+id/iv_sale_time_triangle"
                        android:layout_width="@dimen/dp_8"
                        android:layout_height="@dimen/dp_5"
                        android:layout_marginLeft="@dimen/dp_2"
                        app:trv_direction="bottom" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/dp_7"
                        android:text="到"
                        android:textColor="#999"
                        android:textSize="@dimen/sp_10" />

                    <TextView
                        android:id="@+id/tv_end_time"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/dp_7"
                        android:textColor="#181818"
                        android:textSize="@dimen/sp_10" />

                    <com.gingersoft.gsa.cloud.ui.view.TriangleView
                        android:id="@+id/iv_end_time_triangle"
                        android:layout_width="@dimen/dp_8"
                        android:layout_height="@dimen/dp_5"
                        android:layout_marginLeft="@dimen/dp_2"
                        app:trv_direction="bottom" />

                </LinearLayout>

                <com.github.mikephil.charting.charts.PieChart
                    android:id="@+id/report_sales_chart"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/dp_215"
                    android:layout_gravity="center"
                    android:layout_marginTop="@dimen/dp_10"
                    android:focusable="true"
                    android:focusableInTouchMode="true"
                    android:visibility="visible" />
            </LinearLayout>

        </com.lihang.ShadowLayout>

        <com.lihang.ShadowLayout
            android:id="@+id/layout_business_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_4"
            app:hl_cornerRadius="@dimen/dp_4"
            app:hl_dy="@dimen/main_shadow_dy"
            app:hl_shadowBackColor="@color/white"
            app:hl_shadowColor="@color/shadow_color"
            app:hl_shadowLimit="@dimen/main_shadow_limit">

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

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_marginTop="@dimen/dp_10"
                    android:layout_marginBottom="@dimen/dp_24"
                    android:focusable="true"
                    android:focusableInTouchMode="true"
                    android:text="食品銷售數量前十"
                    android:textColor="#181818"
                    android:textSize="@dimen/sp_17" />

                <include layout="@layout/include_horizontal_color_f0_dividing_line" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal">
                    <!--                序號要一直顯示，所以單獨放一邊-->
                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_sort_numbering"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />

                    <HorizontalScrollView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:scrollbars="none">

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


                </LinearLayout>
            </LinearLayout>
        </com.lihang.ShadowLayout>

        <com.lihang.ShadowLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_10"
            android:paddingBottom="@dimen/dp_15"
            app:hl_cornerRadius="@dimen/dp_4"
            app:hl_dy="@dimen/main_shadow_dy"
            app:hl_shadowBackColor="@color/white"
            app:hl_shadowColor="@color/shadow_color"
            app:hl_shadowLimit="@dimen/main_shadow_limit">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingRight="@dimen/dp_10"
                android:paddingBottom="@dimen/dp_10">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_marginTop="@dimen/dp_10"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="外送訂單"
                        android:textColor="#181818"
                        android:textSize="@dimen/sp_17" />

                    <com.gingersoft.gsa.cloud.main.mvp.ui.view.StartEndTimePickerView
                        android:id="@+id/time_select_picker"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />

                </LinearLayout>

                <com.gingersoft.gsa.cloud.ui.AAChartCoreLib.AAChartConfiger.AAChartView
                    android:id="@+id/pc_report_delivery"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/dp_150"
                    android:layout_marginTop="@dimen/dp_10" />
            </LinearLayout>

        </com.lihang.ShadowLayout>


    </LinearLayout>
</androidx.core.widget.NestedScrollView>