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

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/top_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/common_top_bar_height"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/iv_back"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="16dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/commonui_back_black_ic" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="@font/poppins_semibold"
            android:includeFontPadding="false"
            android:text="@string/profile_publish_dynamic_title"
            android:textColor="@color/color_FF1D2129"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.adealink.weparty.commonui.widget.CommonButton
            android:id="@+id/btn_publish"
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:layout_marginEnd="16dp"
            android:paddingHorizontal="16dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:text="@string/common_send"
            app:textColor="@color/white"
            app:textSize="14sp" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/top_bar">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/cl_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingHorizontal="16dp"
            android:paddingTop="16dp">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/rv_photo"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <!-- 视频 -->
            <include
                android:id="@+id/v_video"
                layout="@layout/item_publish_dynamic_video"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/rv_photo"
                tools:visibility="visible" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/v_input"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:background="@drawable/common_input_edit_bg"
                android:paddingHorizontal="12dp"
                android:paddingVertical="8dp"
                app:layout_constrainedHeight="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/v_video">

                <androidx.core.widget.NestedScrollView
                    android:id="@+id/sv_et_input"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constrainedHeight="true"
                    app:layout_constraintBottom_toTopOf="@id/tv_input_count"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHeight_max="250dp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_chainStyle="spread_inside">

                    <androidx.appcompat.widget.AppCompatEditText
                        android:id="@+id/et_input"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="@null"
                        android:gravity="start|top"
                        android:textSize="14sp"
                        android:hint="@string/profile_publish_dynamic_hint"
                        android:includeFontPadding="false"
                        android:minHeight="150dp"
                        android:textColor="@color/color_FF1D2129"
                        android:textColorHint="@color/color_FFCDCFD9" />

                </androidx.core.widget.NestedScrollView>

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tv_input_count"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:gravity="center|end"
                    android:includeFontPadding="false"
                    android:singleLine="true"
                    android:text="0/500"
                    android:textColor="@color/color_FFCDCFD9"
                    android:textSize="14sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/sv_et_input"
                    tools:ignore="HardcodedText" />

            </androidx.constraintlayout.widget.ConstraintLayout>


        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.core.widget.NestedScrollView>


</androidx.constraintlayout.widget.ConstraintLayout>