<merge xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <ImageButton
        android:id="@id/attachmentButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true" />

    <Space
        android:id="@id/attachmentButtonSpace"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_toEndOf="@id/attachmentButton"
        android:layout_toRightOf="@id/attachmentButton" />

    <EditText
        android:id="@id/messageInput"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_toEndOf="@id/attachmentButtonSpace"
        android:layout_toLeftOf="@id/sendButtonSpace"
        android:layout_toRightOf="@id/attachmentButtonSpace"
        android:layout_toStartOf="@id/sendButtonSpace"
        android:inputType="textAutoCorrect|textAutoComplete|textMultiLine|textCapSentences" />

    <Space
        android:id="@id/sendButtonSpace"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_toLeftOf="@id/messageSendButton"
        android:layout_toStartOf="@id/messageSendButton" />

    <ImageButton
        android:id="@id/messageSendButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true" />

</merge>