title: Make part of relativeLayout scrollable?
body: <p>I have a <code>relativeLayout</code> inside a <code>linearLayout</code>. <code>relativeLayout</code> contains buttons on the left, and a terminal&amp;edittext on the right. I want only part of this <code>relativeLayout</code> to be scrollable, the buttons on the left. However If I try to do this the whole thing becomes scrollable. If I separate the buttons on the left from the terminal on the right, into two different relativeLayouts, the buttons become scrollable but the terminal and edittext now appear below the buttons instead of to the right of them.
  Current screenshot: <a href="http://i.imgur.com/7sYcU.png" rel="nofollow">http://i.imgur.com/7sYcU.png</a></p>
  
  <p>How do i jsut make the buttons scroll while keeping the terminal where it is? Why do the relative commands to be below/to the right of buttons not work if I separate them into two different <code>relativeLayouts</code>?</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/MainLayout"
      android:background="@drawable/wallpaper"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
  
         &lt;LinearLayout android:id="@+id/topButtons" 
          android:layout_margin="4dip"
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
          &lt;Button android:id="@+id/deviceConnect"
              android:layout_margin="8dip"
              android:layout_weight="3"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="Connect"/&gt;
          &lt;LinearLayout android:orientation="vertical"
              android:layout_weight="1"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"&gt;
              &lt;LinearLayout android:orientation="horizontal"
                  android:layout_margin="8dip"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"&gt;
                  &lt;TextView android:text="Connected Adapter:"
                      android:layout_gravity="center_vertical"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"/&gt;
                  &lt;Spinner android:id="@+id/deviceSpinner"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:drawSelectorOnTop="true"/&gt;
                  &lt;TextView android:id="@+id/currentSettings" 
                      android:layout_marginLeft="8dip"
                      android:text="Current Settings: Not Connected"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_vertical"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout android:orientation="horizontal"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Baud:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/baudSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Data:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/dataSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Parity:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/paritySpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Stop:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/stopSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
          &lt;Button android:id="@+id/updateSettings"
              android:layout_margin="8dip"
              android:layout_weight="3"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="Update\nSettings"/&gt;
      &lt;/LinearLayout&gt;
  
          &lt;RelativeLayout 
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"&gt;
  
         &lt;Button android:id="@+id/Command"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Enable"/&gt; 
  
         &lt;Button android:id="@+id/Command2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Configure"
              android:layout_below="@+id/Command"/&gt; 
  
         &lt;Button android:id="@+id/Command3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Exit"
              android:layout_below="@+id/Command2"/&gt; 
  
         &lt;Button android:id="@+id/Command4"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Show Version"
              android:layout_below="@+id/Command3"/&gt; 
  
         &lt;Button android:id="@+id/Command5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Show Run"
              android:layout_below="@+id/Command4"/&gt; 
  
          &lt;Button android:id="@+id/Command6"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Backspace"
              android:layout_below="@+id/Command5"/&gt; 
  
              &lt;Button android:id="@+id/Command7"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Backspace2"
              android:layout_below="@+id/Command6"/&gt; 
  
  
          &lt;jackpal.androidterm.emulatorview.EmulatorView
          android:id="@+id/emulatorView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:focusable="true"
          android:focusableInTouchMode="true"
          android:layout_toRightOf="@+id/Command4"
          android:layout_below="@+id/deviceConnect"
           android:layout_above="@+id/term_entry"  /&gt;
  
           &lt;EditText
              android:id="@+id/term_entry"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:imeOptions="actionNone|flagNoExtractUi"
              android:inputType="text|textImeMultiLine"
              android:layout_alignParentBottom="true"
               android:layout_toRightOf="@+id/Command7" /&gt;
  
           &lt;Button
              android:id="@+id/term_entry_send"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/entry_send"
              android:layout_toRightOf="@+id/term_entry" 
              android:layout_alignParentBottom="true"
              /&gt;
  
          &lt;/RelativeLayout&gt;  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>EDIT:
  <a href="http://i.imgur.com/Dedc3.png" rel="nofollow">http://i.imgur.com/Dedc3.png</a></p>
  
  <pre><code>        &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/MainLayout"
      android:background="@drawable/wallpaper"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
  
         &lt;LinearLayout android:id="@+id/topButtons" 
          android:layout_margin="4dip"
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
          &lt;Button android:id="@+id/deviceConnect"
              android:layout_margin="8dip"
              android:layout_weight="3"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="Connect"/&gt;
          &lt;LinearLayout android:orientation="vertical"
              android:layout_weight="1"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"&gt;
              &lt;LinearLayout android:orientation="horizontal"
                  android:layout_margin="8dip"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"&gt;
                  &lt;TextView android:text="Connected Adapter:"
                      android:layout_gravity="center_vertical"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"/&gt;
                  &lt;Spinner android:id="@+id/deviceSpinner"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:drawSelectorOnTop="true"/&gt;
                  &lt;TextView android:id="@+id/currentSettings" 
                      android:layout_marginLeft="8dip"
                      android:text="Current Settings: Not Connected"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_vertical"/&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout android:orientation="horizontal"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Baud:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/baudSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Data:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/dataSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Parity:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/paritySpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
                  &lt;LinearLayout android:orientation="horizontal"
                      android:layout_margin="8dip"
                      android:layout_weight="1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView android:text="Stop:"
                          android:layout_gravity="center_vertical"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"/&gt;
                      &lt;Spinner android:id="@+id/stopSpinner"
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:drawSelectorOnTop="true"/&gt;
                  &lt;/LinearLayout&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
          &lt;Button android:id="@+id/updateSettings"
              android:layout_margin="8dip"
              android:layout_weight="3"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="Update\nSettings"/&gt;
      &lt;/LinearLayout&gt;
  
         &lt;ScrollView
          android:layout_height="wrap_content"
          android:layout_width="wrap_content"&gt;
  
          &lt;RelativeLayout 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
  
         &lt;Button android:id="@+id/Command"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Enable"/&gt; 
  
         &lt;Button android:id="@+id/Command2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Configure"
              android:layout_below="@+id/Command"/&gt; 
  
         &lt;Button android:id="@+id/Command3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Exit"
              android:layout_below="@+id/Command2"/&gt; 
  
         &lt;Button android:id="@+id/Command4"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Show Version"
              android:layout_below="@+id/Command3"/&gt; 
  
         &lt;Button android:id="@+id/Command5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Show Run"
              android:layout_below="@+id/Command4"/&gt; 
  
          &lt;Button android:id="@+id/Command6"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Backspace"
              android:layout_below="@+id/Command5"/&gt; 
  
           &lt;Button android:id="@+id/Command7"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Settings"
              android:layout_below="@+id/Command6"/&gt; 
  
  
          &lt;/RelativeLayout&gt;  
  &lt;/ScrollView&gt;
           &lt;RelativeLayout 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
          &lt;jackpal.androidterm.emulatorview.EmulatorView
          android:id="@+id/emulatorView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:focusable="true"
          android:focusableInTouchMode="true"
          android:layout_toRightOf="@+id/deviceConnect"
          android:layout_below="@+id/deviceConnect"
           android:layout_above="@+id/term_entry"  /&gt;
  
           &lt;EditText
              android:id="@+id/term_entry"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:imeOptions="actionNone|flagNoExtractUi"
              android:inputType="text|textImeMultiLine"
              android:layout_alignParentBottom="true"
               android:layout_toRightOf="@+id/Command4" /&gt;
  
           &lt;Button
              android:id="@+id/term_entry_send"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/entry_send"
              android:layout_toRightOf="@+id/term_entry" 
              android:layout_alignParentBottom="true"
              /&gt;
  
          &lt;/RelativeLayout&gt;  
  
  &lt;/LinearLayout&gt;
  </code></pre>