<?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:id="@+id/ask_answer_item_constraintlayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/reuse_listview_item_style"
    android:paddingLeft="16dp"
    android:paddingTop="13dp"
    android:paddingRight="16dp"
    android:paddingBottom="16dp">

    <TextView
        android:id="@+id/ask_answer_item_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="2"
        android:textColor="@color/text_primary"
        android:textSize="14sp"
        android:textStyle="bold"
        android:visibility="gone"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_goneMarginTop="13dp" />

    <View
        android:id="@+id/unread_hint"
        android:layout_width="4dp"
        android:layout_height="4dp"
        android:layout_marginBottom="18dp"
        android:background="@drawable/oval_message_hint_bg"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/ask_answer_item_title"
        app:layout_constraintLeft_toLeftOf="@id/ask_answer_item_title" />

    <RelativeLayout
        android:id="@+id/ask_answer_item_usericon_container"
        android:layout_width="22dp"
        android:layout_height="22dp"
        android:layout_marginTop="6dp"
        app:layout_constraintLeft_toLeftOf="@id/ask_answer_item_constraintlayout"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_title">

        <com.facebook.drawee.view.SimpleDraweeView
            android:id="@+id/ask_answer_item_usericon"
            style="@style/frescoCircleStyle"
            android:layout_width="20dp"
            android:layout_height="20dp"
            app:roundingBorderColor="@color/black_alpha_10"
            app:roundingBorderWidth="0.5dp" />

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

    </RelativeLayout>

    <TextView
        android:id="@+id/ask_answer_item_username"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginBottom="2dp"
        android:ellipsize="end"
        android:maxLength="12"
        android:maxLines="1"
        android:textColor="@color/text_primary"
        android:textSize="12sp"
        app:layout_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="@id/ask_answer_item_usericon_container"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintLeft_toRightOf="@id/ask_answer_item_usericon_container"
        app:layout_constraintRight_toLeftOf="@+id/sdv_user_badge"
        app:layout_constraintTop_toTopOf="@id/ask_answer_item_usericon_container" />

    <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_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="@id/ask_answer_item_username"
        app:layout_constraintLeft_toRightOf="@id/ask_answer_item_username"
        app:layout_constraintRight_toLeftOf="@+id/tv_badge_name"
        app:layout_constraintTop_toTopOf="@id/ask_answer_item_username"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/tv_badge_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="4dp"
        android:gravity="center"
        android:maxLines="1"
        android:textColor="@color/text_tertiary"
        android:textSize="10sp"
        android:visibility="visible"
        app:layout_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="@id/sdv_user_badge"
        app:layout_constraintLeft_toRightOf="@id/sdv_user_badge"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@id/sdv_user_badge"
        tools:text="答题先锋"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/ask_answer_item_content"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:layout_marginRight="12dp"
        android:ellipsize="end"
        android:maxLines="2"
        android:minLines="2"
        android:textColor="@color/text_secondary"
        android:textSize="12sp"
        app:layout_constraintEnd_toStartOf="@+id/ask_answer_item_img"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_usericon_container" />

    <com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/ask_answer_item_img"
        style="@style/frescoStyle"
        android:layout_width="74dp"
        android:layout_height="56dp"
        android:layout_marginTop="9dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/ask_answer_item_title"
        app:roundedCornerRadius="4.5dp"
        app:viewAspectRatio="2.3" />


    <ImageView
        android:id="@+id/ask_answer_item_video_play"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:src="@drawable/community_video_play_icon"
        app:layout_constraintBottom_toBottomOf="@id/ask_answer_item_img"
        app:layout_constraintLeft_toLeftOf="@id/ask_answer_item_img"
        app:layout_constraintRight_toRightOf="@id/ask_answer_item_img"
        app:layout_constraintTop_toTopOf="@id/ask_answer_item_img" />

    <TextView
        android:id="@+id/ask_answer_item_video_duration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="8dp"
        android:includeFontPadding="false"
        android:paddingLeft="6dp"
        android:paddingTop="3dp"
        android:paddingRight="6dp"
        android:paddingBottom="3dp"
        android:textColor="@color/white"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="@id/ask_answer_item_img"
        app:layout_constraintRight_toRightOf="@id/ask_answer_item_img" />

    <TextView
        android:id="@+id/ask_answer_item_votecount"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:textColor="@color/text_tertiary"
        android:textSize="11sp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_content" />

    <TextView
        android:id="@+id/ask_answer_item_comment_count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"
        android:textColor="@color/text_tertiary"
        android:textSize="11sp"
        app:layout_constraintLeft_toRightOf="@id/ask_answer_item_votecount"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_content" />

    <TextView
        android:id="@+id/ask_answer_item_community_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:gravity="right"
        android:maxEms="15"
        android:maxLines="1"
        android:textColor="@color/text_tertiary"
        android:textSize="11sp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_content" />

    <TextView
        android:id="@+id/ask_answer_item_end_desc"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:singleLine="true"
        android:layout_marginTop="10dp"
        android:textColor="@color/text_tertiary"
        android:textSize="11sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ask_answer_item_content"
        tools:text="末尾补充内容" />

</androidx.constraintlayout.widget.ConstraintLayout>