<?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="64dp"
        android:layout_height="64dp"
        android:layout_marginRight="12dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/selectIv"
        app:layout_constraintRight_toLeftOf="@+id/gameDesSpace"
        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/gameDesSpace"
        app:layout_constraintStart_toStartOf="@id/gameDesSpace"
        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="14sp"
            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/recent_played_tag"
            android:layout_width="48dp"
            android:layout_height="14dp"
            android:layout_marginLeft="4dp"
            android:background="@drawable/button_round_1affa142"
            android:gravity="center"
            android:text="近期玩过"
            android:textColor="@color/text_F8A142"
            android:textSize="10sp"
            android:visibility="gone" />

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

        <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>

    <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_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:drawablePadding="4dp"
        android:includeFontPadding="false"
        android:textStyle="bold"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/gameDesSpace"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
        app:layout_constraintRight_toLeftOf="@+id/game_des"
        app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />

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

    <LinearLayout
        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:gravity="center"
        android:orientation="horizontal"
        android:paddingStart="4dp"
        android:paddingEnd="8dp"
        android:visibility="gone"
        app:layout_constrainedWidth="true"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
        app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
        app:layout_constraintTop_toTopOf="@+id/gameDesSpace">

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

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

    </LinearLayout>

    <TextView
        android:id="@+id/recommendStarPref"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:includeFontPadding="false"
        android:text="推荐指数："
        android:textColor="@color/text_tertiary"
        android:textSize="10sp"
        app:layout_constraintBottom_toBottomOf="@+id/gameDesSpace"
        app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
        app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />

    <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
        android:id="@+id/recommendStar"
        style="@style/Widget.MaterialRatingBar.RatingBar"
        android:layout_width="84dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="2dp"
        android:isIndicator="true"
        android:minWidth="12dp"
        android:minHeight="12dp"
        android:numStars="5"
        app:layout_constraintBottom_toBottomOf="@+id/recommendStarPref"
        app:layout_constraintLeft_toRightOf="@+id/recommendStarPref"
        app:layout_constraintTop_toTopOf="@+id/recommendStarPref"
        app:mrb_progressTint="@color/primary_theme"
        tools:rating="3" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/recommendStarInfo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="recommendStarPref,recommendStar" />

    <ImageView
        android:id="@+id/officialEntryIv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingEnd="8dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/label_list"
        app:layout_constraintStart_toStartOf="@+id/gameDesSpace"
        app:layout_constraintTop_toTopOf="@+id/label_list"
        app:srcCompat="@drawable/tag_official_entry_16" />

    <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:orientation="horizontal"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
        app:layout_constraintLeft_toRightOf="@+id/game_play_count"
        app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
        app:layout_constraintTop_toBottomOf="@+id/gameDesSpace" />

    <include
        android:id="@+id/layout_selling_points"
        layout="@layout/layout_game_item_selling_point"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
        app:layout_constraintLeft_toRightOf="@+id/game_play_count"
        app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
        app:layout_constraintTop_toBottomOf="@+id/gameDesSpace" />

    <TextView
        android:id="@+id/game_play_count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp"
        android:gravity="center"
        android:includeFontPadding="false"
        android:textColor="@color/text_tertiary"
        android:textSize="11sp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
        app:layout_constraintLeft_toRightOf="@+id/officialEntryIv"
        app:layout_constraintRight_toLeftOf="@+id/label_list"
        app:layout_constraintTop_toBottomOf="@+id/gameDesSpace"
        tools:text="999.9万人玩过" />

    <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/gameDesSpace"
        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>
