<?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/container"
        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/ui_surface"
            android:fitsSystemWindows="true"
            android:gravity="center"
            app:elevation="0dp"
            app:layout_behavior="com.gh.gamecenter.common.view.FixAppBarLayoutBehavior">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:id="@id/collapsingToolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:contentScrim="@color/white"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:scrimAnimationDuration="0"
                app:scrimVisibleHeightTrigger="105dp"
                app:titleEnabled="false">

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

                    <View
                        android:id="@+id/placeView"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

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

                        <com.gh.gamecenter.qa.video.detail.ForumTopVideoView
                            android:id="@+id/topVideoView"
                            android:layout_width="0dp"
                            android:layout_height="0dp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintDimensionRatio="h,180:101"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />
                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/gameInfoContainer"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingLeft="16dp"
                        android:paddingTop="8dp"
                        android:paddingRight="16dp"
                        android:paddingBottom="8dp">

                        <com.gh.gamecenter.feature.view.GameIconView
                            android:id="@+id/gameIconView"
                            android:layout_width="44dp"
                            android:layout_height="44dp"
                            app:gameIconFadeDuration="0"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:id="@+id/gameNameTv"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="8dp"
                            android:layout_marginTop="5dp"
                            android:layout_marginRight="56dp"
                            android:ellipsize="end"
                            android:includeFontPadding="false"
                            android:maxLines="1"
                            android:textColor="@color/text_primary"
                            android:textSize="12sp"
                            app:layout_constraintEnd_toStartOf="@+id/downloadBtn"
                            app:layout_constraintStart_toEndOf="@+id/gameIconView"
                            app:layout_constraintTop_toTopOf="@+id/gameIconView"
                            tools:text="地海争霸2-最后的火之高兴和霜之哀伤" />

                        <TextView
                            android:id="@+id/gameScoreTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="8dp"
                            android:drawableLeft="@drawable/amway_score_icon"
                            android:drawablePadding="4dp"
                            android:includeFontPadding="false"
                            android:text="0.0"
                            android:textColor="@color/text_theme"
                            android:textStyle="bold"
                            app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
                            app:layout_constraintStart_toEndOf="@+id/gameIconView" />

                        <com.gh.gamecenter.common.view.GameTagContainerView
                            android:id="@+id/gameTagsContainer"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="fill_vertical"
                            android:layout_marginLeft="4dp"
                            android:orientation="horizontal"
                            android:visibility="visible"
                            app:layout_constraintBottom_toBottomOf="@+id/gameScoreTv"
                            app:layout_constraintStart_toEndOf="@+id/gameScoreTv"
                            app:layout_constraintTop_toTopOf="@+id/gameScoreTv" />

                        <com.gh.gamecenter.feature.view.DownloadButton
                            android:id="@+id/downloadBtn"
                            android:layout_width="60dp"
                            android:layout_height="28dp"
                            app:download_button_show_progress="true"
                            app:download_button_text_size="12sp"
                            app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="@+id/gameIconView" />

                        <TextView
                            android:id="@+id/multiVersionDownloadTv"
                            android:layout_width="wrap_content"
                            android:layout_height="28dp"
                            android:drawablePadding="2dp"
                            android:gravity="center"
                            android:text="展开"
                            android:textColor="@color/white"
                            android:textSize="@dimen/secondary_size"
                            android:visibility="gone"
                            app:drawableEndCompat="@drawable/ic_jump_universal"
                            app:layout_constraintBottom_toBottomOf="@+id/downloadBtn"
                            app:layout_constraintEnd_toEndOf="@+id/downloadBtn"
                            app:layout_constraintStart_toStartOf="@+id/downloadBtn"
                            app:layout_constraintTop_toTopOf="@+id/downloadBtn" />

                        <com.airbnb.lottie.LottieAnimationView
                            android:id="@+id/downloadTipsLottie"
                            android:layout_width="16dp"
                            android:layout_height="16dp"
                            android:layout_marginTop="-8dp"
                            android:visibility="gone"
                            app:layout_constraintRight_toRightOf="@+id/downloadBtn"
                            app:layout_constraintTop_toTopOf="@+id/downloadBtn"
                            app:lottie_autoPlay="false"
                            app:lottie_loop="true"
                            app:lottie_repeatMode="restart" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="0.5dp"
                        android:background="@color/ui_divider" />
                </LinearLayout>

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

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

            <RelativeLayout
                android:id="@+id/tabbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/fragment_tab_layout"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/tab_layout_height"
                    app:tabIndicator="@null"
                    app:tabTextAppearance="@style/TabLayoutTextAppearance" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/fragment_tab_layout"
                    android:layout_marginTop="-8dp"
                    android:orientation="vertical">

                    <com.gh.gamecenter.common.view.TabIndicatorView
                        android:id="@+id/fragment_tab_indicator"
                        android:layout_width="match_parent"
                        android:layout_height="8dp"
                        app:indicatorDrawable="@drawable/ic_commodity_selected" />
                </LinearLayout>

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

        <View
            android:layout_width="match_parent"
            android:layout_height="8dp"
            android:background="@drawable/bg_forum_video_detail_shadow"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/bottomContainer"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:layout_alignParentBottom="true"
        android:background="@color/ui_surface"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        tools:visibility="visible">

        <TextView
            android:id="@+id/replyTv"
            android:layout_width="0dp"
            android:layout_height="32dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:background="@drawable/bg_shape_f5_radius_999"
            android:gravity="center_vertical"
            android:includeFontPadding="false"
            android:maxLines="1"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="说点什么吧"
            android:textColor="@color/text_instance"
            android:textSize="13sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <View
        android:id="@+id/skeletonMask"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/ui_surface" />

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

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

    <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>