<?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:binding="http://schemas.android.com/apk/res-auto"
    xmlns:tool="http://schemas.android.com/tool"
    tool:ignore="RtlHardcoded">

    <data>

        <variable
            name="viewModel"
            type="com.hongyegroup.cpt_main.mvvm.ProfileViewModel" />

        <variable
            name="click"
            type="com.hongyegroup.cpt_main.ui.ProfileFragment.ClickProxy" />

    </data>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="right"
                android:orientation="vertical"
               android:background="@drawable/shape_gradient_proifle_title_top">

                <com.guadou.lib_baselib.view.titlebar.StatusbarGrayView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

                <FrameLayout
                    android:id="@+id/fl_title_right_box"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="@dimen/d_10dp">

                    <ImageView
                        android:id="@+id/iv_notify_icon"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:padding="@dimen/d_9dp"
                        android:src="@drawable/notification_white"
                        android:visibility="visible" />

                    <TextView
                        android:id="@+id/tv_badge_num"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="start"
                        android:layout_marginTop="@dimen/d_5dp"
                        android:background="@drawable/badge_red"
                        android:maxLength="2"
                        android:paddingLeft="@dimen/d_5dp"
                        android:paddingTop="@dimen/d_2dp"
                        android:paddingRight="@dimen/d_5dp"
                        android:paddingBottom="@dimen/d_2dp"
                        android:textColor="@color/white"
                        android:textSize="8sp"
                        android:visibility="visible"
                        tool:text="99" />

                </FrameLayout>

            </LinearLayout>

            <com.scwang.smart.refresh.layout.SmartRefreshLayout
                android:id="@+id/refresh_layout_profile"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/white"
                app:srlAccentColor="#03A3FE"
                app:srlEnablePreviewInEditMode="false"
                app:srlPrimaryColor="@color/app_blue">

                <com.scwang.smart.refresh.header.ClassicsHeader
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:srlAccentColor="@color/white" />

                <ScrollView
                    android:id="@+id/profilr_scroll_root"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:overScrollMode="never"
                    android:scrollbars="none">

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

                        <!--    头部     -->
                        <FrameLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content">

                            <!--     弧形的渐变    -->
                            <View
                                android:layout_width="match_parent"
                                android:layout_height="@dimen/d_150dp"
                                android:background="@drawable/shape_gradient_proifle_title_bottom" />

                            <LinearLayout
                                android:id="@+id/frame_profile_banner"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="@dimen/d_5dp"
                                android:layout_marginTop="@dimen/d_40dp"
                                android:layout_marginRight="@dimen/d_5dp"
                                android:background="@drawable/profile_white_shadow_comm_bg"
                                android:orientation="vertical">

                                <androidx.constraintlayout.widget.ConstraintLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="center_horizontal"
                                    android:layout_marginTop="@dimen/d_40dp"
                                    android:gravity="center"
                                    android:orientation="horizontal">

                                    <com.guadou.lib_baselib.font_text_view.TextViewBold
                                        android:id="@+id/text_view_full_name"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_centerInParent="true"
                                        android:gravity="center"
                                        android:maxWidth="200dp"
                                        android:text="-"
                                        android:textColor="@color/profile_black_28394a"
                                        android:textSize="24sp"
                                        app:layout_constraintBottom_toBottomOf="parent"
                                        app:layout_constraintLeft_toLeftOf="parent"
                                        app:layout_constraintRight_toRightOf="parent"
                                        app:layout_constraintTop_toTopOf="parent" />

                                    <ImageView
                                        android:id="@+id/button_edit_profile"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_marginLeft="@dimen/d_13dp"
                                        android:layout_marginTop="@dimen/d_4dp"
                                        android:layout_toRightOf="@id/text_view_full_name"
                                        android:src="@drawable/iv_profile_edit"
                                        app:layout_constraintBottom_toBottomOf="@id/text_view_full_name"
                                        app:layout_constraintLeft_toRightOf="@id/text_view_full_name"
                                        app:layout_constraintTop_toTopOf="@id/text_view_full_name" />

                                </androidx.constraintlayout.widget.ConstraintLayout>

                                <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                    android:id="@+id/text_view_email_address"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="center_horizontal"
                                    android:layout_marginLeft="@dimen/d_15dp"
                                    android:layout_marginRight="@dimen/d_15dp"
                                    android:gravity="center"
                                    android:text="-"
                                    android:textColor="#8098B2"
                                    android:textSize="13.8dp" />

                                <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                    android:id="@+id/text_view_joined_date"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="center_horizontal"
                                    android:layout_marginLeft="@dimen/d_15dp"
                                    android:layout_marginRight="@dimen/d_15dp"
                                    android:gravity="center"
                                    android:text="-"
                                    android:textColor="#8098B2"
                                    android:textSize="13.8dp" />

                                <RelativeLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="@dimen/d_9dp">

                                    <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                        android:id="@+id/text_view_profile_points"
                                        android:layout_width="105dp"
                                        android:layout_height="25dp"
                                        android:layout_centerHorizontal="true"
                                        android:background="@drawable/shape_5round_main_blue"
                                        android:gravity="center"
                                        android:text="- Credits"
                                        android:textColor="@color/white"
                                        android:textSize="13.5dp" />

                                    <ImageView
                                        android:id="@+id/button_help_points"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_centerVertical="true"
                                        android:layout_gravity="center_vertical"
                                        android:layout_marginLeft="@dimen/d_9dp"
                                        android:layout_toRightOf="@id/text_view_profile_points"
                                        android:contentDescription="@string/null_data"
                                        android:src="@drawable/help_blue" />

                                </RelativeLayout>


                                <androidx.constraintlayout.widget.ConstraintLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="@dimen/d_10dp"
                                    android:orientation="horizontal"
                                    android:paddingLeft="@dimen/d_15dp"
                                    android:paddingRight="@dimen/d_15dp"
                                    android:paddingBottom="@dimen/d_23dp">

                                    <!--pending jobs-->
                                    <LinearLayout
                                        android:id="@+id/ll_padding_job"
                                        android:layout_width="wrap_content"
                                        android:layout_height="match_parent"
                                        android:layout_weight="1.2"
                                        android:gravity="center"
                                        android:orientation="vertical"
                                        android:padding="@dimen/d_5dp"
                                        app:layout_constraintBottom_toBottomOf="parent"
                                        app:layout_constraintLeft_toLeftOf="parent"
                                        app:layout_constraintTop_toTopOf="parent">

                                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                            android:id="@+id/text_view_pending_jobs_count"
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:text="@string/null_data"
                                            android:textColor="@color/profile_black_28394a"
                                            android:textSize="@dimen/d_17sp"
                                            tool:ignore="TooDeepLayout"
                                            tool:text="789" />

                                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:layout_marginTop="@dimen/d_3dp"
                                            android:text="朋友圈发布"
                                            android:textColor="#8098B2"
                                            android:textSize="13.8dp" />

                                    </LinearLayout>


                                    <!--completed jobs-->
                                    <LinearLayout
                                        android:id="@+id/ll_completed_job"
                                        android:layout_width="wrap_content"
                                        android:layout_height="match_parent"
                                        android:layout_weight="1"
                                        android:gravity="center"
                                        android:orientation="vertical"
                                        android:padding="@dimen/d_5dp"
                                        app:layout_constraintBottom_toBottomOf="parent"
                                        app:layout_constraintLeft_toRightOf="@id/ll_padding_job"
                                        app:layout_constraintRight_toLeftOf="@id/ll_rewards_box"
                                        app:layout_constraintTop_toTopOf="parent">

                                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                            android:id="@+id/text_view_completed_jobs_count"
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:text="@string/null_data"
                                            android:textColor="@color/profile_black_28394a"
                                            android:textSize="@dimen/d_17sp"
                                            tool:text="789" />

                                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:layout_marginTop="@dimen/d_3dp"
                                            android:text="已关注"
                                            android:textColor="#8098B2"
                                            android:textSize="13.8dp" />

                                    </LinearLayout>


                                    <!--Rewards-->
                                    <androidx.constraintlayout.widget.ConstraintLayout
                                        android:id="@+id/ll_rewards_box"
                                        android:layout_width="wrap_content"
                                        android:layout_height="match_parent"
                                        android:layout_weight="1"
                                        android:gravity="center"
                                        android:padding="@dimen/d_5dp"
                                        app:layout_constraintBottom_toBottomOf="parent"
                                        app:layout_constraintRight_toRightOf="parent"
                                        app:layout_constraintTop_toTopOf="parent">

                                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                            android:id="@+id/text_view_money_earned"
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:text="@string/null_data"
                                            android:textColor="@color/profile_black_28394a"
                                            android:textSize="@dimen/d_17sp"
                                            app:layout_constraintBottom_toTopOf="@id/tv_text_rewards"
                                            app:layout_constraintLeft_toLeftOf="parent"
                                            app:layout_constraintRight_toRightOf="parent"
                                            app:layout_constraintTop_toTopOf="parent"
                                            tool:text="789" />

                                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
                                            android:id="@+id/tv_text_rewards"
                                            android:layout_width="wrap_content"
                                            android:layout_height="wrap_content"
                                            android:layout_centerHorizontal="true"
                                            android:layout_marginTop="@dimen/d_3dp"
                                            android:text="粉丝"
                                            android:textColor="#8098B2"
                                            android:textSize="13.8dp"
                                            app:layout_constraintBottom_toBottomOf="parent"
                                            app:layout_constraintLeft_toLeftOf="parent"
                                            app:layout_constraintRight_toRightOf="parent"
                                            app:layout_constraintTop_toBottomOf="@id/text_view_money_earned" />

                                    </androidx.constraintlayout.widget.ConstraintLayout>

                                </androidx.constraintlayout.widget.ConstraintLayout>

                            </LinearLayout>


                            <com.guadou.lib_baselib.view.CircleImageView
                                android:id="@+id/image_view_profile_photo"
                                android:layout_width="@dimen/d_70dp"
                                android:layout_height="@dimen/d_70dp"
                                android:layout_gravity="center_horizontal"
                                android:layout_marginTop="@dimen/d_5dp"
                                android:scaleType="centerCrop"
                                android:src="@drawable/im_default_head"
                                app:civ_border_color="@color/white"
                                app:civ_border_overlay="true"
                                app:civ_border_width="@dimen/d_1dp" />


                        </FrameLayout>


                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_marginLeft="@dimen/d_5dp"
                            android:layout_marginRight="@dimen/d_5dp"
                            android:background="@drawable/profile_white_shadow_comm_bg"
                            android:orientation="vertical"
                            android:paddingBottom="@dimen/d_20dp">


                            <com.guadou.lib_baselib.font_text_view.TextViewBold
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="@dimen/d_22dp"
                                android:layout_marginTop="@dimen/d_22dp"
                                android:layout_marginBottom="@dimen/d_12dp"
                                android:gravity="center"
                                android:text="我的服务"
                                android:textColor="@color/profile_black_28394a"
                                android:textSize="@dimen/d_18dp" />


                            <!--  邀请好友   -->
                            <RelativeLayout
                                android:id="@+id/ll_me_invite_and_earn"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:background="@drawable/transparent_bg_selector"
                                android:clickable="true"
                                android:orientation="horizontal"
                                android:paddingLeft="@dimen/d_25dp"
                                android:paddingTop="@dimen/d_15dp"
                                android:paddingRight="@dimen/d_25dp"
                                android:paddingBottom="@dimen/d_15dp"
                                binding:clicks="@{click.gotoInviteFriendsActivity}"
                                android:visibility="visible">

                                <ImageView
                                    android:id="@+id/iv_me_gift"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:src="@drawable/iv_me_invite_friends" />

                                <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                    android:id="@+id/tv_invite_text"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="@dimen/d_15dp"
                                    android:layout_marginLeft="@dimen/d_15dp"
                                    android:layout_toRightOf="@id/iv_me_gift"
                                    android:text="邀请朋友赚奖励"
                                    android:textColor="@color/black"
                                    android:textSize="@dimen/d_14sp" />

                                <TextView
                                    android:id="@+id/tv_me_invite_new"
                                    android:layout_width="33dp"
                                    android:layout_height="wrap_content"
                                    android:layout_marginLeft="@dimen/d_10dp"
                                    android:layout_toRightOf="@id/tv_invite_text"
                                    android:background="@drawable/iv_me_pet_farming_bg"
                                    android:gravity="center"
                                    android:paddingBottom="1.2dp"
                                    android:text="新"
                                    android:textColor="@color/white"
                                    android:textSize="@dimen/d_9sp"
                                    android:visibility="gone"
                                    tool:visibility="visible" />

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:layout_centerVertical="true"
                                    android:src="@drawable/back_more_black" />

                            </RelativeLayout>


                            <!--Promotions (隐藏了)-->
                            <!--                        <RelativeLayout-->
                            <!--                            android:id="@+id/rl_me_promotion"-->
                            <!--                            android:layout_width="match_parent"-->
                            <!--                            android:layout_height="wrap_content"-->
                            <!--                            android:background="@drawable/transparent_bg_selector"-->
                            <!--                            android:clickable="true"-->
                            <!--                            android:orientation="horizontal"-->
                            <!--                            android:paddingLeft="@dimen/d_25dp"-->
                            <!--                            android:paddingTop="@dimen/d_15dp"-->
                            <!--                            android:paddingRight="@dimen/d_25dp"-->
                            <!--                            android:paddingBottom="@dimen/d_15dp"-->
                            <!--                            android:visibility="gone">-->

                            <!--                            <ImageView-->
                            <!--                                android:id="@+id/iv_me_promotion"-->
                            <!--                                android:layout_width="@dimen/d_20dp"-->
                            <!--                                android:layout_height="@dimen/d_20dp"-->
                            <!--                                android:contentDescription="@string/customer_support"-->
                            <!--                                android:src="@drawable/iv_me_promotions" />-->

                            <!--                            <com.guadou.componentservice.font_text_view.TextViewRegular-->
                            <!--                                android:layout_width="wrap_content"-->
                            <!--                                android:layout_height="wrap_content"-->
                            <!--                                android:layout_marginStart="@dimen/d_15dp"-->
                            <!--                                android:layout_marginLeft="@dimen/d_15dp"-->
                            <!--                                android:layout_toRightOf="@id/iv_me_promotion"-->
                            <!--                                android:text="@string/my_promotions"-->
                            <!--                                android:textColor="@color/black"-->
                            <!--                                android:textSize="@dimen/me_text_size" />-->

                            <!--                            <ImageView-->
                            <!--                                android:id="@+id/iv_promotion_back"-->
                            <!--                                android:layout_width="wrap_content"-->
                            <!--                                android:layout_height="wrap_content"-->
                            <!--                                android:layout_alignParentRight="true"-->
                            <!--                                android:layout_centerVertical="true"-->
                            <!--                                android:src="@drawable/iv_back" />-->

                            <!--                        </RelativeLayout>-->


                            <!--Operation Executive Evaluation 评分隐藏-->
                            <!--                        <RelativeLayout-->
                            <!--                            android:id="@+id/rl_me_evaluation"-->
                            <!--                            android:layout_width="match_parent"-->
                            <!--                            android:layout_height="wrap_content"-->
                            <!--                            android:background="@drawable/transparent_bg_selector"-->
                            <!--                            android:clickable="true"-->
                            <!--                            android:orientation="horizontal"-->
                            <!--                            android:paddingLeft="@dimen/d_25dp"-->
                            <!--                            android:paddingTop="@dimen/d_15dp"-->
                            <!--                            android:paddingRight="@dimen/d_25dp"-->
                            <!--                            android:paddingBottom="@dimen/d_15dp"-->
                            <!--                            android:visibility="gone">-->

                            <!--                            <ImageView-->
                            <!--                                android:id="@+id/iv_me_evaluation"-->
                            <!--                                android:layout_width="@dimen/d_20dp"-->
                            <!--                                android:layout_height="@dimen/d_20dp"-->
                            <!--                                android:contentDescription="@string/customer_support"-->
                            <!--                                android:src="@drawable/iv_me_evaluation" />-->

                            <!--                            <com.guadou.componentservice.font_text_view.TextViewRegular-->
                            <!--                                android:layout_width="wrap_content"-->
                            <!--                                android:layout_height="wrap_content"-->
                            <!--                                android:layout_marginStart="@dimen/d_15dp"-->
                            <!--                                android:layout_marginLeft="@dimen/d_15dp"-->
                            <!--                                android:layout_toRightOf="@+id/iv_me_evaluation"-->
                            <!--                                android:text="@string/operation_executive_evaluation"-->
                            <!--                                android:textColor="@color/black"-->
                            <!--                                android:textSize="@dimen/me_text_size" />-->

                            <!--                            <ImageView-->
                            <!--                                android:id="@+id/iv_me_evaluation_back"-->
                            <!--                                android:layout_width="wrap_content"-->
                            <!--                                android:layout_height="wrap_content"-->
                            <!--                                android:layout_alignParentRight="true"-->
                            <!--                                android:layout_centerVertical="true"-->
                            <!--                                android:src="@drawable/iv_back" />-->


                            <!--                        </RelativeLayout>-->


                            <!-- Help Center  -->
                            <RelativeLayout
                                android:id="@+id/button_customer_support"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:background="@drawable/transparent_bg_selector"
                                android:clickable="true"
                                android:orientation="horizontal"
                                android:paddingLeft="@dimen/d_25dp"
                                android:paddingTop="@dimen/d_15dp"
                                android:paddingRight="@dimen/d_25dp"
                                android:paddingBottom="@dimen/d_15dp">

                                <ImageView
                                    android:id="@+id/iv_customer_support_black"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:src="@drawable/iv_me_help_center" />

                                <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="@dimen/d_15dp"
                                    android:layout_marginLeft="@dimen/d_15dp"
                                    android:layout_toRightOf="@id/iv_customer_support_black"
                                    android:text="帮助中心"
                                    android:textColor="@color/profile_black_28394a"
                                    android:textSize="@dimen/d_14sp" />

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:layout_centerVertical="true"
                                    android:src="@drawable/back_more_black" />

                            </RelativeLayout>


                            <!-- Setting  -->
                            <RelativeLayout
                                android:id="@+id/button_setting"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:background="@drawable/transparent_bg_selector"
                                android:clickable="true"
                                android:orientation="horizontal"
                                binding:clicks="@{click.gotoSettingsActivity}"
                                android:paddingLeft="@dimen/d_25dp"
                                android:paddingTop="@dimen/d_15dp"
                                android:paddingRight="@dimen/d_25dp"
                                android:paddingBottom="@dimen/d_15dp">

                                <ImageView
                                    android:id="@+id/iv_setting_black"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:src="@drawable/iv_me_app_setting" />

                                <com.guadou.lib_baselib.font_text_view.TextViewMedium
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="@dimen/d_15dp"
                                    android:layout_marginLeft="@dimen/d_15dp"
                                    android:layout_toRightOf="@id/iv_setting_black"
                                    android:text="设置"
                                    android:textColor="@color/profile_black_28394a"
                                    android:textSize="@dimen/d_14sp" />

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:layout_centerVertical="true"
                                    android:src="@drawable/back_more_black" />

                            </RelativeLayout>

                        </LinearLayout>

                    </LinearLayout>

                </ScrollView>

            </com.scwang.smart.refresh.layout.SmartRefreshLayout>

        </LinearLayout>


        <View
            android:id="@+id/view_progress_bg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/progress_background"
            android:clickable="true"
            android:visibility="gone" />

        <ProgressBar
            android:id="@+id/progress_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminate="true"
            android:indeterminateTint="@color/colorAccent"
            android:indeterminateTintMode="src_atop"
            android:visibility="gone" />

    </FrameLayout>


</layout>
