title: How to add a vertical scroll bar to Android layout with many children in the layout?
body: <p>I have been trying to figure out how to ensure the screen can be scrolled vertically as there are many radio buttons and they don't fit on the screen. I have tried most of the solutions posted on Stackoverflow, but I keep getting errors, here is my layout code at my last attempt:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"&gt;
  
  &lt;ScrollView
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"&gt;
  
   &lt;RadioGroup
          android:id="@+id/radioSharing"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" &gt;
  
      &lt;RadioButton
          android:id="@+id/radioSharingYes"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_sharing_yes"  /&gt;
  
      &lt;RadioButton
          android:id="@+id/radioSharingNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_sharing_no" /&gt;
  
  &lt;/RadioGroup&gt;
  
   &lt;RadioGroup
      android:id="@+id/radioInternet"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;RadioButton
          android:id="@+id/radioInternetYes"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_internet_yes"  /&gt;
  
      &lt;RadioButton
          android:id="@+id/radioInternetNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_internet_no" /&gt;
  
  &lt;/RadioGroup&gt;
  
  &lt;RadioGroup
      android:id="@+id/radioMap"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;RadioButton
          android:id="@+id/radioMapYes"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_map_yes"  /&gt;
  
      &lt;RadioButton
          android:id="@+id/radioMapNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_map_no" /&gt;
  
  &lt;/RadioGroup&gt;
  
      &lt;RadioGroup
      android:id="@+id/radioCalling"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;RadioButton
          android:id="@+id/radioCallingYes"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_calling_yes"  /&gt;
  
      &lt;RadioButton
          android:id="@+id/radioCallingNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_calling_no" /&gt;
  
  &lt;/RadioGroup&gt;
  
  &lt;RadioGroup
      android:id="@+id/radioDatabase"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;RadioButton
          android:id="@+id/radioDatabaseYes"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_database_yes"  /&gt;
  
      &lt;RadioButton
          android:id="@+id/radioDatabaseNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/radio_database_no" /&gt;
  
  &lt;/RadioGroup&gt;
  
  &lt;Button
      android:id="@+id/btnSave"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="30dp"
      android:text="@string/btn_display" /&gt;
  
  
  &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>The error I am getting is : "ScrollView can host only one direct child"</p>
  
  <p>Any advice would be appreciated, Thanks</p>