title: ScrollView inside a RelativeLayout
body: <p><strong>I need to do a scroll view inside a relative layout.</strong></p>
  
  <p>When I added the ScrollView this was the result <a href="http://postimg.org/image/6abxth299/" rel="nofollow">http://postimg.org/image/6abxth299/</a> where the components are are only taking up half of the screen and when this screen is opened the keyboard comes up by default</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:scrollbars="vertical" &gt;
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          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"
          tools:context=".MainActivity"
          android:layout_centerHorizontal="true"
          android:id="@+id/data_entry_layout"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Post Title"
                  android:id="@+id/post_title"
                  android:layout_alignBaseline="@+id/post_title_input"
                  android:layout_alignBottom="@+id/post_title_input"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:textSize="26px"/&gt;
  
              &lt;EditText
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/post_title_input"
                  android:layout_alignParentRight="true"
                  android:layout_alignParentEnd="true"
                  android:layout_toRightOf="@+id/post_title"
                  android:layout_toEndOf="@+id/post_title"
                  android:inputType="textCapSentences"/&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Post Description"
                  android:id="@+id/post_description"
                  android:layout_below="@+id/post_title_input"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:layout_marginTop="39dp"
                  android:textSize="26px"/&gt;
  
              &lt;EditText
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:inputType="textMultiLine|textCapSentences"
                  android:ems="10"
                  android:id="@+id/editText"
                  android:layout_marginTop="16dp"
                  android:layout_below="@+id/post_description"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"/&gt;
  
              &lt;ImageButton
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:id="@+id/imageButton1"
                  android:layout_below="@+id/editText"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:baselineAlignBottom="false"
                  android:contextClickable="true"
                  android:src="@drawable/image_button_icon"
                  android:onClick="galleryIntent"/&gt;
  
              &lt;Button
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Cancel"
                  android:id="@+id/cancel"
                  android:layout_alignParentBottom="true"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:layout_below="@id/imageButton1"
  
                 /&gt;
  
              &lt;Button
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Submit"
                  android:id="@+id/submit"
                  android:layout_alignTop="@+id/cancel"
                  android:layout_alignParentRight="true"
                  android:layout_alignParentEnd="true"
                  android:layout_below="@id/imageButton1"/&gt;
  
      &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>