title: TableLayout is not scrolling inside ScrollView
body: <p>My problem is that after I create TableLayout in code, I'm adding it to the activity view and I really need it to be scrollable. The table is created from resultset containing result of SQL query and it may differ depending on the query itself, so it has to be 'universal', not always scrollable. I've found answers to scrolling problems like that here at stackoverflow and after some reading, I've built my activity like that:</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_alignParentBottom="true"
  android:layout_alignParentLeft="true"
  android:layout_alignParentRight="true"
  android:layout_below="@+id/textView1"
  android:clickable="true"
  android:scrollbarAlwaysDrawVerticalTrack="true"
  android:scrollbarStyle="insideOverlay"
  android:scrollbars="horizontal|vertical"
  android:visibility="visible"
  tools:context=".Wyswietlanie" &gt;
  
  &lt;RelativeLayout
  android:id="@+id/rel1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
   &gt;
  
  &lt;TextView
      android:id="@+id/textView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="23dp"
      android:text="@string/wczytywanie"
      android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
  
  
  
  
  &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>In code, I'm simply adding my generated TableLayout like this:</p>
  
  <pre><code>rl1.addView(result);
  </code></pre>
  
  <p>Where rl1 is the relative layout (found by id), and result is the TableLayout. TableLayout shows itself, but nothing is scrollable. No scrollbars are visible, nothing happens when I'm sliding my finger over it in different directions. Nothing at all. Where is my mistake? Should I use something else?  </p>
  
  <p>(please ignore the fact that obviously the generated tablelayout is overlapping the textview, I saved it for later.)</p>