I want to create a layout which will have a scrollview, inside the srollview at the top of the layout there will be two Textviews. In the center there will be two Edittexts and at the bottom of the layout, there will be two buttons. But everything will be under the main scrollview.
A visual description of my requirement:
I have done some coding which scrolls the top content but keeps the buttons at the bottom out of the scrollview which is not the expected functionality.
My layout coding:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" >
<ScrollView
android:id="@+id/my_scrollview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/LinearLayout01"
android:scrollbars="horizontal" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/welcomeToStudy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="Welcome to xxxxxxxxxxxxxxx!"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#54575A"
android:textSize="28sp" />
<TextView
android:id="@+id/pleaseEnter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/welcomeToStudy"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:text="Please enter your details xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx."
android:textSize="20sp" />
<EditText
android:id="@+id/emailSignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/pleaseEnter"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:ems="10"
android:hint="Email"
android:inputType="textEmailAddress"
android:singleLine="true"
android:textSize="24sp" >
</EditText>
<EditText
android:id="@+id/passwordSignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/emailSignUp"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:singleLine="true"
android:textSize="24sp" >
</EditText>
</RelativeLayout>
</ScrollView>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:layout_marginTop="5dp">
<Button
android:id="@+id/signUpBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/next_button_selector"
android:text="Sign Up"
android:textColor="#FFFFFF"
android:textSize="20sp" >
</Button>
<Button
android:id="@+id/registerWithFb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@drawable/next_button_xhdpi_facebook"
android:text="Sign up with Facebook"
android:textColor="#FFFFFF"
android:textSize="20sp" >
</Button>
</LinearLayout>
</RelativeLayout>
What should I do to get the expected output?