app/src/main/res/layout/activity_chat.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_chat"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.sdpteam.connectout.chat.ChatActivity">
<ListView
android:id="@+id/list_of_messages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:divider="@android:color/transparent"
android:scrollbarStyle="outsideInset"
android:dividerHeight="16dp"
android:layout_above="@+id/message_input_container"
android:layout_marginBottom="15dp" />
<LinearLayout
android:id="@+id/message_input_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<LinearLayout
android:id="@+id/messageInputRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/messageInputRow1"
android:layout_marginBottom="0dp"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:orientation="horizontal"
android:background="@color/fui_buttonShadow"
android:visibility="visible">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/deselect_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@string/send"
android:tint="@android:color/white"
app:fabSize="mini"
app:srcCompat="@android:drawable/ic_menu_close_clear_cancel"
android:focusable="true" />
<FrameLayout
android:id="@+id/chat_image_upload_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/messageInputRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:background="@color/fui_buttonShadow"
android:layout_marginBottom="0dp">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/select_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@string/send"
android:tint="@android:color/white"
app:fabSize="mini"
app:srcCompat="@android:drawable/ic_menu_gallery"
android:focusable="true"
android:layout_gravity="center_vertical"
android:visibility="visible" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/chat_input_layout"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginRight="16dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/chat_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/input" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/chat_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@string/send"
android:tint="@android:color/white"
app:fabSize="mini"
app:srcCompat="@android:drawable/ic_menu_send"
android:focusable="true"
android:layout_gravity="center_vertical" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>