<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:id="@+id/app_bar_layout"
        android:layout_height="wrap_content"
        android:background="@color/transparent"
        android:fitsSystemWindows="true"
        android:theme="@style/AppTheme.AppBarOverlay">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fitsSystemWindows="true"
            android:paddingBottom="0dp"
            app:contentScrim="@color/white"
            app:titleEnabled="false"
            app:scrimAnimationDuration="50"
            app:statusBarScrim="@color/white"
            app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

            <FrameLayout
                android:fitsSystemWindows="true"
                app:layout_collapseMode="parallax"
                android:layout_width="match_parent"
                android:layout_height="188dp">

                <ImageView
                    android:id="@+id/iv_header_bg"
                    android:layout_width="match_parent"
                    android:layout_height="188dp"
                    android:adjustViewBounds="true"
                    android:scaleType="centerCrop"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="188dp"
                    android:background="@color/color_40000000"
                    app:layout_constraintBottom_toBottomOf="@+id/iv_header_bg"
                    app:layout_constraintLeft_toLeftOf="@+id/iv_header_bg"
                    app:layout_constraintRight_toRightOf="@+id/iv_header_bg"
                    app:layout_constraintTop_toTopOf="@+id/iv_header_bg" />

            </FrameLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_collapseMode="parallax">

                <!--                <ImageView-->
                <!--                    android:id="@+id/iv_header_bg"-->
                <!--                    android:layout_width="match_parent"-->
                <!--                    android:layout_height="188dp"-->
                <!--                    android:adjustViewBounds="true"-->
                <!--                    android:scaleType="centerCrop"-->
                <!--                    app:layout_constraintLeft_toLeftOf="parent"-->
                <!--                    app:layout_constraintTop_toTopOf="parent" />-->

                <!--                <View-->
                <!--                    android:layout_width="0dp"-->
                <!--                    android:layout_height="0dp"-->
                <!--                    android:background="@color/color_40000000"-->
                <!--                    app:layout_constraintBottom_toBottomOf="@+id/iv_header_bg"-->
                <!--                    app:layout_constraintLeft_toLeftOf="@+id/iv_header_bg"-->
                <!--                    app:layout_constraintRight_toRightOf="@+id/iv_header_bg"-->
                <!--                    app:layout_constraintTop_toTopOf="@+id/iv_header_bg" />-->

                <View
                    android:id="@+id/view_status_bar"
                    android:layout_width="match_parent"
                    android:layout_height="1px"
                    app:layout_constraintTop_toTopOf="parent" />

                <ImageView
                    android:id="@+id/iv_back"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:layout_marginTop="15dp"
                    android:padding="10dp"
                    android:src="@drawable/icon_back_arrow_white"
                    android:visibility="invisible"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/view_status_bar" />

                <View
                    android:id="@+id/view_top_bg"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginStart="14dp"
                    android:layout_marginTop="53dp"
                    android:layout_marginEnd="14dp"
                    android:background="@drawable/shape_10dp_white"
                    app:layout_constraintBottom_toBottomOf="@+id/view_top_header_bottom_line"
                    app:layout_constraintTop_toBottomOf="@+id/iv_back" />

                <View
                    android:id="@+id/view_top_header_bottom_line"
                    android:layout_width="1px"
                    android:layout_height="1px"
                    android:layout_marginTop="16dp"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/tv_fans_title" />

                <TextView
                    android:id="@+id/tv_edit"
                    android:layout_width="60dp"
                    android:layout_height="28dp"
                    android:textStyle="bold"
                    android:layout_marginTop="11dp"
                    android:layout_marginEnd="11dp"
                    android:background="@drawable/shape_d8fff8_14dp"
                    android:gravity="center"
                    android:text="编辑"
                    android:textColor="@color/color_2dc7aa"
                    android:textSize="@dimen/sp_12"
                    app:layout_constraintRight_toRightOf="@+id/view_top_bg"
                    app:layout_constraintTop_toTopOf="@+id/view_top_bg" />

                <de.hdodenhof.circleimageview.CircleImageView
                    android:id="@+id/iv_avatar"
                    android:layout_width="78dp"
                    android:layout_height="78dp"
                    android:layout_marginStart="12dp"
                    android:layout_marginTop="14dp"
                    android:src="@drawable/icon_teacher_default_head"
                    app:civ_border_color="@color/white"
                    app:civ_border_width="2dp"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintTop_toBottomOf="@+id/iv_back" />

                <View
                    android:id="@+id/view_vip_help_line"
                    android:layout_width="1px"
                    android:layout_height="1px"
                    android:layout_marginEnd="25dp"
                    android:layout_marginBottom="22dp"
                    app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
                    app:layout_constraintRight_toRightOf="@+id/iv_avatar" />

                <ImageView
                    android:id="@+id/iv_vip"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/icon_vip_enable_big"
                    app:layout_constraintLeft_toRightOf="@+id/view_vip_help_line"
                    app:layout_constraintTop_toBottomOf="@+id/view_vip_help_line" />

                <TextView
                    android:id="@+id/tv_nickname"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:layout_marginTop="14dp"
                    android:includeFontPadding="false"
                    android:textColor="@color/color_1a1a1a"
                    android:textSize="@dimen/sp_18"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
                    app:layout_constraintVertical_chainStyle="packed"
                    tools:text="游客12e32td" />

                <ImageView
                    android:id="@+id/iv_edu_cert"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:src="@drawable/icon_education_cert"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_nickname"
                    app:layout_constraintLeft_toRightOf="@+id/tv_nickname"
                    app:layout_constraintTop_toTopOf="@+id/tv_nickname" />

                <ImageView
                    android:id="@+id/iv_teacher_cert"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="6dp"
                    android:src="@drawable/icon_teacher_cert"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_nickname"
                    app:layout_constraintLeft_toRightOf="@+id/iv_edu_cert"
                    app:layout_constraintTop_toTopOf="@+id/tv_nickname" />

                <TextView
                    android:id="@+id/tv_badge_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:layout_marginTop="22dp"
                    android:includeFontPadding="false"
                    android:text="勋章:"
                    android:textColor="@color/color_666666"
                    android:textSize="@dimen/sp_12"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintTop_toBottomOf="@+id/tv_nickname" />

                <com.cooleshow.base.widgets.BadgeIconListView
                    android:id="@+id/ll_badge"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="visible"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_badge_title"
                    app:layout_constraintLeft_toRightOf="@+id/tv_badge_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_badge_title" />

                <TextView
                    android:id="@+id/tv_score_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="15dp"
                    android:includeFontPadding="false"
                    android:text="评分:"
                    android:textColor="@color/color_666666"
                    android:textSize="@dimen/sp_12"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_badge_title"
                    app:layout_constraintLeft_toRightOf="@+id/ll_badge"
                    app:layout_constraintTop_toTopOf="@+id/tv_badge_title" />


                <RatingBar
                    android:id="@+id/rating_bar"
                    style="@style/HomeRatingBar"
                    android:layout_width="wrap_content"
                    android:layout_height="19dp"
                    android:isIndicator="true"
                    android:numStars="5"
                    android:rating="0"
                    android:stepSize="1"
                    android:visibility="visible"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_score_title"
                    app:layout_constraintLeft_toRightOf="@+id/tv_score_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_score_title" />

                <TextView
                    android:id="@+id/tv_no_score"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="暂无评分"
                    android:textSize="@dimen/sp_13"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_score_title"
                    app:layout_constraintLeft_toRightOf="@+id/tv_score_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_score_title" />

                <ImageView
                    android:id="@+id/iv_subject"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:layout_marginTop="12dp"
                    android:src="@drawable/icon_good_at_music_subject"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintTop_toBottomOf="@+id/tv_badge_title" />

                <LinearLayout
                    android:id="@+id/ll_subject_container"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="@dimen/dp_30"
                    android:orientation="horizontal"
                    android:paddingStart="10dp"
                    app:layout_constraintBottom_toBottomOf="@+id/iv_subject"
                    app:layout_constraintLeft_toRightOf="@+id/iv_subject"
                    app:layout_constraintRight_toRightOf="@+id/view_top_bg"
                    app:layout_constraintTop_toTopOf="@+id/iv_subject" />


                <LinearLayout
                    android:id="@+id/ll_subject_container2"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:orientation="horizontal"
                    android:visibility="gone"
                    app:layout_constraintLeft_toLeftOf="@+id/ll_subject_container"
                    app:layout_constraintRight_toRightOf="@+id/ll_subject_container"
                    app:layout_constraintTop_toBottomOf="@+id/ll_subject_container" />


                <TextView
                    android:id="@+id/tv_fans_title"
                    android:layout_width="58dp"
                    android:layout_height="28dp"
                    android:layout_marginStart="29dp"
                    android:layout_marginTop="56dp"
                    android:gravity="center"
                    android:includeFontPadding="false"
                    android:text="粉丝"
                    android:textColor="@color/color_999999"
                    android:textSize="@dimen/sp_14"
                    app:layout_constraintHorizontal_chainStyle="spread_inside"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintRight_toLeftOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintTop_toBottomOf="@+id/ll_subject_container2" />

                <View
                    android:id="@+id/view_fans"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toBottomOf="@+id/view_top_bg"
                    app:layout_constraintLeft_toLeftOf="@+id/view_top_bg"
                    app:layout_constraintRight_toLeftOf="@+id/view_line1"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_num" />


                <View
                    android:id="@+id/view_line1"
                    android:layout_width="0.5dp"
                    android:layout_height="24dp"
                    android:background="@color/color_eaeaea"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_fans_title"
                    app:layout_constraintLeft_toRightOf="@+id/tv_fans_title"
                    app:layout_constraintRight_toLeftOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_num" />

                <TextView
                    android:id="@+id/tv_course_num_completed_title"
                    android:layout_width="58dp"
                    android:layout_height="28dp"
                    android:layout_marginTop="1dp"
                    android:gravity="center"
                    android:includeFontPadding="false"
                    android:text="已上课时"
                    android:textColor="@color/color_999999"
                    android:textSize="@dimen/sp_14"
                    app:layout_constraintLeft_toRightOf="@+id/tv_fans_title"
                    app:layout_constraintRight_toLeftOf="@+id/tv_course_num_not_start_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_title" />

                <View
                    android:id="@+id/view_course_num_completed"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toBottomOf="@+id/view_top_bg"
                    app:layout_constraintLeft_toRightOf="@+id/view_line1"
                    app:layout_constraintRight_toLeftOf="@+id/view_line2"
                    app:layout_constraintTop_toTopOf="@+id/tv_course_num_completed" />

                <View
                    android:id="@+id/view_line2"
                    android:layout_width="0.5dp"
                    android:layout_height="24dp"
                    android:background="@color/color_eaeaea"
                    app:layout_constraintBottom_toBottomOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintLeft_toRightOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintRight_toLeftOf="@+id/tv_course_num_not_start_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_course_num_completed" />


                <TextView
                    android:id="@+id/tv_course_num_not_start_title"
                    android:layout_width="58dp"
                    android:layout_height="28dp"
                    android:layout_marginTop="1dp"
                    android:layout_marginEnd="29dp"
                    android:gravity="center"
                    android:includeFontPadding="false"
                    android:text="未上课时"
                    android:textColor="@color/color_999999"
                    android:textSize="@dimen/sp_14"
                    app:layout_constraintLeft_toRightOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintRight_toRightOf="@+id/view_top_bg"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_title" />

                <View
                    android:id="@+id/view_course_num_not_start"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toBottomOf="@+id/view_top_bg"
                    app:layout_constraintLeft_toRightOf="@+id/view_line2"
                    app:layout_constraintRight_toRightOf="@+id/view_top_bg"
                    app:layout_constraintTop_toTopOf="@+id/tv_course_num_not_start" />


                <TextView
                    android:id="@+id/tv_fans_num"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="1dp"
                    android:includeFontPadding="false"
                    android:text="0"
                    android:textColor="@color/color_333333"
                    android:textSize="@dimen/sp_22"
                    android:textStyle="bold"
                    app:layout_constraintBottom_toTopOf="@+id/tv_fans_title"
                    app:layout_constraintLeft_toLeftOf="@+id/tv_fans_title"
                    app:layout_constraintRight_toRightOf="@+id/tv_fans_title"
                    tools:text="1181" />

                <TextView
                    android:id="@+id/tv_course_num_completed"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:includeFontPadding="false"
                    android:text="0"
                    android:textColor="@color/color_333333"
                    android:textSize="@dimen/sp_22"
                    android:textStyle="bold"
                    app:layout_constraintLeft_toLeftOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintRight_toRightOf="@+id/tv_course_num_completed_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_num"
                    tools:text="118" />


                <TextView
                    android:id="@+id/tv_course_num_not_start"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:includeFontPadding="false"
                    android:text="0"
                    android:textColor="@color/color_333333"
                    android:textSize="@dimen/sp_22"
                    android:textStyle="bold"
                    app:layout_constraintLeft_toLeftOf="@+id/tv_course_num_not_start_title"
                    app:layout_constraintRight_toRightOf="@+id/tv_course_num_not_start_title"
                    app:layout_constraintTop_toTopOf="@+id/tv_fans_num"
                    tools:text="118" />

            </androidx.constraintlayout.widget.ConstraintLayout>
            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin" >
                <TextView
                    android:layout_centerInParent="true"
                    android:layout_gravity="center"
                    android:id="@+id/tv_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/white"
                    android:textSize="@dimen/sp_18"
                    android:visibility="visible"
                    tools:text="李老师的主页" />
            </androidx.appcompat.widget.Toolbar>
        </com.google.android.material.appbar.CollapsingToolbarLayout>

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/tab_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="14dp"
            android:layout_marginEnd="14dp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/view_top_bg"
            app:tabBackground="@color/transparent"
            app:tabGravity="fill"
            app:tabIndicator="@drawable/custom_indicator_drawable"
            app:tabIndicatorColor="@color/colorAccent"
            app:tabIndicatorFullWidth="false"
            app:tabIndicatorHeight="4dp"
            app:tabMaxWidth="0dp"
            app:tabMode="scrollable"
            app:tabPaddingEnd="0dp"
            app:tabPaddingStart="0dp"
            app:tabRippleColor="@color/transparent"
            app:tabSelectedTextColor="@color/color_333333"
            app:tabTextColor="@color/color_666666" />
    </com.google.android.material.appbar.AppBarLayout>

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:overScrollMode="never"
        android:scrollbars="none"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tab_layout" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>