<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/ui_surface"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:paddingTop="@dimen/game_detail_item_horizontal_padding"
    android:paddingStart="@dimen/game_detail_item_horizontal_padding"
    android:paddingEnd="@dimen/game_detail_item_horizontal_padding">

    <RelativeLayout
        android:id="@+id/gameIconContainer"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_marginRight="12dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/contentContainer"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@+id/divider">

        <com.gh.gamecenter.feature.view.GameIconView
            android:id="@+id/game_icon"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_centerVertical="true" />

    </RelativeLayout>

    <LinearLayout
        android:id="@+id/contentContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginRight="16dp"
        android:orientation="vertical"
        app:layout_constraintLeft_toRightOf="@+id/gameIconContainer"
        app:layout_constraintRight_toLeftOf="@+id/game_download"
        app:layout_constraintTop_toTopOf="@+id/gameIconContainer"
        app:layout_constraintBottom_toBottomOf="@+id/gameIconContainer">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/game_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:includeFontPadding="false"
                android:lineSpacingMultiplier="1.2"
                android:textColor="@color/text_primary"
                android:textSize="14sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/server_type"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBottom="@id/game_name"
                android:layout_centerVertical="true"
                android:layout_marginBottom="2dp"
                android:maxLines="1"
                android:paddingLeft="3dp"
                android:paddingRight="3dp"
                android:paddingBottom="0.5dp"
                android:textColor="@color/white"
                android:textSize="9sp"
                android:visibility="gone" />
        </RelativeLayout>

        <TextView
            android:id="@+id/game_info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="7dp"
            android:textColor="@color/text_tertiary"
            android:textSize="11sp" />

    </LinearLayout>

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

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

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_marginTop="@dimen/game_detail_item_horizontal_padding"
        android:background="@color/ui_divider"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/gameIconContainer"
        app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

