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

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/forumContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        android:orientation="vertical">


        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/background"
            android:fitsSystemWindows="true"
            android:gravity="center"
            app:layout_behavior=".common.view.FixAppBarLayoutBehavior">

            <com.gh.gamecenter.common.view.ScrimAwareCollapsingToolbarLayout
                android:id="@+id/collapsingToolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fitsSystemWindows="true"
                app:contentScrim="@color/background"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:scrimAnimationDuration="0"
                app:scrimVisibleHeightTrigger="120dp"
                app:titleEnabled="false">

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

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/headContainer"
                        android:layout_width="match_parent"
                        android:layout_height="226dp">

                        <com.facebook.drawee.view.SimpleDraweeView
                            android:id="@+id/forumBackground"
                            style="@style/frescoStyle"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:scaleType="centerCrop"
                            app:actualImageScaleType="centerCrop"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />


                        <com.gh.gamecenter.common.view.AvatarBorderView
                            android:id="@+id/userAvatar"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            app:avatar_width="64dp"
                            app:layout_constraintBottom_toTopOf="@+id/changeAvatarTv"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            tools:layout_height="96dp"
                            tools:layout_width="96dp" />

                        <TextView
                            android:id="@+id/changeAvatarTv"
                            android:layout_width="60dp"
                            android:layout_height="26dp"
                            android:layout_marginBottom="20dp"
                            android:background="@drawable/background_shape_round_white_alpha_20"
                            android:gravity="center"
                            android:text="更换头像"
                            android:textColor="@color/text_white"
                            android:textSize="11sp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </LinearLayout>

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
                    style="@style/Base_ToolbarStyle"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:background="@android:color/transparent"
                    app:contentInsetStartWithNavigation="0dp"
                    app:layout_collapseMode="pin"
                    app:navigationIcon="@drawable/ic_toolbar_back_white" />


                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/transparent"
                    android:gravity="center"
                    app:layout_collapseMode="pin">

                    <com.gh.gamecenter.common.view.StatusBarView
                        android:id="@+id/statusBar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                    <TextView
                        android:id="@+id/titleTv"
                        android:layout_width="wrap_content"
                        android:layout_height="50dp"
                        android:layout_below="@+id/statusBar"
                        android:layout_centerInParent="true"
                        android:ellipsize="end"
                        android:gravity="center"
                        android:maxLines="1"
                        android:text="头像挂件"
                        android:textColor="@color/text_white"
                        android:textSize="16sp"
                        android:textStyle="bold" />
                </RelativeLayout>

            </com.gh.gamecenter.common.view.ScrimAwareCollapsingToolbarLayout>

            <com.google.android.material.tabs.TabLayout
                android:id="@+id/tabLayout"
                android:layout_width="match_parent"
                android:layout_height="44dp"
                app:tabMaxWidth="0dp"
                app:tabMinWidth="0dp"
                app:tabPaddingStart="0dp"
                app:tabPaddingEnd="0dp"
                app:tabIndicatorHeight="0dp"
                app:tabMode="scrollable"
                app:tabIndicator="@null"
                app:tabRippleColor="@color/transparent" />

        </com.google.android.material.appbar.AppBarLayout>

        <com.lightgame.view.NoScrollableViewPager
            android:id="@+id/viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:overScrollMode="never"
            android:paddingBottom="60dp"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <LinearLayout
        android:id="@+id/bottomContainer"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_alignParentBottom="true"
        android:background="@color/background_white"
        android:gravity="center">

        <TextView
            android:id="@+id/commitTv"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:background="@drawable/border_round_eee_999"
            android:gravity="center"
            android:text="使用"
            android:textColor="@color/text_body" />
    </LinearLayout>
</RelativeLayout>