<?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.swiperefreshlayout.widget.ViewPagerSwipeRefreshLayout
        android:id="@+id/refresh_layout"
        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"
            android:visibility="gone"
            tools:visibility="visible">

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

                <com.google.android.material.appbar.CollapsingToolbarLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fitsSystemWindows="true"
                    app:contentScrim="@color/ui_surface"
                    app:layout_scrollFlags="scroll|exitUntilCollapsed"
                    app:scrimAnimationDuration="0"
                    app:scrimVisibleHeightTrigger="80dp"
                    app:titleEnabled="false">

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

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

                            <com.facebook.drawee.view.SimpleDraweeView
                                android:id="@+id/forumBackground"
                                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" />

                            <View
                                android:id="@+id/forumTopMaskContainer"
                                android:layout_width="match_parent"
                                android:layout_height="210dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <ImageView
                                android:id="@+id/forumDefaultBackground"
                                android:layout_width="match_parent"
                                android:layout_height="210dp"
                                android:scaleType="centerCrop"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <View
                                android:id="@+id/forumMaskDefaultView"
                                android:layout_width="match_parent"
                                android:layout_height="210dp"
                                android:background="@drawable/forum_detail_mask_default"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.gh.gamecenter.feature.view.GameIconView
                                android:id="@+id/forumThumbBig"
                                android:layout_width="64dp"
                                android:layout_height="64dp"
                                android:layout_marginLeft="16dp"
                                android:layout_marginBottom="60dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintStart_toStartOf="parent" />

                            <androidx.constraintlayout.widget.ConstraintLayout
                                android:id="@+id/forumNameContainer"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginRight="16dp"
                                app:layout_constraintBottom_toBottomOf="@+id/forumThumbBig"
                                app:layout_constraintEnd_toStartOf="@+id/followTv"
                                app:layout_constraintStart_toEndOf="@+id/forumThumbBig"
                                app:layout_constraintTop_toTopOf="@+id/forumThumbBig">

                                <TextView
                                    android:id="@+id/forumNameTv"
                                    android:layout_width="0dp"
                                    android:layout_height="wrap_content"
                                    android:layout_marginLeft="16dp"
                                    android:layout_marginRight="16dp"
                                    android:ellipsize="end"
                                    android:includeFontPadding="false"
                                    android:singleLine="true"
                                    android:textColor="@color/text_aw_primary"
                                    android:textSize="20sp"
                                    android:textStyle="bold"
                                    app:layout_constraintStart_toStartOf="parent"
                                    app:layout_constraintTop_toTopOf="parent"
                                    tools:text="剑与远征剑与远征剑与远征剑与远征剑与远征剑与远征" />

                                <LinearLayout
                                    android:id="@+id/forumRuleContainer"
                                    android:layout_width="70dp"
                                    android:layout_height="20dp"
                                    android:layout_marginLeft="16dp"
                                    android:layout_marginTop="4dp"
                                    android:background="@drawable/bg_forum_rule"
                                    android:gravity="center_vertical"
                                    android:orientation="horizontal"
                                    android:visibility="gone"
                                    app:layout_constraintStart_toStartOf="parent"
                                    app:layout_constraintTop_toBottomOf="@+id/forumNameTv">

                                    <ImageView
                                        android:layout_width="9dp"
                                        android:layout_height="10dp"
                                        android:layout_marginLeft="8dp"
                                        android:src="@drawable/ic_forum_rule" />

                                    <TextView
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_marginLeft="5dp"
                                        android:gravity="center"
                                        android:text="版规说明"
                                        android:textColor="@color/white_alpha_80"
                                        android:textSize="10sp"
                                        app:layout_constraintStart_toStartOf="parent"
                                        app:layout_constraintTop_toBottomOf="@+id/forumNameTv" />
                                </LinearLayout>

                                <TextView
                                    android:id="@+id/forumHeatTv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="16dp"
                                    android:layout_marginTop="8dp"
                                    android:drawablePadding="8dp"
                                    android:textColor="@color/text_aw_secondary"
                                    android:textSize="@dimen/tag_text_size"
                                    app:drawableEndCompat="@drawable/icon_heat"
                                    app:layout_constraintStart_toStartOf="parent"
                                    app:layout_constraintTop_toBottomOf="@+id/forumNameTv"
                                    tools:text="热度值：88万" />
                            </androidx.constraintlayout.widget.ConstraintLayout>

                            <TextView
                                android:id="@+id/followTv"
                                style="@style/PrimaryGradientButton"
                                android:layout_width="56dp"
                                android:layout_height="28dp"
                                android:layout_marginTop="4dp"
                                android:layout_marginRight="16dp"
                                android:gravity="center"
                                android:includeFontPadding="false"
                                android:textSize="12sp"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toEndOf="@+id/forumNameContainer"
                                app:layout_constraintTop_toTopOf="@id/forumThumbBig" />

                            <TextView
                                android:id="@+id/moderatorTv"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="16dp"
                                android:layout_marginTop="20dp"
                                android:includeFontPadding="false"
                                android:text="版主成员"
                                android:textColor="@color/text_aw_secondary"
                                android:textSize="12sp"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/forumThumbBig" />

                            <com.gh.gamecenter.common.view.CustomOrderDrawChildLinearLayout
                                android:id="@+id/moderatorContainer"
                                android:layout_width="wrap_content"
                                android:layout_height="20dp"
                                android:layout_gravity="bottom"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="16dp"
                                android:orientation="horizontal"
                                app:layout_constraintStart_toEndOf="@+id/moderatorTv"
                                app:layout_constraintTop_toBottomOf="@+id/forumThumbBig" />

                            <TextView
                                android:id="@+id/gameDetailTv"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="20dp"
                                android:layout_marginRight="16dp"
                                android:drawableEnd="@drawable/ic_forum_arrow_right"
                                android:drawablePadding="4dp"
                                android:drawableTint="@color/text_aw_secondary"
                                android:text="游戏详情"
                                android:textColor="@color/text_aw_secondary"
                                android:textSize="12sp"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/forumThumbBig" />

                            <RelativeLayout
                                android:id="@+id/moderatorGuideContainer"
                                android:layout_width="242dp"
                                android:layout_height="60dp"
                                android:layout_marginBottom="36dp"
                                android:clickable="true"
                                android:focusable="true"
                                android:visibility="gone"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintLeft_toLeftOf="parent"
                                tools:visibility="visible">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:src="@drawable/pic_apply_moderator_guide" />

                                <TextView
                                    android:id="@+id/moderatorGuideClose"
                                    android:layout_width="50dp"
                                    android:layout_height="match_parent"
                                    android:layout_alignParentRight="true" />
                            </RelativeLayout>
                        </androidx.constraintlayout.widget.ConstraintLayout>

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:id="@+id/forumTopContentContainer"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="-8dp"
                            android:layout_marginBottom="6dp"
                            android:visibility="gone"
                            tools:visibility="visible">

                            <androidx.recyclerview.widget.RecyclerView
                                android:id="@+id/forumTopContentRv"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:background="@drawable/background_shape_white_radius_5_top_only"
                                app:layout_constraintLeft_toLeftOf="parent"
                                app:layout_constraintRight_toRightOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <androidx.constraintlayout.widget.ConstraintLayout
                                android:id="@+id/forumTopContentArrowContainer"
                                android:layout_width="46dp"
                                android:layout_height="34dp"
                                android:paddingLeft="8dp"
                                android:paddingTop="5dp"
                                android:paddingRight="14dp"
                                android:paddingBottom="5dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintRight_toRightOf="parent">

                                <ImageView
                                    android:id="@+id/forumTopContentArrowIv"
                                    android:layout_width="24dp"
                                    android:layout_height="24dp"
                                    android:src="@drawable/ic_forum_detail_top_link_arrow"
                                    app:layout_constraintLeft_toLeftOf="parent"
                                    app:layout_constraintTop_toTopOf="parent" />
                            </androidx.constraintlayout.widget.ConstraintLayout>
                        </androidx.constraintlayout.widget.ConstraintLayout>

                        <View
                            android:id="@+id/dividerLine"
                            android:layout_width="match_parent"
                            android:layout_height="8dp"
                            android:background="@color/ui_container_1" />

                    </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_bar_back">

                        <LinearLayout
                            android:id="@+id/titleContainer"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:background="@color/transparent"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:translationX="-5dp">

                            <com.gh.gamecenter.feature.view.GameIconView
                                android:id="@+id/forumThumbSmall"
                                android:layout_width="28dp"
                                android:layout_height="28dp"
                                android:visibility="gone"
                                tools:visibility="visible" />

                            <TextView
                                android:id="@+id/titleTv"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="8dp"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:textColor="@color/text_white"
                                android:textSize="16sp"
                                android:textStyle="bold" />

                            <ImageView
                                android:id="@+id/searchIv"
                                android:layout_width="24dp"
                                android:layout_height="24dp"
                                android:layout_gravity="center"
                                android:layout_marginLeft="15dp"
                                android:layout_marginRight="11dp"
                                android:src="@drawable/ic_forum_detail_search" />
                        </LinearLayout>
                    </androidx.appcompat.widget.Toolbar>

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

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/tab_container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/ui_surface">

                    <com.gh.gamecenter.common.view.TabIndicatorView
                        android:id="@+id/fragment_tab_indicator"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/default_tab_indicator_height"
                        android:layout_marginBottom="7dp"
                        app:disableIndicatorScaling="true"
                        app:indicatorColor="@color/primary_theme"
                        app:layout_constraintBottom_toBottomOf="@+id/fragment_tab_layout"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent" />

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/fragment_tab_layout"
                        android:layout_width="wrap_content"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:tabIndicator="@null"
                        app:tabMinWidth="52dp"
                        app:tabMode="scrollable"
                        app:tabRippleColor="@color/transparent"
                        app:tabTextAppearance="@style/TabLayoutTextAppearance" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/sectionContainer"
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:visibility="gone">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/sectionRv"
                        android:layout_width="0dp"
                        android:layout_height="24dp"
                        android:layout_marginEnd="-4dp"
                        android:overScrollMode="never"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toStartOf="@+id/sectionMoreBackground"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:layout_goneMarginEnd="0dp" />

                    <View
                        android:id="@+id/sectionMoreBackground"
                        android:layout_width="52dp"
                        android:layout_height="48dp"
                        android:background="@drawable/section_more_background"
                        android:visibility="gone"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <ImageView
                        android:id="@+id/sectionMoreIv"
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_marginTop="14dp"
                        android:layout_marginEnd="16dp"
                        android:layout_marginRight="16dp"
                        android:visibility="gone"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:srcCompat="@drawable/icon_section_more" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.google.android.material.appbar.AppBarLayout>

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

        </androidx.coordinatorlayout.widget.CoordinatorLayout>
    </androidx.swiperefreshlayout.widget.ViewPagerSwipeRefreshLayout>

    <ImageView
        android:id="@+id/community_edit"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="12dp"
        android:layout_marginBottom="20dp"
        android:background="@drawable/community_edit_icon"
        android:paddingLeft="15dp"
        android:paddingTop="8dp"
        android:paddingRight="15dp"
        android:paddingBottom="8dp"
        android:textColor="@color/white"
        android:visibility="gone"
        tools:visibility="visible" />

    <FrameLayout
        android:id="@+id/skeleton_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <include
        android:id="@+id/reuse_no_connection"
        layout="@layout/reuse_no_connection" />

    <include
        android:id="@+id/reuse_none_data"
        layout="@layout/reuse_none_data" />

    <include
        android:id="@+id/reuse_data_exception"
        layout="@layout/reuse_data_exception" />

    <include
        android:id="@+id/reuse_loading"
        layout="@layout/reuse_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true" />
</RelativeLayout>
