<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <RelativeLayout
        android:id="@+id/title_container"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/questions_edit_tag_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="16dp"
            android:gravity="center_vertical"
            android:text="添加标签"
            android:textColor="@color/text_primary"
            android:textSize="16sp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/questions_edit_tag_add"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="16dp"
            android:drawableLeft="@drawable/ic_add_label_blue"
            android:drawablePadding="4dp"
            android:text="新标签"
            android:textColor="@color/text_theme" />
    </RelativeLayout>

    <ScrollView
        android:id="@+id/questions_edit_tag_sv"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title_container">

        <com.google.android.flexbox.FlexboxLayout
            android:id="@+id/questions_edit_tag"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingBottom="16dp"
            app:dividerDrawable="@drawable/shape_flexbox_divider_w8_h8"
            app:flexWrap="wrap"
            app:showDivider="middle">


        </com.google.android.flexbox.FlexboxLayout>
    </ScrollView>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="50dp"
        android:background="@color/ui_surface"
        android:padding="5dp"
        android:visibility="gone"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/questions_edit_tag_sv">

        <TextView
            android:id="@+id/questions_edit_tag_cancel"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:layout_marginRight="5dp"
            android:background="@drawable/border_black_bg"
            android:gravity="center"
            android:text="返回"
            android:textColor="@color/title"
            android:textSize="14dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@+id/questions_edit_tag_positive" />

        <TextView
            android:id="@+id/questions_edit_tag_positive"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:layout_marginLeft="5dp"
            android:background="@drawable/button_normal_style"
            android:gravity="center"
            android:text="确定"
            android:textColor="@color/white"
            android:textSize="14dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/questions_edit_tag_cancel"
            app:layout_constraintRight_toRightOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>