<?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="wrap_content">

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

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/game_info_container"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:background="@color/ui_container_1"
        android:paddingBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <View
            android:id="@+id/v_space"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="16:9"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/game_image"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/v_space"
            app:layout_constraintEnd_toEndOf="@id/v_space"
            app:layout_constraintStart_toStartOf="@id/v_space"
            app:layout_constraintTop_toTopOf="@id/v_space"
            app:roundBottomEnd="false"
            app:roundBottomStart="false"
            app:roundTopEnd="true"
            app:roundTopStart="true"
            app:roundedCornerRadius="8dp"
            tools:background="@color/placeholder_bg" />

        <com.gh.gamecenter.home.video.AutomaticVideoView
            android:id="@+id/autoVideoView"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="gone"
            app:avBottomRightAngle="true"
            app:avRadius="8"
            app:layout_constraintBottom_toBottomOf="@id/v_space"
            app:layout_constraintEnd_toEndOf="@id/v_space"
            app:layout_constraintStart_toStartOf="@id/v_space"
            app:layout_constraintTop_toTopOf="@id/v_space"
            tools:visibility="visible" />

        <com.gh.gamecenter.feature.view.GameIconView
            android:id="@+id/game_icon"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="12dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/v_space" />

        <LinearLayout
            android:id="@+id/gameNameContainer"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            app:layout_constraintBottom_toTopOf="@id/ratingAndTagContainer"
            app:layout_constraintEnd_toStartOf="@id/cl_download"
            app:layout_constraintStart_toEndOf="@+id/game_icon"
            app:layout_constraintTop_toTopOf="@+id/game_icon"
            app:layout_constraintVertical_chainStyle="packed">

            <TextView
                android:id="@+id/game_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:includeFontPadding="false"
                android:singleLine="true"
                android:textColor="@color/text_primary"
                android:textSize="16sp"
                android:textStyle="bold"
                tools:text="轩辕剑龙舞云山" />

            <TextView
                android:id="@+id/gameSubtitleTv"
                android:layout_width="wrap_content"
                android:layout_height="14dp"
                android:layout_marginStart="4dp"
                android:paddingStart="2dp"
                android:paddingEnd="2dp"
                android:singleLine="true"
                android:textSize="@dimen/tag_text_size"
                android:visibility="gone"
                tools:background="@drawable/bg_advance_download_game_subtitle"
                tools:text="副标题"
                tools:textColor="@color/text_secondary"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/adLabelTv"
                android:layout_width="21dp"
                android:layout_height="14dp"
                android:layout_marginStart="4dp"
                android:layout_marginLeft="4dp"
                android:background="@drawable/bg_ad_label"
                android:gravity="center"
                android:text="AD"
                android:textColor="@color/white"
                android:textSize="@dimen/tag_text_size"
                android:visibility="gone"
                tools:visibility="visible" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/ratingAndTagContainer"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:layout_marginEnd="40dp"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            app:layout_constraintBottom_toBottomOf="@id/game_icon"
            app:layout_constraintEnd_toStartOf="@+id/cl_download"
            app:layout_constraintStart_toStartOf="@id/gameNameContainer"
            app:layout_constraintTop_toBottomOf="@+id/gameNameContainer">

            <TextView
                android:id="@+id/game_rating"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="4dp"
                android:drawablePadding="4dp"
                android:gravity="center"
                android:includeFontPadding="false"
                android:textColor="@color/primary_theme"
                android:textSize="12sp"
                android:textStyle="bold"
                app:drawableStartCompat="@drawable/home_game_rating"
                tools:text="9.3" />

            <TextView
                android:id="@+id/game_play_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone"
                android:includeFontPadding="false"
                android:layout_marginEnd="4dp"
                android:textSize="11sp"
                android:gravity="center"
                android:textColor="@color/text_tertiary"
                tools:text="999.9万人玩过" />

            <com.gh.gamecenter.common.view.GameTagContainerView
                android:id="@+id/game_tags"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/cl_download"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="@id/game_icon"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/game_icon">

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

            <TextView
                android:id="@+id/multiVersionDownloadTv"
                android:layout_width="wrap_content"
                android:layout_height="28dp"
                android:drawablePadding="2dp"
                android:gravity="center"
                android:text="展开"
                android:textColor="@color/white"
                android:textSize="@dimen/secondary_size"
                android:visibility="gone"
                app:drawableEndCompat="@drawable/ic_jump_universal"
                app:layout_constraintBottom_toBottomOf="@+id/download_btn"
                app:layout_constraintEnd_toEndOf="@+id/download_btn"
                app:layout_constraintStart_toStartOf="@+id/download_btn"
                app:layout_constraintTop_toTopOf="@+id/download_btn" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/downloadTipsLottie"
                android:layout_width="16dp"
                android:layout_height="16dp"
                android:layout_marginTop="-8dp"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="@+id/download_btn"
                app:layout_constraintTop_toTopOf="@+id/download_btn"
                app:lottie_autoPlay="false"
                app:lottie_loop="true"
                app:lottie_repeatMode="restart" />

            <TextView
                android:id="@+id/game_rating2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:drawableLeft="@drawable/home_game_rating"
                android:drawablePadding="4dp"
                android:gravity="center"
                android:includeFontPadding="false"
                android:textColor="@color/primary_theme"
                android:textSize="18sp"
                android:textStyle="bold"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="9.3"
                tools:visibility="visible" />

            <Space
                android:id="@+id/space_right"
                android:layout_width="4dp"
                android:layout_height="1dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <TextView
            android:id="@+id/game_brief"
            style="@style/TextCaption1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="12dp"
            android:layout_marginEnd="16dp"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:maxLines="1"
            android:orientation="horizontal"
            android:textColor="@color/text_secondary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/game_icon"
            tools:text="这是一个很厉害的游戏" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
