<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ListView
        android:id="@+id/chat_messages_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:transcriptMode="normal"
        android:stackFromBottom="true"
        android:layout_weight="1"/>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#bebebe">

        <TextView
            android:id="@+id/chat_writing_message_flag"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:textSize="@dimen/flag_text"/>

        <Button
            android:id="@+id/chat_send_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_below="@id/chat_writing_message_flag"
            android:text="@string/send"/>

        <EditText
            android:id="@+id/chat_input"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@id/chat_send_button"
            android:layout_below="@id/chat_writing_message_flag"
            android:gravity="top"
            android:lines="3"/>

    </RelativeLayout>
</LinearLayout>