<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="memberViewModel"
            type="com.datarecovery.master.module.member.MemberViewModel" />

        <import type="com.atmob.common.ui.SizeUtil" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#4C61E5">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/tool_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:navigationIcon="@drawable/icon_back_white">

            <TextView
                style="@style/Tool_Bar_Title_Txt"
                android:text="@string/member_action_title"
                android:textColor="@color/white" />

        </androidx.appcompat.widget.Toolbar>


        <androidx.core.widget.NestedScrollView
            android:id="@+id/nested_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/tool_bar">

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

                <Space
                    android:id="@+id/space1"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:8"
                    app:layout_constraintTop_toTopOf="parent" />

                <View
                    android:id="@+id/v_buy_bg"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="8dp"
                    android:alpha="0.5"
                    android:background="@drawable/bg_member_buy"
                    app:layout_constraintDimensionRatio="284:28"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/space1"
                    app:layout_constraintWidth_percent="0.7888888888888889" />


                <ViewSwitcher
                    android:id="@+id/view_switcher"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="8dp"
                    app:layout_constraintBottom_toBottomOf="@+id/v_buy_bg"
                    app:layout_constraintEnd_toEndOf="@+id/v_buy_bg"
                    app:layout_constraintStart_toStartOf="@+id/v_buy_bg"
                    app:layout_constraintTop_toTopOf="@+id/v_buy_bg" />

                <Space
                    android:id="@+id/space2"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:16"
                    app:layout_constraintTop_toBottomOf="@id/v_buy_bg" />

                <Space
                    android:id="@+id/space3"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:20"
                    app:layout_constraintTop_toBottomOf="@+id/space2" />

                <View
                    android:id="@+id/v_buy_list_bg"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginHorizontal="8dp"
                    android:background="@drawable/bg_member_container"
                    app:layout_constraintBottom_toBottomOf="@+id/space6"
                    app:layout_constraintTop_toTopOf="@+id/space3" />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginHorizontal="8dp"
                    android:src="@drawable/icon_member_serve"
                    app:layout_constraintDimensionRatio="1032:300"
                    app:layout_constraintTop_toTopOf="@id/v_buy_list_bg" />

                <View
                    android:id="@+id/v_label1"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
                    android:background="@drawable/bg_member_label"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_choose_services"
                    app:layout_constraintDimensionRatio="5:16"
                    app:layout_constraintStart_toStartOf="@id/v_buy_list_bg"
                    app:layout_constraintTop_toTopOf="@+id/tv_choose_services"
                    app:layout_constraintWidth_percent="0.0138888888888889" />

                <TextView
                    android:id="@+id/tv_choose_services"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="6dp"
                    android:text="@string/member_choose_services"
                    android:textColor="#202020"
                    android:textSize="17sp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toEndOf="@+id/v_label1"
                    app:layout_constraintTop_toBottomOf="@+id/space3" />

                <Space
                    android:id="@+id/space4"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:19"
                    app:layout_constraintTop_toBottomOf="@+id/tv_choose_services" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/member_detail_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
                    android:overScrollMode="never"
                    app:layout_constraintEnd_toEndOf="@id/v_buy_list_bg"
                    app:layout_constraintStart_toStartOf="@id/v_buy_list_bg"
                    app:layout_constraintTop_toBottomOf="@+id/space4"
                    tools:itemCount="2"
                    tools:listitem="@layout/item_member_goods" />

                <Space
                    android:id="@+id/space5"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:19"
                    app:layout_constraintTop_toBottomOf="@+id/member_detail_list" />

                <View
                    android:id="@+id/v_label2"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
                    android:background="@drawable/bg_member_label"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_scenes_title"
                    app:layout_constraintDimensionRatio="5:16"
                    app:layout_constraintStart_toStartOf="@id/v_buy_list_bg"
                    app:layout_constraintTop_toTopOf="@+id/tv_scenes_title"
                    app:layout_constraintWidth_percent="0.0138888888888889" />

                <TextView
                    android:id="@+id/tv_scenes_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="6dp"
                    android:text="@string/member_scenes_title"
                    android:textColor="#202020"
                    android:textSize="17sp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toEndOf="@+id/v_label2"
                    app:layout_constraintTop_toBottomOf="@+id/space5" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/scenes_ry_view"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="16dp"
                    android:layout_marginTop="10dp"
                    android:background="@drawable/bg_scenes_container"
                    android:overScrollMode="never"
                    android:paddingHorizontal="12dp"
                    android:paddingVertical="8dp"
                    app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                    app:layout_constraintEnd_toEndOf="@id/v_buy_list_bg"
                    app:layout_constraintStart_toStartOf="@id/v_buy_list_bg"
                    app:layout_constraintTop_toBottomOf="@+id/tv_scenes_title"
                    app:spanCount="2"
                    tools:itemCount="4"
                    tools:listitem="@layout/item_normal_scenes" />

                <Space
                    android:id="@+id/space6"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:28"
                    app:layout_constraintTop_toBottomOf="@+id/scenes_ry_view" />

                <Space
                    android:id="@+id/space7"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:28"
                    app:layout_constraintTop_toBottomOf="@+id/space6" />

                <Space
                    android:id="@+id/space8"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:20"
                    app:layout_constraintTop_toBottomOf="@+id/space7" />

                <View
                    android:id="@+id/v_user_evaluate_bg"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:background="@drawable/bg_member_evaluate_container"
                    app:layout_constraintBottom_toBottomOf="@+id/space10"
                    app:layout_constraintTop_toTopOf="@id/space8" />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:src="@drawable/bg_user_evaluate_header"
                    app:layout_constraintDimensionRatio="1080:378"
                    app:layout_constraintTop_toTopOf="@+id/v_user_evaluate_bg" />


                <View
                    android:id="@+id/v_label3"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
                    android:background="@drawable/bg_user_evaluate_label"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_user_evaluate"
                    app:layout_constraintDimensionRatio="5:16"
                    app:layout_constraintStart_toStartOf="@+id/v_user_evaluate_bg"
                    app:layout_constraintTop_toTopOf="@+id/tv_user_evaluate"
                    app:layout_constraintWidth_percent="0.0138888888888889" />

                <TextView
                    android:id="@+id/tv_user_evaluate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="4dp"
                    android:text="@string/member_user_evaluate"
                    android:textColor="#633B00"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toEndOf="@+id/v_label3"
                    app:layout_constraintTop_toBottomOf="@+id/space8" />

                <Space
                    android:id="@+id/space9"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:12"
                    app:layout_constraintTop_toBottomOf="@+id/tv_user_evaluate" />


                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/user_evaluate_ry_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:overScrollMode="never"
                    app:layout_constraintTop_toBottomOf="@+id/space9"
                    tools:itemCount="2"
                    tools:listitem="@layout/item_member_evaluate" />

                <TextView
                    android:id="@+id/tv_evaluate_bottom"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/member_good_comment"
                    android:textColor="#AAAAAA"
                    android:textSize="13sp"
                    app:layout_constraintEnd_toEndOf="@+id/user_evaluate_ry_view"
                    app:layout_constraintStart_toStartOf="@+id/user_evaluate_ry_view"
                    app:layout_constraintTop_toBottomOf="@+id/user_evaluate_ry_view" />

                <Space
                    android:id="@+id/space10"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:16"
                    app:layout_constraintTop_toBottomOf="@+id/tv_evaluate_bottom" />

                <View
                    android:id="@+id/v_bottom_bg"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:background="#F5353D6C"
                    app:layout_constraintDimensionRatio="360:56"
                    app:layout_constraintTop_toBottomOf="@+id/space10" />

                <ImageView
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:src="@drawable/icon_member_bottom"
                    app:layout_constraintBottom_toBottomOf="@+id/v_bottom_bg"
                    app:layout_constraintDimensionRatio="804:72"
                    app:layout_constraintEnd_toEndOf="@+id/v_bottom_bg"
                    app:layout_constraintStart_toStartOf="@+id/v_bottom_bg"
                    app:layout_constraintTop_toTopOf="@+id/v_bottom_bg"
                    app:layout_constraintWidth_percent="0.7444444444444444" />

                <Space
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:90"
                    app:layout_constraintTop_toBottomOf="@+id/v_bottom_bg" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.core.widget.NestedScrollView>


        <View
            android:id="@+id/v_bottom"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:background="#F5353D6C"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="360:90" />

        <TextView
            android:id="@+id/tv_buy_member"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
            android:layout_marginTop="12dp"
            android:background="@drawable/bg_member_buy_btn"
            android:gravity="center"
            android:onClick="@{() -> memberViewModel.onMemberSubscribeClick()}"
            android:text="@{memberViewModel.getSubscribeTxt}"
            android:textColor="#202020"
            android:textSize="17sp"
            android:textStyle="bold"
            app:layout_constraintDimensionRatio="328:44"
            app:layout_constraintEnd_toEndOf="@+id/v_bottom"
            app:layout_constraintStart_toStartOf="@+id/v_bottom"
            app:layout_constraintTop_toTopOf="@+id/v_bottom"
            tools:text="立即开通" />

        <TextView
            android:id="@+id/tv_buy_member_desc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:textColor="@color/white60"
            app:layout_constraintEnd_toEndOf="@+id/tv_buy_member"
            app:layout_constraintStart_toStartOf="@+id/tv_buy_member"
            app:layout_constraintTop_toBottomOf="@+id/tv_buy_member"
            tools:text="支付即代表您已阅读并同意《服务说明》" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>
