<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">

    <include
        android:id="@+id/reuseToolbar"
        layout="@layout/reuse_toolbar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/gameContainer"
        android:layout_width="match_parent"
        android:layout_height="96dp"
        android:background="@color/background_white"
        app:layout_constraintTop_toBottomOf="@+id/reuseToolbar">

        <com.gh.gamecenter.feature.view.GameIconView
            android:id="@+id/gameIconView"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_marginStart="16dp"
            android:layout_marginLeft="16dp"
            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_marginLeft="12dp"
            android:layout_marginEnd="16dp"
            android:layout_marginRight="16dp"
            android:includeFontPadding="false"
            android:singleLine="true"
            android:textColor="@color/text_title"
            android:textSize="@dimen/primary_text_size"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
            app:layout_constraintEnd_toStartOf="@+id/download_btn"
            app:layout_constraintStart_toEndOf="@+id/gameIconView"
            app:layout_constraintTop_toTopOf="@+id/gameIconView"
            tools:text="地海争霸：巫妖王再怒" />

        <com.gh.gamecenter.feature.view.DownloadButton
            android:id="@+id/download_btn"
            android:layout_width="56dp"
            android:layout_height="28dp"
            android:layout_marginEnd="16dp"
            android:layout_marginRight="16dp"
            app:download_button_show_progress="true"
            app:download_button_text_size="12sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <RelativeLayout
        android:id="@+id/activity_tab_container"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@color/background_white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/gameContainer">

        <View
            android:id="@+id/dividerLine"
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:layout_alignParentTop="true"
            android:background="@color/divider" />

        <com.gh.gamecenter.common.view.TabIndicatorView
            android:id="@+id/activity_tab_indicator"
            android:layout_width="match_parent"
            android:layout_height="@dimen/default_tab_indicator_height"
            android:layout_alignParentBottom="true"
            app:indicatorColor="@color/theme_font" />

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

    </RelativeLayout>

    <com.lightgame.view.NoScrollableViewPager
        android:id="@+id/activity_view_pager"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/uploadContainer"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/activity_tab_container" />

    <View
        android:id="@+id/divider"
        android:layout_width="0dp"
        android:layout_height="0.5dp"
        android:background="@color/divider"
        app:layout_constraintBottom_toBottomOf="@+id/activity_view_pager"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <FrameLayout
        android:id="@+id/uploadContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/background_white"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <TextView
            android:id="@+id/uploadTv"
            style="@style/PrimaryGradientButton"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_margin="16dp"
            android:gravity="center"
            android:text="上传游戏存档"
            android:textSize="@dimen/primary_text_size" />
    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>