<?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"
    android:background="@color/detail_activity_background"
    android:paddingStart="8dp"
    android:paddingEnd="8dp"
    android:paddingTop="6dp"
    android:paddingBottom="6dp">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/message_bar_card"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:cardCornerRadius="16dp"
        app:cardElevation="0dp"
        app:strokeWidth="0dp"
        app:cardBackgroundColor="?android:attr/colorBackground"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/message_bar_publish_button"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginEnd="6dp">

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

            <ImageButton
                android:id="@+id/message_bar_expand_button"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:src="@drawable/ic_expand_less_gray_24dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/message_bar_expand_button_description"
                app:tint="?attr/colorOutline"
                android:layout_marginStart="4dp"/>

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/message_bar_text"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:hint="@string/message_bar_hint"
                android:textColorHint="?attr/colorOutline"
                android:inputType="textMultiLine|textCapSentences"
                android:minHeight="48dp"
                android:maxLines="4"
                android:background="@null"
                android:paddingStart="4dp"
                android:paddingEnd="16dp"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:importantForAutofill="no"/>

        </LinearLayout>

    </com.google.android.material.card.MaterialCardView>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/message_bar_publish_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_send_white_24dp"
        android:contentDescription="@string/message_bar_publish_button_description"
        android:clickable="true"
        android:focusable="true"
        app:fabSize="mini"
        app:fabCustomSize="48dp"
        app:maxImageSize="24dp"
        app:tint="?attr/colorOnPrimary"
        app:backgroundTint="?attr/colorPrimary"
        app:rippleColor="#40FFFFFF"
        app:elevation="2dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
