<?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="match_parent">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/chatroom_message_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical" />

    <!-- A horizontal line between the chatbox and RecyclerView -->
    <View
        android:layout_width="0dp"
        android:layout_height="2dp"
        android:background="#dfdfdf"
        android:layout_marginBottom="0dp"
        app:layout_constraintBottom_toTopOf="@+id/layout_chatbox"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"/>

    <LinearLayout
        android:id="@+id/layout_chatbox"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:minHeight="48dp"
        android:background="#ffffff"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toLeftOf="parent">

        <EditText
            android:id="@+id/chatroom_message_box"
            android:hint="@string/chatroom_send_hint"
            android:background="@android:color/transparent"
            android:layout_gravity="center"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:maxLines="6"
            android:autofillHints=""
            android:inputType="text" />

        <Button
            android:id="@+id/chatroom_message_send"
            android:text="@string/chatroom_send"
            android:textSize="15sp"
            android:background="?attr/selectableItemBackground"
            android:clickable="true"
            android:focusable="true"
            android:layout_width="64dp"
            android:layout_height="48dp"
            android:gravity="center"
            android:layout_gravity="bottom" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>