A relative layout inside of a scrollview isnt scrollable : Im trying to make a UI with a few fields in the middle of the screen and a button at the bottom. When i am writing a number in the fields, the keyboard hides part of the interface (which i want it to), but i also need the whole interface to be scrollable so that i can adjust the screen and keep filling the fields with the keyboard on. I've put the whole setup in a relative layout and put it under a scroll view. The posts here say it should work that way but it isnt working for me.

the xml code is

    <?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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.maaz.rakattracker.MainActivity">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">


            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <EditText
                        android:id="@+id/farzET"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="10"
                        android:gravity="center"
                        android:hint="0"
                        android:inputType="number"
                        android:singleLine="true"
                        android:textAlignment="center" />

                    <TextView
                        android:id="@+id/farzLbl"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:elevation="0dp"
                        android:ems="5"
                        android:text="farz"
                        android:textAlignment="center"
                        android:textSize="15sp" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <EditText
                        android:id="@+id/sunnatET"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="10"
                        android:hint="0"
                        android:inputType="number"
                        android:singleLine="true"
                        android:textAlignment="center" />

                    <TextView
                        android:id="@+id/sunnatLbl"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="5"
                        android:text="Sunnat"
                        android:textAlignment="center"
                        android:textSize="15sp" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <EditText
                        android:id="@+id/naflET"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="10"
                        android:gravity="center"
                        android:hint="0"
                        android:inputType="number"
                        android:singleLine="true"
                        android:textAlignment="center" />

                    <TextView
                        android:id="@+id/naflLbl"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="5"
                        android:text="Nafl"
                        android:textAlignment="center"
                        android:textSize="15sp" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <EditText
                        android:id="@+id/witrET"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="10"
                        android:hint="0"
                        android:inputType="number"
                        android:singleLine="true"
                        android:textAlignment="center" />

                    <TextView
                        android:id="@+id/witrLbl"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ems="5"
                        android:text="Witr"
                        android:textAlignment="center"
                        android:textSize="15sp" />
                </LinearLayout>
            </LinearLayout>

            <Button
                android:id="@+id/startButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_centerHorizontal="true"
                android:text="Button" />
        </RelativeLayout>
    </ScrollView>

</RelativeLayout>

Kindly help me figure out the issue here.
Thanks
