<?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"
    android:background="@drawable/reuse_listview_item_style"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:padding="@dimen/home_item_padding">

    <TextView
        android:id="@+id/game_order"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:gravity="center"
        android:minWidth="24dp"
        android:minHeight="24dp"
        android:textColor="@color/title"
        android:textSize="12sp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/selectIv"
        app:layout_constraintTop_toTopOf="parent" />

    <com.lightgame.view.CheckableImageView
        android:id="@+id/selectIv"
        android:layout_width="16dp"
        android:layout_height="16dp"
        android:layout_gravity="center"
        android:layout_marginRight="12dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/game_order"
        app:layout_constraintRight_toLeftOf="@+id/gameIconView"
        app:layout_constraintTop_toTopOf="parent" />

    <com.gh.gamecenter.feature.view.GameIconView
        android:id="@+id/gameIconView"
        android:layout_width="52dp"
        android:layout_height="52dp"
        android:layout_marginRight="12dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/selectIv"
        app:layout_constraintRight_toLeftOf="@+id/gameDescContainer"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/gameNameContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        app:layout_constraintBottom_toTopOf="@+id/gameDesSpace"
        app:layout_constraintEnd_toEndOf="@+id/gameDescContainer"
        app:layout_constraintStart_toStartOf="@+id/gameDescContainer"
        app:layout_constraintTop_toTopOf="@+id/gameIconView"
        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="13sp"
            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" />

        <TextView
            android:id="@+id/recent_played_tag"
            android:layout_width="44dp"
            android:layout_height="13dp"
            android:layout_marginLeft="4dp"
            android:background="@drawable/button_round_1affa142"
            android:gravity="center"
            android:text="近期玩过"
            android:textColor="@color/text_F8A142"
            android:textSize="9sp"
            android:visibility="gone"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/game_kaifu_type"
            android:layout_width="wrap_content"
            android:layout_height="14dp"
            android:layout_marginLeft="8dp"
            android:background="@color/primary_theme"
            android:gravity="center"
            android:maxLines="1"
            android:paddingStart="4dp"
            android:paddingEnd="4dp"
            android:includeFontPadding="false"
            android:textColor="@color/white"
            android:textSize="10sp"
            android:visibility="gone"
            tools:text="九游版"
            tools:visibility="visible" />

    </LinearLayout>

    <Space
        android:id="@+id/gameDesSpace"
        android:layout_width="0dp"
        android:layout_height="28dp"
        android:background="@color/black"
        app:layout_constraintBottom_toTopOf="@+id/label_list"
        app:layout_constraintEnd_toStartOf="@+id/download_btn"
        app:layout_constraintStart_toEndOf="@+id/gameIconView"
        app:layout_constraintTop_toBottomOf="@+id/gameNameContainer" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/gameDescContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/label_list"
        app:layout_constraintLeft_toRightOf="@+id/gameIconView"
        app:layout_constraintRight_toLeftOf="@+id/download_btn"
        app:layout_constraintTop_toBottomOf="@+id/gameNameContainer">

        <TextView
            android:id="@+id/game_rating"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:drawablePadding="4dp"
            android:includeFontPadding="false"
            android:textStyle="bold"
            android:visibility="gone"
            app:layout_constraintHorizontal_chainStyle="packed"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@+id/game_des"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/game_des"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:layout_toRightOf="@id/game_rating"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:singleLine="true"
            android:textColor="@color/text_tertiary"
            android:textSize="10sp"
            app:layout_constraintLeft_toRightOf="@+id/game_rating"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="巫妖王再怒霜之哀殤又飢渴" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/recommendContainer"
            android:layout_width="wrap_content"
            android:layout_height="18dp"
            android:layout_marginTop="3dp"
            android:background="@drawable/bg_game_item_recommend"
            android:paddingStart="4dp"
            android:paddingEnd="8dp"
            android:visibility="gone"
            app:layout_constrainedWidth="true"
            app:layout_constraintHorizontal_bias="0"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/recommendIv"
                android:layout_width="12dp"
                android:layout_height="12dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/recommendTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="2dp"
                android:gravity="center|start"
                android:includeFontPadding="false"
                android:maxLines="1"
                android:textColor="@color/game_recommend_text"
                android:textSize="10sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/recommendIv"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_goneMarginStart="4dp"
                tools:text="最新活动火爆来袭" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.gh.gamecenter.common.view.GameTagContainerView
        android:id="@+id/label_list"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="fill_vertical"
        android:layout_marginTop="5dp"
        android:orientation="horizontal"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
        app:layout_constraintLeft_toLeftOf="@+id/gameDescContainer"
        app:layout_constraintRight_toRightOf="@+id/gameDescContainer"
        app:layout_constraintTop_toBottomOf="@+id/gameDescContainer" />

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

    <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_constraintRight_toRightOf="@+id/download_btn"
        app:layout_constraintTop_toTopOf="@+id/download_btn"
        app:lottie_autoPlay="false"
        app:lottie_loop="true"
        app:lottie_repeatMode="restart" />

</androidx.constraintlayout.widget.ConstraintLayout>
