<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/list_refresh"
    android:background="@color/background_white"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        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/background_white"
            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/background_white"
                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_square_head"
                    android:visibility="visible" />

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

                <ImageView
                    android:id="@+id/noBannerTitleIv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="32dp"
                    android:layout_marginTop="92dp"
                    android:adjustViewBounds="true"
                    android:src="@drawable/game_collection_square_title_no_banner"
                    android:visibility="visible" />

                <LinearLayout
                    android:id="@+id/bannerContainer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:visibility="gone">

                    <View
                        android:id="@+id/placeholder"
                        android:layout_width="match_parent"
                        android:layout_height="66dp" />

                    <FrameLayout
                        android:id="@+id/bannerBackground"
                        android:layout_width="match_parent"
                        android:layout_height="80dp"
                        android:background="@drawable/bg_game_collection_square_banner"
                        android:paddingStart="16dp"
                        android:paddingTop="8dp"
                        android:paddingEnd="16dp">

                        <androidx.cardview.widget.CardView
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            app:cardCornerRadius="8dp"
                            app:cardElevation="0dp">

                            <androidx.recyclerview.widget.RecyclerView
                                android:id="@+id/bannerRv"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent" />
                        </androidx.cardview.widget.CardView>

                        <com.gh.gamecenter.common.view.ScaleIndicatorView
                            android:id="@+id/bannerIndicator"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="end|bottom"
                            android:layout_marginEnd="8dp"
                            android:layout_marginBottom="8dp"
                            app:checkedColor="@color/white"
                            app:checkedSliderWidth="12dp"
                            app:normalColor="@color/white_alpha_40"
                            app:normalSliderWidth="4dp"
                            app:sliderGap="4dp"
                            app:sliderHeight="4dp" />
                    </FrameLayout>

                </LinearLayout>

                <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"
                    app:navigationIcon="@drawable/ic_bar_back_light" />

                <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="match_parent"
                            android:layout_marginEnd="50dp"
                            android:layout_height="@dimen/appbar_height"
                            android:gravity="center"
                            android:singleLine="true"
                            android:text="游戏单广场"
                            android:textColor="@color/white"
                            android:textSize="15sp"
                            android:textStyle="bold" />

                        <ImageView
                            android:id="@+id/titleIv"
                            android:layout_width="100dp"
                            android:layout_height="20dp"
                            android:adjustViewBounds="true"
                            android:src="@drawable/game_collection_square_title"
                            android:visibility="gone"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:id="@+id/sloganTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="16dp"
                            android:alpha="0.6"
                            android:includeFontPadding="false"
                            android:text="用心 · 分享 · 好游戏"
                            android:textColor="@color/white"
                            android:textSize="@dimen/secondary_size"
                            android:visibility="gone"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

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

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

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/tagFilterContainer"
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:layout_marginTop="-16dp"
                android:background="@drawable/bg_game_collection_square"
                android:paddingStart="16dp"
                android:paddingEnd="16dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <LinearLayout
                    android:id="@+id/tagFilter"
                    android:layout_width="wrap_content"
                    android:layout_height="28dp"
                    android:background="@drawable/bg_game_collection_tag_unselect"
                    android:gravity="center"
                    android:orientation="horizontal"
                    android:paddingStart="16dp"
                    android:paddingEnd="8dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <TextView
                        android:id="@+id/tagTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:lines="1"
                        android:text="全部标签"
                        android:textColor="@color/theme_font"
                        android:textSize="@dimen/secondary_size" />

                    <ImageView
                        android:layout_width="8dp"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        app:srcCompat="@drawable/ic_arrow_blue" />

                </LinearLayout>

                <com.gh.gamecenter.common.view.SegmentedFilterView
                    android:id="@+id/orderSfv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:containerBackground="@drawable/button_round_f5f5f5"
                    app:containerPadding="1dp"
                    app:indicatorBackground="@drawable/bg_game_collection_sfv_indicator"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:sfv_itemHeight="24dp"
                    app:sfv_itemWidth="36dp"
                    app:sfv_textCheckedColor="@color/text_subtitle"
                    app:sfv_textDefaultColor="@color/text_subtitleDesc"
                    app:sfv_textSize="10" />

            </androidx.constraintlayout.widget.ConstraintLayout>

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

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

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/list_rv"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:overScrollMode="never"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <include
                layout="@layout/reuse_loading"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <include
                layout="@layout/reuse_no_connection"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <include
                layout="@layout/reuse_none_data"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <include
                layout="@layout/reuse_data_exception"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <ImageView
            android:id="@+id/fab"
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:layout_gravity="end|bottom"
            android:layout_marginRight="14dp"
            android:layout_marginBottom="18dp"
            android:src="@drawable/community_edit_icon" />

        <FrameLayout
            android:id="@+id/skeletonPlaceholder"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true" />

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