<?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:id="@+id/questionsdetail_item_constraintlayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/reuse_listview_item_style"
    android:orientation="vertical">

    <HorizontalScrollView
        android:id="@+id/questionsdetail_item_tag_sv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:paddingTop="10dp"
        android:scrollbars="none">

        <com.google.android.flexbox.FlexboxLayout
            android:id="@+id/questionsdetail_item_tag"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal" />

    </HorizontalScrollView>

    <TextView
        android:id="@+id/questionsdetail_item_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="6dp"
        android:layout_marginRight="20dp"
        android:lineSpacingExtra="6dp"
        android:textColor="@color/black"
        android:textSize="16sp"
        android:textStyle="bold" />

    <include layout="@layout/piece_question_content" />

    <RelativeLayout
        android:id="@+id/questionsdetail_concern_rl"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="12dp"
        android:layout_marginRight="20dp">

        <TextView
            android:id="@+id/questionsdetail_concern_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:includeFontPadding="false"
            android:textColor="@color/text_secondary"
            android:textSize="13sp"
            tools:text="1人关注" />

    </RelativeLayout>

    <View
        android:id="@+id/questionsdetail_line_top"
        android:layout_width="match_parent"
        android:layout_height="@dimen/cutting_line"
        android:layout_marginTop="10dp"
        android:background="@color/cutting_line" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <RelativeLayout
            android:id="@+id/questionsdetail_concern_container"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_weight="1"
            android:background="@color/ui_surface"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@+id/questionsdetail_line_center"
            app:layout_constraintTop_toTopOf="@+id/questionsdetail_line_center">

            <TextView
                android:id="@+id/questionsdetail_concern"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:drawableLeft="@drawable/ic_follow_question"
                android:drawablePadding="4dp"
                android:gravity="center"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:text="关注问题"
                android:textColor="@color/text_theme"
                android:textSize="14sp"
                android:textStyle="bold" />

        </RelativeLayout>

        <View
            android:id="@+id/questionsdetail_line_center"
            android:layout_width="1dp"
            android:layout_height="50dp"
            android:background="@color/cutting_line"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/questionsdetail_line_top" />

        <RelativeLayout
            android:id="@+id/questionsdetail_invite"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_weight="1"
            android:background="@color/ui_surface"
            app:layout_constraintLeft_toRightOf="@id/questionsdetail_line_center"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="@id/questionsdetail_line_center">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:drawableLeft="@drawable/question_detail_invite_icon"
                android:drawablePadding="8dp"
                android:gravity="center"
                android:text="@string/question_detail_invite"
                android:textColor="@color/text_theme"
                android:textSize="14sp"
                android:textStyle="bold" />

        </RelativeLayout>

    </LinearLayout>

    <RelativeLayout
        android:id="@+id/questiondetail_related_question_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/ui_background"
        android:paddingTop="8dp"
        android:visibility="gone"
        tools:visibility="visible">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/ui_surface"
            android:padding="20dp">

            <LinearLayout
                android:id="@+id/questiondetail_related_question_link_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:src="@drawable/ic_related_question" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="5dp"
                    android:text="关联问题（已解决的同类问题）"
                    android:textColor="@color/text_theme"
                    android:textSize="14sp" />

                <TextView
                    android:id="@+id/questiondetail_related_question_count_tv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="15dp"
                    android:text="3回答"
                    android:textColor="@color/text_9a9a9a"
                    android:textSize="11sp"
                    android:visibility="gone" />

            </LinearLayout>

            <TextView
                android:id="@+id/questiondetail_related_question_title_tv"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/questiondetail_related_question_link_container"
                android:layout_marginTop="12dp"
                android:textColor="@color/text_3a3a3a"
                android:textSize="16sp"
                android:textStyle="bold"
                tools:text="不想用钻石买，又没体力了怎么办?" />

        </RelativeLayout>
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/ui_background"
        android:orientation="vertical">

        <TextView
            android:id="@+id/questionsdetail_item_answercount"
            android:layout_width="match_parent"
            android:layout_height="46dp"
            android:layout_marginTop="8dp"
            android:background="@color/ui_surface"
            android:gravity="center_vertical"
            android:paddingLeft="20dp"
            android:textColor="@color/text_primary"
            android:textSize="14sp"
            android:textStyle="bold"
            tools:text="3回答" />

        <View
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:background="@color/ui_divider" />
    </LinearLayout>

</LinearLayout>