<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="@color/background_white"
    android:orientation="vertical">

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

        <com.gh.gamecenter.common.view.AvatarBorderView
            android:id="@+id/userIconIv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="6dp"
            android:layout_marginTop="7dp"
            app:avatar_width="36dp"
            app:badge_width="12dp"
            app:border_color="@color/black_alpha_10"
            app:border_width="0.5dp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:layout_height="54dp"
            tools:layout_width="54dp" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_marginTop="9dp"
            android:layout_marginRight="16dp"
            app:layout_constraintLeft_toRightOf="@id/userIconIv"
            app:layout_constraintRight_toLeftOf="@+id/followBtn"
            app:layout_constraintTop_toTopOf="@+id/userIconIv">

            <TextView
                android:id="@+id/userNameTv"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:includeFontPadding="false"
                android:maxLength="12"
                android:textColor="@color/text_title"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/badgeContainer"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintWidth_default="wrap"
                tools:text="我的昵称很长很长有十二字" />

            <LinearLayout
                android:id="@+id/badgeContainer"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginLeft="4dp"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/userNameTv"
                app:layout_constraintTop_toTopOf="parent">

                <com.facebook.drawee.view.SimpleDraweeView
                    android:id="@+id/badgeIv"
                    android:layout_width="14dp"
                    android:layout_height="14dp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@+id/article_detail_usericon_container"
                    app:layout_constraintLeft_toRightOf="@id/article_detail_usericon_container"
                    tools:background="@color/background"
                    tools:visibility="visible" />

                <TextView
                    android:id="@+id/badgeTv"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="4dp"
                    android:gravity="center_vertical"
                    android:includeFontPadding="false"
                    android:textColor="@color/text_subtitleDesc"
                    android:textSize="10sp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@id/badgeIv"
                    app:layout_constraintLeft_toRightOf="@id/badgeIv"
                    app:layout_constraintRight_toLeftOf="@+id/followBtn"
                    app:layout_constraintTop_toTopOf="@id/badgeIv"
                    tools:text="答题先锋答题先锋答题先锋"
                    tools:visibility="visible" />
            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <TextView
            android:id="@+id/releaseTimeTv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_marginRight="20dp"
            android:layout_marginBottom="9dp"
            android:includeFontPadding="false"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="11sp"
            app:layout_constraintBottom_toBottomOf="@id/userIconIv"
            app:layout_constraintLeft_toRightOf="@id/userIconIv"
            tools:text="发布于1分钟前" />

        <TextView
            android:id="@+id/followBtn"
            android:layout_width="56dp"
            android:layout_height="28dp"
            android:layout_marginRight="16dp"
            android:gravity="center"
            android:textColor="@color/theme_font"
            android:textSize="12sp"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@id/userIconIv"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="@id/userIconIv"
            tools:text="关注"
            tools:visibility="visible" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <RelativeLayout
        android:id="@+id/statusContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="11dp"
        android:layout_marginRight="16dp">

        <View
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:layout_centerVertical="true"
            android:background="@color/divider" />

        <TextView
            android:id="@+id/approvalStatusTv"
            android:layout_width="66dp"
            android:layout_height="16dp"
            android:layout_centerInParent="true"
            android:background="@drawable/bg_approval_status_pending"
            android:gravity="center"
            android:includeFontPadding="false"
            android:textColor="@color/theme_green"
            android:textSize="10sp"
            android:visibility="gone"
            tools:text="内容审核中" />
    </RelativeLayout>

    <TextView
        android:id="@+id/titleTv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:includeFontPadding="false"
        android:lineSpacingExtra="8dp"
        android:paddingLeft="16dp"
        android:paddingTop="12dp"
        android:paddingRight="16dp"
        android:paddingBottom="12dp"
        android:textColor="@color/text_title"
        android:textSize="24sp"
        android:textStyle="bold"
        tools:text="这是一个很长很长很长很长很长很长很长很长很长很长的标题" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/labelIv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="8dp"
            android:visibility="gone"
            tools:src="@drawable/ic_ask_unsolved_label"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/originalTv"
            android:layout_width="28dp"
            android:layout_height="16dp"
            android:background="@drawable/bg_original_label"
            android:gravity="center"
            android:includeFontPadding="false"
            android:text="原创"
            android:textColor="@color/theme_font"
            android:textSize="10sp"
            android:visibility="gone"
            tools:visibility="visible" />
    </LinearLayout>

    <com.gh.common.view.RichEditor
        android:id="@+id/richEditor"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="13dp" />

    <TextView
        android:id="@+id/activityNameTv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginBottom="17dp"
        android:drawableLeft="@drawable/ic_choose_activity"
        android:drawablePadding="8dp"
        android:includeFontPadding="false"
        android:textColor="@color/text_FA8500"
        android:textSize="12sp"
        android:visibility="gone"
        tools:text="第四期新星up主计划"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/lastEditTimeTv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginBottom="16dp"
        android:textColor="@color/text_subtitleDesc"
        android:textSize="@dimen/little_secondary_size"
        android:visibility="gone"
        tools:text="最后编辑于2021-12-12"
        tools:visibility="visible" />

    <LinearLayout
        android:id="@+id/forum_container"
        android:layout_width="wrap_content"
        android:layout_height="24dp"
        android:layout_marginLeft="16dp"
        android:layout_marginBottom="24dp"
        android:background="@drawable/bg_shape_f5_radius_6"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <com.gh.common.view.GameIconView
            android:id="@+id/forum_icon_view"
            android:layout_width="24dp"
            android:layout_height="24dp"
            app:gameIconBorderColor="@color/black_alpha_10"
            app:gameIconBorderWidth="1dp"
            app:gameIconCornerRadius="6dp" />

        <TextView
            android:id="@+id/game_name"
            android:layout_width="wrap_content"
            android:layout_height="24dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="12dp"
            android:drawableRight="@drawable/ic_article_edit_choose_forum_arrow_gray"
            android:drawablePadding="7dp"
            android:ellipsize="end"
            android:gravity="center_vertical"
            android:maxLines="1"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="11sp"
            tools:text="元气骑士" />
    </LinearLayout>
</LinearLayout>
