This question has been asked before, but I cannot find a good answer that works for me.
Here is my XML code (updated):
<?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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Account Name"
android:textSize="32dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:id="@+id/textView" />
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:id="@+id/accountName"
android:background="@drawable/edit_text_background"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:padding="10dp"
android:backgroundTint="@color/abc_secondary_text_material_light" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Account Balance"
android:textSize="32dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="numberDecimal"
android:id="@+id/accountBalance"
android:background="@drawable/edit_text_background"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:padding="10dp"
android:backgroundTint="@color/abc_secondary_text_material_light"
android:text="£"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="New Button"
android:id="@+id/button"
android:layout_gravity="center_horizontal"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
I tried using android:windowSoftInputMode="adjustPan|adjustResize", but it did not work.
I feel something is wrong with the layout of the XML ... It looks like this, and I want the button to move up when the keyboard appears:

source
share