<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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"
    app:cardCornerRadius="8dp"
    app:cardElevation="0dp"
    android:id="@+id/cv_container">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <View
            android:id="@+id/v_cover"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="310:214"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/poster"
            style="@style/frescoStyle"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:scaleType="centerCrop"
            app:actualImageScaleType="centerCrop"
            app:layout_constraintDimensionRatio="16:9"
            app:layout_constraintLeft_toLeftOf="@id/v_cover"
            app:layout_constraintRight_toRightOf="@id/v_cover"
            app:layout_constraintTop_toTopOf="@id/v_cover" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/content"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="@id/v_cover"
            app:layout_constraintEnd_toEndOf="@id/v_cover"
            app:layout_constraintStart_toStartOf="@id/v_cover"
            app:layout_constraintTop_toTopOf="@id/v_cover">

            <Space
                android:id="@+id/space_image"
                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" />

            <View
                android:id="@+id/v_bottom_background"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/space_image" />

            <Space
                android:id="@+id/space_bottom"
                android:layout_width="0dp"
                android:layout_height="72dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                tools:background="#33000000" />

            <View
                android:id="@+id/v_gradient"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintBottom_toTopOf="@id/v_bottom_background"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@id/space_bottom" />

            <com.gh.gamecenter.feature.view.GameIconView
                android:id="@+id/iv_icon"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginStart="16dp"
                android:layout_marginBottom="16dp"
                app:gameIconCornerRadius="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent" />

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

            <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/btn_download"
                app:layout_constraintEnd_toEndOf="@+id/btn_download"
                app:layout_constraintStart_toStartOf="@+id/btn_download"
                app:layout_constraintTop_toTopOf="@+id/btn_download" />

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

            <LinearLayout
                android:id="@+id/ll_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginTop="4dp"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                app:layout_constraintEnd_toStartOf="@id/btn_download"
                app:layout_constraintStart_toEndOf="@id/iv_icon"
                app:layout_constraintTop_toTopOf="@id/iv_icon">

                <TextView
                    android:id="@+id/tv_title"
                    style="@style/TextHeadline"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:gravity="center_vertical"
                    android:includeFontPadding="false"
                    android:maxLines="1"
                    android:textColor="@color/text_aw_primary"
                    tools:text="元神" />

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


            <LinearLayout
                android:id="@+id/g_star"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="4dp"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="@id/iv_icon"
                app:layout_constraintStart_toStartOf="@id/ll_title">

                <ImageView
                    android:id="@+id/iv_star"
                    android:layout_width="12dp"
                    android:layout_height="12dp"
                    android:src="@drawable/ic_amway_star" />

                <TextView
                    android:id="@+id/tv_star"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="4dp"
                    android:gravity="center_vertical"
                    android:includeFontPadding="false"
                    android:textColor="@color/primary_theme"
                    android:textSize="12sp"
                    android:textStyle="bold"
                    tools:text="8.3" />
            </LinearLayout>

            <com.gh.gamecenter.common.view.GameTagContainerView
                android:id="@+id/ll_label"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="fill_vertical"
                android:layout_marginStart="4dp"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="@id/g_star"
                app:layout_constraintEnd_toEndOf="@id/ll_title"
                app:layout_constraintStart_toEndOf="@id/game_play_count"
                app:layout_goneMarginStart="0dp" />

            <TextView
                android:id="@+id/game_play_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone"
                android:includeFontPadding="false"
                app:layout_constraintBottom_toBottomOf="@id/g_star"
                app:layout_constraintStart_toEndOf="@id/g_star"
                app:layout_constraintEnd_toStartOf="@id/ll_label"
                android:textSize="11sp"
                android:gravity="center"
                android:textColor="@color/text_aw_secondary"
                tools:text="999.9万人玩过" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintEnd_toEndOf="@id/tv_bubble"
                app:layout_constraintStart_toStartOf="@id/tv_bubble"
                app:layout_constraintTop_toTopOf="@id/tv_bubble" />

            <TextView
                android:id="@+id/tv_bubble"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:alpha="0"
                android:background="@drawable/bg_bubble"
                android:ellipsize="end"
                android:gravity="center_vertical"
                android:maxLines="1"
                android:minWidth="36dp"
                android:paddingStart="12dp"
                android:text="1"
                android:textColor="@color/text_aw_primary"
                android:textSize="12sp"
                app:layout_constraintBottom_toTopOf="@id/space_bottom"
                app:layout_constraintStart_toStartOf="@id/iv_icon" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>