This is a follow up to this question.
Have spent days on this issue, and can’t seem to get what I want. What I need very simply is this entire view to be scrollable when the keyboard pops up after touching an edittext field:

Note that this view is not scrollable, it doesn’t need to be.
So when the user hits the edittext field (say the first one), it looks like this:

And if he/she chooses, the view can be scrolled to end no further that the way it looks here:

I’ve tried every combination of scrollview I could think of, but all it does is stretch my background image. I’m sure there is a simple solution to this, but I just can’t find it. I would really be grateful to anyone who can solve this problem. Here is the XML for the layout by the way:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/background"
android:orientation="vertical"
android:paddingLeft="60dp"
android:paddingTop="53dp" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text1"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText1"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="@id/textView1"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/editText1"
android:layout_marginTop="3dp"
android:text="text2"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText2"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="@id/textView2"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/editText2"
android:layout_marginTop="3dp"
android:text="text3"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/editText3"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_below="@id/textView3"
android:layout_marginTop="3dp"
android:inputType="numberDecimal" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/editText3"
android:layout_marginTop="3dp"
android:text="text4" />
<ImageView
android:id="@+id/gearImage3"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignLeft="@+id/button1"
android:layout_below="@id/button1"
android:layout_marginTop="70dp"
android:clickable="true"
android:contentDescription="@string/gearDescription_string"
android:src="@drawable/gear" />
</RelativeLayout>
Kindly note the latter two images are not from the real app (photoshopped to show what I need) but the first one is from my app. Thanks.
A ScrollView only scrolls to as far as there is data. So simply adding a ScrollView should just fix your problem. Add this to the start of your xml:
and then obviously add this at the bottom, after everything else:
I use this in my app and when the keyboard shows, I can still scroll to the bottom of the page. If your fields as shown in screenshot 1, are not longer than one normal phone page, it won’t scroll anyway. It will only scroll when you have the keyboard up as it can’t then see the whole screen.
Hope this helps!