<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        app:cardCornerRadius="5dp"
        app:cardElevation="0dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/gameContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/selector_f8f8f8"
                android:paddingLeft="16dp"
                android:paddingTop="16dp"
                android:paddingRight="16dp"
                android:paddingBottom="10dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <com.gh.gamecenter.feature.view.GameIconView
                    android:id="@+id/gameIconView"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    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_marginStart="12dp"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@id/gameIconView"
                    app:layout_constraintTop_toTopOf="@id/gameIconView">

                    <TextView
                        android:id="@+id/gameNameTv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textColor="@color/title"
                        android:textSize="15sp"
                        android:textStyle="bold"
                        tools:text="我的世界（像素村落）如果有很长的文字的话就截断处理" />

                    <TextView
                        android:id="@+id/gameSubtitleTv"
                        android:layout_width="wrap_content"
                        android:layout_height="14dp"
                        android:layout_marginLeft="4dp"
                        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:visibility="visible"
                        tools:text="副标题" />
                </LinearLayout>

                <ImageView
                    android:id="@+id/starIv"
                    android:layout_width="12dp"
                    android:layout_height="12dp"
                    android:layout_marginTop="6dp"
                    android:src="@drawable/ic_amway_star"
                    app:layout_constraintLeft_toLeftOf="@id/gameNameContainer"
                    app:layout_constraintTop_toBottomOf="@id/gameNameContainer" />

                <TextView
                    android:id="@+id/ratingTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="4dp"
                    android:textColor="@color/theme_font"
                    android:textSize="12sp"
                    app:layout_constraintBottom_toBottomOf="@id/starIv"
                    app:layout_constraintLeft_toRightOf="@id/starIv"
                    app:layout_constraintTop_toTopOf="@id/starIv"
                    tools:text="9.1" />

                <TextView
                    android:id="@+id/tagTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="12dp"
                    android:textColor="@color/text_subtitleDesc"
                    android:textSize="10sp"
                    app:layout_constraintBottom_toBottomOf="@id/starIv"
                    app:layout_constraintLeft_toRightOf="@id/ratingTv"
                    app:layout_constraintTop_toTopOf="@id/starIv"
                    tools:text="官方版/MOBA" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/commentContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/selector_f8f8f8"
                android:paddingLeft="11dp"
                android:paddingTop="10dp"
                android:paddingRight="16dp"
                android:paddingBottom="13dp"
                app:layout_constraintLeft_toLeftOf="@id/gameContainer"
                app:layout_constraintTop_toBottomOf="@id/gameContainer">

                <com.gh.gamecenter.common.view.EllipsizeTextView
                    android:id="@+id/amwayContentTv"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="5dp"
                    android:ellipsize="end"
                    android:includeFontPadding="false"
                    android:lineSpacingMultiplier="1.3"
                    android:maxLines="7"
                    android:textColor="@color/text_3a3a3a"
                    android:textSize="14sp"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:text="如原型所示，上墙评论的卡片展示游戏logo、游戏名、游戏评分、标签、评论文本、用户名、用户评分、点赞按钮；此处标签读取游戏管理-编辑-功能标签，标签数由UI设计宽度限制；评论文本显示前7行，字数超过7行时在第7行结尾处显示“…”；点击评论卡片的上半区（游戏logo、游戏名、评分、标签以及空白处），跳转至游戏详情页；" />

                <com.gh.gamecenter.common.view.AvatarBorderView
                    android:id="@+id/userIcon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp"
                    app:avatar_width="20dp"
                    app:badge_width="10dp"
                    app:border_color="@color/transparent"
                    app:border_ratio="1.8"
                    app:layout_constraintLeft_toLeftOf="@id/amwayContentTv"
                    app:layout_constraintTop_toBottomOf="@id/amwayContentTv"
                    tools:layout_height="36dp"
                    tools:layout_width="36dp" />

                <TextView
                    android:id="@+id/userNameTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxWidth="102dp"
                    android:singleLine="true"
                    android:textColor="@color/title"
                    android:textSize="12sp"
                    app:layout_constraintBottom_toBottomOf="@id/userIcon"
                    app:layout_constraintLeft_toRightOf="@id/userIcon"
                    app:layout_constraintTop_toTopOf="@id/userIcon"
                    tools:text="who is you daddy" />

                <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/userNameTv"
                    app:layout_constraintLeft_toRightOf="@id/userNameTv"
                    app:layout_constraintTop_toTopOf="@id/userNameTv"
                    tools:visibility="visible" />

                <View
                    android:id="@+id/userClickableView"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintLeft_toLeftOf="@id/userIcon"
                    app:layout_constraintRight_toRightOf="@+id/userNameTv"
                    app:layout_constraintTop_toBottomOf="@id/amwayContentTv" />

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

                <TextView
                    android:id="@+id/likeCountTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/text_B3B3B3"
                    android:textSize="12sp"
                    app:layout_constraintBottom_toBottomOf="@id/userIcon"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="@id/userIcon"
                    tools:text="1" />

                <com.lightgame.view.CheckableImageView
                    android:id="@+id/likeIv"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:layout_marginRight="4dp"
                    android:src="@drawable/community_vote_selector"
                    app:layout_constraintBottom_toBottomOf="@id/userIcon"
                    app:layout_constraintRight_toLeftOf="@id/likeCountTv"
                    app:layout_constraintTop_toTopOf="@id/userIcon" />

                <com.airbnb.lottie.LottieAnimationView
                    android:id="@+id/likeAnimView"
                    android:layout_width="34dp"
                    android:layout_height="34dp"
                    app:layout_constraintBottom_toBottomOf="@id/likeIv"
                    app:layout_constraintLeft_toLeftOf="@id/likeIv"
                    app:layout_constraintRight_toRightOf="@id/likeIv"
                    app:layout_constraintTop_toTopOf="@id/likeIv" />

                <View
                    android:id="@+id/likeClickableView"
                    android:layout_width="44dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/amwayContentTv" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>
</FrameLayout>

