<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/ui_background"
        android:fitsSystemWindows="true"
        app:elevation="0dp"
        app:layout_behavior="com.gh.gamecenter.common.view.FixAppBarLayoutBehavior">

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

            <ImageView
                android:id="@+id/headIv"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:src="@drawable/game_collection_hot_list_head" />

            <View
                android:id="@+id/nightMaskView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/black_alpha_20"
                android:visibility="gone" />

            <View
                android:id="@+id/tabTopView"
                android:layout_width="match_parent"
                android:layout_height="8dp"
                android:layout_gravity="bottom"
                android:background="@drawable/background_shape_radius_8_top_only" />

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                style="@style/Base_ToolbarStyle"
                android:layout_width="match_parent"
                android:layout_height="@dimen/appbar_height"
                android:background="@color/transparent"
                app:layout_collapseMode="pin" />

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

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

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/appbar_height"
                    android:layout_marginLeft="50dp">

                    <TextView
                        android:id="@+id/titleTv"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/appbar_height"
                        android:layout_marginEnd="50dp"
                        android:layout_marginRight="50dp"
                        android:gravity="center"
                        android:singleLine="true"
                        android:text="游戏单热榜"
                        android:textColor="@color/text_black"
                        android:textSize="15sp"
                        android:textStyle="bold"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                </androidx.constraintlayout.widget.ConstraintLayout>
            </LinearLayout>

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

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/tabContainer"
            android:layout_width="match_parent"
            android:layout_height="44dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <com.google.android.material.tabs.TabLayout
                android:id="@+id/tabLayout"
                android:layout_width="wrap_content"
                android:layout_height="28dp"
                android:layout_marginTop="8dp"
                android:overScrollMode="never"
                app:layout_constrainedWidth="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:tabIndicator="@null"
                app:tabMinWidth="0dp"
                app:tabMode="scrollable"
                app:tabPaddingEnd="8dp"
                app:tabPaddingStart="0dp"
                app:tabRippleColor="@null" />

        </androidx.constraintlayout.widget.ConstraintLayout>

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

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />

    <include
        android:id="@+id/reuse_no_connection"
        layout="@layout/reuse_no_connection"
        android:visibility="gone"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>