<?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:orientation="vertical"
    android:paddingBottom="12dp">

    <View
        android:id="@+id/amway_background"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="16dp"
        android:background="@drawable/home_amway_selector"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/all"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.gh.gamecenter.feature.view.GameIconView
        android:id="@+id/game_icon"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_marginLeft="16dp"
        android:layout_marginBottom="6dp"
        app:layout_constraintBottom_toTopOf="@id/rating_block"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/gameNameContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="12dp"
        android:layout_marginTop="8dp"
        android:layout_marginRight="16dp"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        app:layout_constraintLeft_toRightOf="@id/game_icon"
        app:layout_constraintRight_toRightOf="@+id/amway_background"
        app:layout_constraintTop_toTopOf="@+id/amway_background">

        <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_title"
            android:textSize="16sp"
            android:textStyle="bold"
            tools:text="泡面三国" />

        <TextView
            android:id="@+id/gameSubtitleTv"
            android:layout_width="wrap_content"
            android:layout_height="14dp"
            android:layout_marginLeft="8dp"
            android:background="@drawable/bg_advance_download_game_subtitle"
            android:paddingLeft="2dp"
            android:paddingRight="2dp"
            android:singleLine="true"
            android:textColor="@color/text_subtitle"
            android:textSize="@dimen/tag_text_size"
            android:visibility="gone"
            tools:text="副标题"
            tools:visibility="visible" />
    </LinearLayout>

    <ImageView
        android:id="@+id/amway_score_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:src="@drawable/amway_score_icon"
        app:layout_constraintLeft_toLeftOf="@id/gameNameContainer"
        app:layout_constraintTop_toBottomOf="@id/gameNameContainer" />

    <TextView
        android:id="@+id/amway_score_number"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="6dp"
        android:includeFontPadding="false"
        android:textColor="@color/theme"
        android:textSize="12sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toBottomOf="@id/amway_score_icon"
        app:layout_constraintLeft_toRightOf="@id/amway_score_icon"
        app:layout_constraintTop_toTopOf="@id/amway_score_icon"
        tools:text="8.6" />

    <TextView
        android:id="@+id/game_tags"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="6dp"
        android:layout_marginRight="20dp"
        android:includeFontPadding="false"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="@id/amway_score_icon"
        app:layout_constraintLeft_toRightOf="@id/amway_score_number"
        app:layout_constraintRight_toRightOf="@id/amway_background"
        app:layout_constraintTop_toTopOf="@id/amway_score_icon"
        tools:text="全局加速/端游改编" />


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/rating_block"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="@drawable/home_amway_rating_selector"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="@id/amway_background"
        app:layout_constraintRight_toRightOf="@id/amway_background"
        app:layout_constraintTop_toBottomOf="@id/game_icon">

        <TextView
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="6dp"
            android:layout_marginRight="16dp"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:lineSpacingMultiplier="1.3"
            android:maxLines="3"
            android:minLines="3"
            android:textColor="@color/text_title"
            android:textSize="13sp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="面提升中希合作交流水平 推动金砖峰会取得丰硕成果,写在习近平主席对希腊进行国事访问并赴巴西出席金砖国家领导人第十一次会晤之际　" />

        <RelativeLayout
            android:id="@+id/user_icon_container"
            android:layout_width="22dp"
            android:layout_height="22dp"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@id/content">

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/user_icon"
                style="@style/frescoCircleStyle"
                android:layout_width="20dp"
                android:layout_height="20dp" />

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/user_badge"
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:layout_alignParentRight="true"
                android:layout_alignParentBottom="true" />

        </RelativeLayout>

        <TextView
            android:id="@+id/user_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:maxWidth="96dp"
            android:singleLine="true"
            android:textColor="@color/text_subtitle"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@id/user_icon_container"
            app:layout_constraintLeft_toRightOf="@id/user_icon_container"
            app:layout_constraintTop_toTopOf="@id/user_icon_container"
            tools:text="我是大哥大" />

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/sdv_user_badge"
            android:layout_width="16dp"
            android:layout_height="16dp"
            android:layout_marginLeft="4dp"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@id/user_name"
            app:layout_constraintLeft_toRightOf="@id/user_name"
            app:layout_constraintTop_toTopOf="@id/user_name" />

        <TextView
            android:id="@+id/rating_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:text="评分："
            android:textColor="@color/text_subtitleDesc"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@id/user_icon_container"
            app:layout_constraintLeft_toRightOf="@id/sdv_user_badge"
            app:layout_constraintTop_toTopOf="@id/user_icon_container" />

        <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
            android:id="@+id/rating_start"
            style="@style/Widget.MaterialRatingBar.RatingBar"
            android:layout_width="wrap_content"
            android:layout_height="10dp"
            android:isIndicator="true"
            android:minWidth="14dp"
            android:minHeight="14dp"
            android:numStars="5"
            app:layout_constraintBottom_toBottomOf="@+id/user_icon_container"
            app:layout_constraintLeft_toRightOf="@id/rating_name"
            app:layout_constraintTop_toTopOf="@id/user_icon_container"
            app:mrb_progressTint="@color/theme" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <TextView
        android:id="@+id/all"
        android:layout_width="40dp"
        android:layout_height="0dp"
        android:layout_marginLeft="12dp"
        android:layout_marginRight="8dp"
        android:background="@drawable/home_amway_selector"
        android:gravity="center"
        android:text="全部"
        android:textColor="@color/text_title"
        android:textSize="12sp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/amway_background"
        app:layout_constraintLeft_toRightOf="@id/amway_background"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@id/amway_background"
        tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>
