<?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"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">

    <TextView
        android:id="@+id/text_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/chat"
        android:textAppearance="?attr/textAppearanceHeadline6"
        android:gravity="center"
        android:layout_marginBottom="16dp" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/chat_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:layout_marginBottom="16dp"
        android:transcriptMode="alwaysScroll" />

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

        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:hint="@string/type_message">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/chat_input"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="text"
                android:imeOptions="actionSend" />

        </com.google.android.material.textfield.TextInputLayout>

        <ImageButton
            android:id="@+id/send_button"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_gravity="bottom"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:src="@drawable/ic_send"
            android:contentDescription="@string/send_message" />
    </LinearLayout>
</LinearLayout>