<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:background="@color/ui_surface">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/coordinator"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/gamedetail_appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/ui_surface"
            android:gravity="center"
            app:elevation="0dp"
            app:layout_behavior=".gamedetail.detail.GameDetailAppBarBehavior">

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

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

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/coverContainer"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:visibility="gone"
                        tools:visibility="visible">

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/coverRv"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:clipChildren="false"
                            android:overScrollMode="never"
                            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.SegmentedFilterView
                            android:id="@+id/coverSfv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="8dp"
                            android:visibility="gone"
                            app:containerBackground="@drawable/bg_shape_black_alpha_40_radius_999"
                            app:containerPadding="1dp"
                            app:indicatorBackground="@drawable/background_shape_white_radius_999"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:sfv_checked_bold_text="true"
                            app:sfv_itemHeight="22dp"
                            app:sfv_itemPadding="7dp"
                            app:sfv_textCheckedColor="@color/text_primary"
                            app:sfv_textDefaultColor="@color/text_aw_primary"
                            app:sfv_textSize="10" />

                        <TextView
                            android:id="@+id/galleryIndicator"
                            android:layout_width="wrap_content"
                            android:layout_height="18dp"
                            android:layout_marginEnd="16dp"
                            android:layout_marginBottom="12dp"
                            android:background="@drawable/bg_game_detail_gallery_indicator"
                            android:gravity="center"
                            android:paddingStart="8dp"
                            android:paddingEnd="8dp"
                            android:textColor="@color/text_aw_primary"
                            android:textSize="@dimen/tag_text_size"
                            android:visibility="gone"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            tools:text="1/6"
                            tools:visibility="visible" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

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

                        <com.gh.gamecenter.feature.view.GameIconView
                            android:id="@+id/gameIconIv"
                            android:layout_width="72dp"
                            android:layout_height="72dp"
                            android:layout_centerHorizontal="true"
                            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_marginStart="12dp"
                            android:layout_marginEnd="12dp"
                            android:ellipsize="marquee"
                            android:includeFontPadding="false"
                            android:marqueeRepeatLimit="1"
                            android:singleLine="true"
                            android:textColor="@color/text_primary"
                            android:textSize="@dimen/primary_title_text_size"
                            android:textStyle="bold"
                            app:layout_constraintEnd_toStartOf="@+id/rightContainer"
                            app:layout_constraintStart_toEndOf="@+id/gameIconIv"
                            app:layout_constraintTop_toTopOf="@+id/gameIconIv"
                            tools:text="地海争霸2" />

                        <TextView
                            android:id="@+id/descTv"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="12dp"
                            android:layout_marginTop="6dp"
                            android:layout_marginEnd="12dp"
                            android:ellipsize="end"
                            android:includeFontPadding="false"
                            android:singleLine="true"
                            android:textColor="@color/text_theme"
                            android:textSize="@dimen/secondary_size"
                            android:textStyle="bold"
                            app:layout_constraintEnd_toStartOf="@+id/rightContainer"
                            app:layout_constraintStart_toEndOf="@+id/gameIconIv"
                            app:layout_constraintTop_toBottomOf="@+id/gameNameTv"
                            app:layout_goneMarginStart="12dp"
                            tools:text="新角色上线！" />

                        <ImageView
                            android:id="@+id/officialEntryIv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="12dp"
                            android:layout_marginTop="5dp"
                            android:visibility="gone"
                            app:layout_constraintStart_toEndOf="@+id/gameIconIv"
                            app:layout_constraintTop_toBottomOf="@+id/descTv"
                            app:srcCompat="@drawable/tag_official_entry_20"
                            tools:visibility="visible" />

                        <LinearLayout
                            android:id="@+id/tagContainer"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="4dp"
                            android:layout_marginTop="5dp"
                            android:layout_marginEnd="12dp"
                            android:orientation="horizontal"
                            app:layout_constraintEnd_toStartOf="@+id/rightContainer"
                            app:layout_constraintStart_toEndOf="@+id/officialEntryIv"
                            app:layout_constraintTop_toBottomOf="@+id/descTv"
                            app:layout_goneMarginStart="12dp"
                            app:showMore="false" />

                        <FrameLayout
                            android:id="@+id/rightContainer"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent">

                            <LinearLayout
                                android:id="@+id/scoreContainer"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:gravity="center"
                                android:orientation="vertical"
                                android:visibility="gone"
                                tools:visibility="visible">

                                <ImageView
                                    android:id="@+id/scoreIv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    app:tint="@color/text_theme"
                                    tools:srcCompat="@drawable/text_game_detail_score" />

                                <TextView
                                    android:id="@+id/scoreTv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="6dp"
                                    android:includeFontPadding="false"
                                    android:textColor="@color/text_theme"
                                    android:textSize="28sp"
                                    tools:text="8.6" />

                            </LinearLayout>

                            <androidx.constraintlayout.widget.ConstraintLayout
                                android:id="@+id/discountContainer"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:visibility="gone"
                                android:gravity="center">

                                <TextView
                                    android:id="@+id/discountTextTv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:includeFontPadding="false"
                                    android:textColor="@color/secondary_yellow"
                                    android:textSize="@dimen/tag_text_size"
                                    android:textStyle="bold"
                                    app:layout_constraintEnd_toEndOf="parent"
                                    app:layout_constraintStart_toStartOf="parent"
                                    app:layout_constraintTop_toTopOf="parent"
                                    tools:text="折扣" />

                                <TextView
                                    android:id="@+id/discountTv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="6dp"
                                    android:includeFontPadding="false"
                                    android:textColor="@color/secondary_yellow"
                                    android:textSize="28sp"
                                    app:layout_constraintBottom_toBottomOf="parent"
                                    app:layout_constraintEnd_toStartOf="@+id/zheTv"
                                    app:layout_constraintHorizontal_chainStyle="packed"
                                    app:layout_constraintStart_toStartOf="parent"
                                    app:layout_constraintTop_toBottomOf="@+id/discountTextTv"
                                    tools:text="0.1" />

                                <TextView
                                    android:id="@+id/zheTv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginBottom="4dp"
                                    android:includeFontPadding="false"
                                    android:text="折"
                                    android:textColor="@color/secondary_yellow"
                                    android:textSize="@dimen/secondary_size"
                                    app:layout_constraintBottom_toBottomOf="parent"
                                    app:layout_constraintEnd_toEndOf="parent"
                                    app:layout_constraintStart_toEndOf="@+id/discountTv" />
                            </androidx.constraintlayout.widget.ConstraintLayout>
                        </FrameLayout>

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/bigEventContainer"
                        android:layout_width="wrap_content"
                        android:layout_height="24dp"
                        android:layout_marginTop="8dp"
                        android:layout_marginBottom="8dp"
                        android:layout_marginStart="16dp"
                        android:layout_marginEnd="16dp"
                        android:visibility="gone"
                        tools:visibility="visible">

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

                        <ImageView
                            android:id="@+id/bigEventIv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="4dp"
                            android:layout_marginTop="4dp"
                            android:layout_marginBottom="4dp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent"
                            app:srcCompat="@drawable/ic_game_detail_big_event" />

                        <com.gh.gamecenter.common.view.TextBannerView
                            android:id="@+id/bigEventBannerView"
                            android:layout_width="wrap_content"
                            android:layout_height="0dp"
                            android:layout_marginStart="4dp"
                            android:layout_marginEnd="24dp"
                            app:layout_constrainedWidth="true"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toEndOf="@+id/bigEventIv"
                            app:layout_constraintTop_toTopOf="parent"
                            app:tbv_defaultTextColor="@color/text_secondary"
                            app:tbv_drawableEnd="@drawable/ic_auxiliary_arrow_right_12"
                            app:tbv_drawablePadding="4dp"
                            app:tbv_highLightTextColor="@color/text_theme"
                            app:tbv_loop_time="2000"
                            app:tbv_loop_once="true"
                            app:tbv_textSize="12" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <HorizontalScrollView
                        android:id="@+id/dataScrollView"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:overScrollMode="never"
                        android:scrollbars="none">

                        <LinearLayout
                            android:id="@+id/dataContainer"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="center_vertical"
                            android:orientation="horizontal" />

                    </HorizontalScrollView>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/infoTagContainer"
                        android:layout_width="match_parent"
                        android:layout_height="32dp"
                        android:layout_marginStart="16dp"
                        android:layout_marginTop="8dp"
                        android:layout_marginEnd="16dp"
                        android:layout_marginBottom="8dp"
                        android:background="@drawable/bg_shape_f8_radius_8"
                        android:paddingStart="8dp"
                        android:paddingEnd="4dp"
                        android:visibility="gone"
                        tools:visibility="visible">

                        <LinearLayout
                            android:id="@+id/functionTagContainer"
                            android:layout_width="0dp"
                            android:layout_height="0dp"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toStartOf="@+id/accelerateTv"
                            app:layout_constraintHorizontal_bias="0"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent"
                            app:layout_constraintWidth_default="wrap">

                            <LinearLayout
                                android:id="@+id/moreContainer"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:gravity="center"
                                android:orientation="horizontal"
                                android:layout_marginStart="4dp"
                                android:visibility="gone"
                                tools:visibility="visible">

                                <TextView
                                    android:id="@+id/moreTv"
                                    android:layout_width="18dp"
                                    android:layout_height="12dp"
                                    android:background="@drawable/background_shape_theme_radius_999"
                                    android:gravity="center"
                                    android:includeFontPadding="false"
                                    android:textColor="@color/white"
                                    android:textSize="9sp"
                                    tools:text="+6" />

                                <ImageView
                                    android:id="@+id/moreArrowIv"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="4dp"
                                    app:srcCompat="@drawable/ic_auxiliary_arrow_right_8"
                                    app:tint="@color/primary_theme" />

                            </LinearLayout>
                        </LinearLayout>

                        <TextView
                            android:id="@+id/accelerateTipsTv"
                            android:layout_width="wrap_content"
                            android:layout_height="0dp"
                            android:layout_marginEnd="4dp"
                            android:gravity="center"
                            android:text="想玩加速版本？"
                            android:visibility="gone"
                            android:textColor="@color/text_tertiary"
                            android:textSize="@dimen/secondary_size"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toStartOf="@+id/accelerateTv"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:id="@+id/accelerateTv"
                            android:layout_width="wrap_content"
                            android:layout_height="0dp"
                            android:drawablePadding="4dp"
                            android:gravity="center"
                            android:includeFontPadding="false"
                            android:text="求加速"
                            android:textColor="@color/text_theme"
                            android:textSize="@dimen/secondary_size"
                            android:visibility="gone"
                            tools:visibility="visible"
                            app:drawableEndCompat="@drawable/ic_auxiliary_arrow_right_8"
                            app:drawableTint="@color/text_theme"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </LinearLayout>

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

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/detailRv"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/ui_surface"
            android:overScrollMode="never"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

        <androidx.core.widget.NestedScrollView
            android:id="@+id/detailListNoneData"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:overScrollMode="never"
            android:visibility="gone"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <include
                layout="@layout/reuse_none_data"
                android:visibility="visible" />
        </androidx.core.widget.NestedScrollView>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/topGameInfoContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/ui_surface"
        android:paddingStart="16dp"
        android:paddingTop="8dp"
        android:paddingEnd="16dp"
        android:paddingBottom="12dp"
        android:translationY="-44dp">

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

        <TextView
            android:id="@+id/topGameNameTv"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:ellipsize="marquee"
            android:includeFontPadding="false"
            android:marqueeRepeatLimit="1"
            android:singleLine="true"
            android:textColor="@color/text_primary"
            android:textSize="@dimen/secondary_title_text_size"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@+id/topGameIconIv"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/topGameIconIv"
            app:layout_constraintTop_toTopOf="@+id/topGameIconIv"
            tools:text="地海争霸2" />

    </androidx.constraintlayout.widget.ConstraintLayout>

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

</FrameLayout>