Please Remove the NestedScrollView so that your layout looks something like this
```xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/messageRecycler"
android:layout_width="match_parent"
android:layout_height="640dp"
app:layout_constraintBottom_toTopOf="@+id/bottom"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout
android:id="@+id/bottom"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="@id/messageRecycler"
android:layout_alignParentBottom="true"
android:background="@drawable/back"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<EditText
android:id="@+id/writeMessage"
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="6"
android:hint="@string/type_here"
android:importantForAutofill="no"
android:inputType="text"
android:padding="5dp"
tools:ignore="Suspicious0dp">
</EditText>
<ImageView
android:id="@+id/sendImage"
android:layout_width="0dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:background="@drawable/send"
android:contentDescription="@string/todo">
</ImageView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
```
Just add
android:windowSoftInputMode="adjustResize"
in your AndroidManifest.xml where you declare this particular activity and this will adjust the layout resize option.
![enter image description here][1]
[1]: http://i.stack.imgur.com/D3t8L.png
some source code below for layout design
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="FaceBook"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:layout_marginTop="30dp"
android:ems="10"
android:hint="username" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/editText1"
android:layout_marginTop="20dp"
android:ems="10"
android:hint="password" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/editText2"
android:layout_centerHorizontal="true"
android:layout_marginLeft="18dp"
android:layout_marginTop="20dp"
android:text="Log In" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="17dp"
android:gravity="center"
android:text="Sign up for facebook"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>