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

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

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

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/transparent"
            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"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

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

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="16dp"
                        android:layout_marginTop="8dp"
                        android:layout_marginRight="16dp">

                        <com.facebook.drawee.view.SimpleDraweeView
                            android:id="@+id/posterView"
                            style="@style/frescoStyle"
                            android:layout_width="0dp"
                            android:layout_height="0dp"
                            android:visibility="gone"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintDimensionRatio="H,328:142"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent"
                            app:roundedCornerRadius="8dp" />

                        <TextView
                            android:id="@+id/changePosterBtn"
                            android:layout_width="72dp"
                            android:layout_height="28dp"
                            android:layout_marginRight="8dp"
                            android:layout_marginBottom="8dp"
                            android:background="@drawable/bg_game_collectionchange_poster"
                            android:gravity="center"
                            android:text="更改封面"
                            android:textColor="@color/white"
                            android:textSize="12sp"
                            android:visibility="gone"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent" />

                        <ImageView
                            android:id="@+id/deleteBtn"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:layout_marginRight="8dp"
                            android:src="@drawable/ic_del_video"
                            android:visibility="gone"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <View
                            android:id="@+id/placeholderView"
                            android:layout_width="0dp"
                            android:layout_height="0dp"
                            android:background="@drawable/bg_shape_f5_radius_8"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintDimensionRatio="H,328:142"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <LinearLayout
                            android:id="@+id/uploadPictureBtn"
                            android:layout_width="0dp"
                            android:layout_height="0dp"
                            android:gravity="center"
                            android:orientation="vertical"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent">

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

                            <TextView
                                android:id="@+id/uploadPictureTv"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="8dp"
                                android:text="点击上传图片"
                                android:textColor="@color/text_instance"
                                android:textSize="@dimen/secondary_size"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />
                        </LinearLayout>

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <EditText
                        android:id="@+id/gameCollectionTitleEt"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="16dp"
                        android:layout_marginTop="16dp"
                        android:layout_marginRight="16dp"
                        android:background="@null"
                        android:hint="为游戏单起一个20字以内的标题吧～"
                        android:inputType="text"
                        android:textColor="@color/text_primary"
                        android:textColorHint="@color/text_instance"
                        android:textSize="@dimen/primary_text_size" />

                    <View
                        android:id="@+id/titleDivider"
                        android:layout_width="match_parent"
                        android:layout_height="0.5dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginTop="16dp"
                        android:layout_marginRight="16dp"
                        android:background="@color/ui_divider" />

                    <EditText
                        android:id="@+id/gameCollectionIntroduceEt"
                        android:layout_width="match_parent"
                        android:layout_height="44dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginTop="16dp"
                        android:layout_marginRight="16dp"
                        android:background="@null"
                        android:gravity="top|left"
                        android:hint="详细的介绍可以为你的游戏单加分哦"
                        android:inputType="textMultiLine"
                        android:textColor="@color/text_primary"
                        android:textColorHint="@color/text_instance"
                        android:textSize="@dimen/primary_text_size" />

                    <TextView
                        android:id="@+id/introduceSizeTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="end"
                        android:layout_marginTop="8dp"
                        android:layout_marginRight="16dp"
                        android:layout_marginBottom="12dp"
                        android:text="0/200"
                        android:textColor="@color/text_instance"
                        android:textSize="@dimen/secondary_size" />

                    <View
                        android:id="@+id/introduceDivider"
                        android:layout_width="match_parent"
                        android:layout_height="0.5dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:background="@color/ui_divider" />

                    <LinearLayout
                        android:id="@+id/chooseLabelContainer"
                        android:layout_width="match_parent"
                        android:layout_height="44dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:gravity="center_vertical"
                        android:orientation="horizontal">

                        <TextView
                            android:id="@+id/labelTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="20dp"
                            android:layout_marginRight="20dp"
                            android:drawablePadding="12dp"
                            android:includeFontPadding="false"
                            android:text="选择标签"
                            android:textColor="@color/text_primary"
                            app:drawableLeftCompat="@drawable/ic_choose_label" />

                        <com.google.android.flexbox.FlexboxLayout
                            android:id="@+id/gameCollectionTagsContainer"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="12dp"
                            android:layout_marginLeft="12dp"
                            android:layout_weight="1"
                            app:flexDirection="row"
                            app:flexWrap="nowrap"
                            app:justifyContent="flex_end" />

                        <ImageView
                            android:layout_width="16dp"
                            android:layout_height="16dp"
                            android:scaleType="centerInside"
                            android:src="@drawable/ic_forum_arrow_right" />
                    </LinearLayout>

                    <View
                        android:id="@+id/labelDivider"
                        android:layout_width="match_parent"
                        android:layout_height="0.5dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:background="@color/ui_divider" />

                    <LinearLayout
                        android:id="@+id/chooseActivityContainer"
                        android:layout_width="match_parent"
                        android:layout_height="45dp"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:gravity="center_vertical"
                        android:orientation="horizontal">

                        <TextView
                            android:id="@+id/activityTv"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="20dp"
                            android:layout_marginRight="20dp"
                            android:layout_weight="1"
                            android:drawablePadding="12dp"
                            android:includeFontPadding="false"
                            android:text="参与活动"
                            android:textColor="@color/text_primary"
                            app:drawableLeftCompat="@drawable/ic_choose_activity" />

                        <TextView
                            android:id="@+id/activityTipTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_alignParentRight="true"
                            android:layout_marginLeft="10dp"
                            android:drawablePadding="4dp"
                            android:ellipsize="end"
                            android:gravity="end"
                            android:hint="选择活动标签"
                            android:includeFontPadding="false"
                            android:lines="1"
                            android:maxWidth="200dp"
                            android:textColor="@color/game_collection_activity"
                            android:textColorHint="@color/text_tertiary"
                            android:textSize="@dimen/secondary_size" />

                        <ImageView
                            android:layout_width="16dp"
                            android:layout_height="16dp"
                            android:scaleType="centerInside"
                            android:src="@drawable/ic_forum_arrow_right" />
                    </LinearLayout>

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

                </LinearLayout>

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

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="46dp"
                android:paddingLeft="16dp">

                <TextView
                    android:id="@+id/gameCountTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:text="已收录0款游戏"
                    android:textColor="@color/text_primary" />

                <TextView
                    android:id="@+id/addGamesButton"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:gravity="center"
                    android:paddingLeft="16dp"
                    android:paddingRight="16dp"
                    android:text="+ 添加游戏"
                    android:textColor="@color/text_theme"
                    android:visibility="gone" />
            </RelativeLayout>

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

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/gamesRv"
                android:layout_width="0dp"
                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" />

            <TextView
                android:id="@+id/addGamesTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="75dp"
                android:drawablePadding="8dp"
                android:text="点击添加游戏"
                android:textColor="@color/primary_theme"
                android:textSize="@dimen/secondary_size"
                app:drawableTopCompat="@drawable/ic_add_games"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp">

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

        <TextView
            android:id="@+id/normsLinkTv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="15dp"
            android:layout_centerVertical="true"
            android:text="《游戏单管理规范》"
            android:textColor="@color/text_theme"
            android:textSize="@dimen/secondary_size" />

        <CheckBox
            android:id="@+id/selfOnlyCb"
            android:layout_width="96dp"
            android:layout_height="28dp"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="15dp"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:background="@drawable/border_round_stroke_0dot5_eee_999"
            android:button="@null"
            android:drawableLeft="@drawable/selector_original_checkbox"
            android:drawablePadding="5dp"
            android:paddingLeft="7dp"
            android:text="仅自己可见"
            android:textColor="@color/text_tertiary"
            android:textSize="@dimen/secondary_size" />
    </RelativeLayout>
</LinearLayout>