<?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:background="@color/color_f6f8f9"
    android:orientation="vertical">

    <include
        android:id="@+id/toolbar_include"
        layout="@layout/common_toolbar_layout" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

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



            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_earning_card"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_12"
                android:layout_marginTop="@dimen/dp_12"
                android:layout_marginEnd="@dimen/dp_12"
                android:background="@drawable/bg_white_10dp"
                app:layout_constraintTop_toBottomOf="@id/header_bar_view">

                <TextView
                    android:id="@+id/tv_all_earnings_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_12"
                    android:layout_marginTop="@dimen/dp_17"
                    android:drawablePadding="@dimen/dp_5"
                    android:text="总收入(元)"
                    android:textColor="@color/black"
                    android:textSize="@dimen/dp_18"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/tv_all_earnings"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="0.00 "
                    android:textColor="@color/color_ff4e19"
                    android:textSize="@dimen/dp_26"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="@id/tv_all_earnings_title"
                    app:layout_constraintTop_toBottomOf="@id/tv_all_earnings_title" />
                <CheckBox
                    android:id="@+id/cb_screen"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/dp_44"
                    android:layout_marginRight="@dimen/dp_12"
                    android:button="@null"
                    android:drawableEnd="@drawable/icon_arrow_down"
                    android:drawablePadding="@dimen/dp_5"
                    android:gravity="center"
                    android:paddingStart="@dimen/dp_12"
                    android:paddingEnd="@dimen/dp_12"
                    android:layout_marginTop="@dimen/dp_17"

                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    android:text=""
                    android:textColor="@color/color_1a1a1a"
                    android:textSize="@dimen/dp_14"
                   />
                <View
                    android:layout_width="0dp"
                    android:layout_height="@dimen/dp_1"
                    android:layout_marginTop="@dimen/dp_10"
                    android:layout_marginEnd="@dimen/dp_12"
                    android:background="@color/divide_color"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="@id/tv_all_earnings"
                    app:layout_constraintTop_toBottomOf="@id/tv_all_earnings" />


                <FrameLayout
                    android:id="@+id/view_parent"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/dp_250"
                    android:layout_marginStart="@dimen/dp_12"
                    android:layout_marginEnd="@dimen/dp_12"
                    android:layout_marginBottom="@dimen/dp_20"
                    android:scrollbars="none"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="@id/space" />

                <View
                    android:id="@+id/space"
                    android:layout_width="@dimen/dp_20"
                    android:layout_height="@dimen/dp_20"
                    app:layout_constraintBottom_toBottomOf="@id/rv_stacked"
                    app:layout_constraintStart_toStartOf="@id/rv_stacked" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_stacked"
                    android:layout_width="@dimen/dp_0"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_44"
                    android:background="@color/white"
                    android:overScrollMode="never"
                    android:paddingStart="@dimen/dp_10"
                    android:paddingEnd="@dimen/dp_10"
                    android:scrollbars="none"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/tv_all_earnings"
                    tools:listitem="@layout/earnings_structure_stacked_list_item" />

                <LinearLayout
                    android:id="@+id/rl_net_error_root"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_30"
                    android:background="@android:color/transparent"
                    android:gravity="center"
                    android:orientation="vertical"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/rv_stacked">


                    <ImageView
                        android:id="@+id/txt_net_error"
                        android:layout_width="@dimen/dp_120"
                        android:layout_height="@dimen/dp_120"
                        android:layout_centerInParent="true"
                        android:gravity="center_horizontal"
                        android:src="@drawable/empty_message_data" />

                    <TextView
                        android:id="@+id/btn_net_refresh"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_horizontal"
                        android:gravity="center"
                        android:padding="16dp"
                        android:text="暂无数据"
                        android:textColor="#777777"
                        android:textSize="16sp" />

                </LinearLayout>

                <ImageView
                    android:layout_width="@dimen/dp_3"
                    android:layout_height="@dimen/dp_15"
                    android:background="@drawable/shape_course_status_ing"
                    app:layout_constraintBottom_toBottomOf="@id/tv_earnings_structure"
                    app:layout_constraintStart_toStartOf="@id/tv_earnings_structure"
                    app:layout_constraintTop_toTopOf="@id/tv_earnings_structure" />


                <TextView
                    android:id="@+id/tv_earnings_structure"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_15"
                    android:layout_marginTop="@dimen/dp_15"
                    android:text="  收入结构"
                    android:textColor="@color/color_808080"
                    android:textSize="@dimen/dp_16"
                    app:layout_constraintHorizontal_chainStyle="spread_inside"
                    app:layout_constraintHorizontal_weight="1"
                    app:layout_constraintStart_toStartOf="@id/tv_all_earnings"
                    app:layout_constraintTop_toBottomOf="@id/view_parent" />


                <FrameLayout
                    android:id="@+id/doughnut_parent"
                    android:layout_width="@dimen/dp_150"
                    android:layout_height="@dimen/dp_150"
                    android:layout_marginTop="@dimen/dp_14"
                    android:layout_marginEnd="@dimen/dp_12"
                    android:layout_marginBottom="@dimen/dp_20"
                    android:scrollbars="none"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/tv_earnings_structure" />


                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_doughnut"
                    android:layout_width="@dimen/dp_0"
                    android:layout_height="0dp"
                    android:layout_marginTop="@dimen/dp_10"
                    android:overScrollMode="never"
                    android:scrollbars="none"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@id/doughnut_parent"
                    app:layout_constraintTop_toTopOf="@id/doughnut_parent"
                    tools:listitem="@layout/earnings_structure_doughnut_list_item" />

            </androidx.constraintlayout.widget.ConstraintLayout>

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