<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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="#0F1016">

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nestedScrollView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/bottom_layout"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_top_bg"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:src="@mipmap/ic_vip_top_bg"
                app:layout_constraintDimensionRatio="h,1125:975"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rv_meal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="-60dp"
                android:orientation="horizontal"
                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                app:layout_constraintTop_toBottomOf="@id/iv_top_bg"
                app:spanCount="3"
                tools:itemCount="3"
                tools:listitem="@layout/listitem_vip_meal" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/layout_tip"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_20"
                android:layout_marginTop="@dimen/dp_10"
                android:layout_marginEnd="@dimen/dp_20"
                app:layout_constraintTop_toBottomOf="@id/rv_meal">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_24"
                    android:layout_marginBottom="@dimen/dp_24"
                    android:background="@drawable/shape_vip_tips_bg"
                    android:paddingTop="@dimen/dp_20"
                    android:paddingBottom="@dimen/dp_20"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <TextView
                        android:id="@+id/tv_tip_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:drawableStart="@mipmap/ic_vip_tips_star"
                        android:drawableEnd="@mipmap/ic_vip_tips_star"
                        android:drawablePadding="@dimen/dp_8"
                        android:gravity="center"
                        android:text="解锁以下会员权益"
                        android:textColor="#FFEADB"
                        android:textSize="@dimen/sp_16"
                        android:textStyle="bold"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatImageView
                        android:id="@+id/iv_tip_divider"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_16"
                        android:src="@mipmap/ic_vip_tips_divider"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/tv_tip_title" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_tip"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_2"
                        android:overScrollMode="never"
                        app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                        app:layout_constraintTop_toBottomOf="@id/iv_tip_divider"
                        app:spanCount="4"
                        tools:listitem="@layout/listitem_vip_tip" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/ic_vip_tips_light"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/ic_vip_tips_light"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/layout_meal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_20"
                app:layout_constraintTop_toBottomOf="@id/layout_tip">

                <TextView
                    android:id="@+id/tv_pay_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_20"
                    android:layout_marginTop="@dimen/dp_9"
                    android:text="支付方式"
                    android:textColor="#FFEADB"
                    android:textSize="@dimen/sp_14"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/tvWxPay"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:drawableStart="@mipmap/ic_wx_pay"
                    android:drawableEnd="@mipmap/ic_pay_false"
                    android:drawablePadding="@dimen/dp_12"
                    android:gravity="center_vertical"
                    android:paddingStart="@dimen/dp_20"
                    android:paddingTop="@dimen/dp_20"
                    android:paddingEnd="@dimen/dp_20"
                    android:paddingBottom="@dimen/dp_20"
                    android:text="微信"
                    android:textColor="@color/color_80ffffff"
                    android:textSize="@dimen/sp_15"
                    app:layout_constraintTop_toBottomOf="@+id/tv_pay_title" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/dp_1"
                    android:layout_marginStart="@dimen/dp_20"
                    android:layout_marginEnd="@dimen/dp_20"
                    android:background="@color/color_1affffff"
                    app:layout_constraintTop_toBottomOf="@id/tvWxPay" />

                <TextView
                    android:id="@+id/tvAliPay"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:drawableStart="@mipmap/ic_ali_pay"
                    android:drawableEnd="@mipmap/ic_pay_false"
                    android:drawablePadding="@dimen/dp_12"
                    android:gravity="center_vertical"
                    android:paddingStart="@dimen/dp_20"
                    android:paddingTop="@dimen/dp_20"
                    android:paddingEnd="@dimen/dp_20"
                    android:paddingBottom="@dimen/dp_20"
                    android:text="支付宝"
                    android:textColor="@color/color_80ffffff"
                    android:textSize="@dimen/sp_15"
                    app:layout_constraintTop_toBottomOf="@id/tvWxPay" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/dp_1"
                    android:layout_marginStart="@dimen/dp_20"
                    android:layout_marginEnd="@dimen/dp_20"
                    android:background="@color/color_1affffff"
                    app:layout_constraintTop_toBottomOf="@id/tvAliPay" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <CheckBox
                android:id="@+id/cb_agree"
                android:layout_width="@dimen/dp_20"
                android:layout_height="@dimen/dp_20"
                android:layout_marginStart="@dimen/dp_20"
                android:layout_marginTop="@dimen/dp_20"
                android:background="@null"
                android:button="@null"
                android:drawableStart="@drawable/selector_default_check"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/layout_meal" />

            <TextView
                android:id="@+id/tv_agree"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_5"
                android:layout_marginEnd="@dimen/dp_20"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:text="我已阅读并同意《会员服务协议规则》和《自动续费服务规则》"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_14"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/cb_agree"
                app:layout_constraintTop_toTopOf="@id/cb_agree" />

            <!--<TextView
                android:id="@+id/tv_agree"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_20"
                android:layout_marginTop="@dimen/dp_20"
                android:layout_marginEnd="@dimen/dp_20"
                android:drawableStart="@mipmap/ic_pay_false"
                android:drawablePadding="@dimen/dp_10"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:text="我已阅读并同意《会员服务协议规则》和《自动续费服务规则》"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_14"
                app:layout_constraintTop_toBottomOf="@id/layout_meal" />-->

            <View
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_15"
                app:layout_constraintTop_toBottomOf="@id/tv_agree" />

        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>

    <com.example.base.widget.TitleBar
        android:id="@+id/mTitleBar"
        style="@style/Custom.TitleBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:navigationIcon="@drawable/ic_back_black"
        app:title=" " />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/bottom_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/shape_vip_bottom_bg"
        android:paddingStart="@dimen/dp_20"
        android:paddingTop="@dimen/dp_9"
        android:paddingEnd="@dimen/dp_20"
        android:paddingBottom="@dimen/dp_30"
        app:layout_constraintBottom_toBottomOf="parent">

        <TextView
            android:id="@+id/tv_price"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="￥99.90/年"
            android:textColor="#FBF4FA"
            android:textSize="@dimen/sp_24"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/tv_origin_price"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/dp_8"
            android:text="￥129.9"
            android:textColor="#999EAC"
            android:textSize="@dimen/sp_12"
            app:layout_constraintBottom_toBottomOf="@id/tv_price"
            app:layout_constraintStart_toEndOf="@id/tv_price" />

        <com.cheng.bole.widget.CommonShapeView
            android:id="@+id/nextBtn"
            android:layout_width="@dimen/dp_170"
            android:layout_height="@dimen/dp_46"
            android:layout_marginStart="@dimen/dp_14"
            android:text="立即开通"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_16"
            android:textStyle="bold"
            app:csb_activeEnable="true"
            app:csb_cornerRadius="@dimen/dp_25"
            app:csb_endColor="#204FC7"
            app:csb_orientation="TOP_BOTTOM"
            app:csb_startColor="#6E90E7"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>