ScrollView for TableLayout doesn't scroll
<p>I have a LinearLayout inside which I have a <code>ScrollView</code> for a <code>TableLayout</code> inside the <code>LinearLayout</code>.</p>

<p>I want to scroll along the <code>TAbleLayout</code> which adds content dynamically. But it doesn't work. I have given 60dp for the <code>LinearLayout</code> and not <code>wrap_content</code> so that it doesn't stretch as the list goes on. And there's an outer scrollview for all other layouts too.</p>

<p>This is the part of the xml.</p>

<pre><code>&lt;LinearLayout
                android:layout_width="match_parent"
                android:layout_height="60dp"
                android:gravity="center"
                android:layout_gravity="center"
                android:orientation="vertical"&gt;

                &lt;ScrollView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="10dp"
                    android:fillViewport="true"
                    &gt;

                    &lt;TableLayout
                        android:id="@+id/cashOutTableLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:padding="15dp"
                        android:background="@drawable/edittext_style"
                        android:gravity="center"&gt;


                    &lt;/TableLayout&gt;
                &lt;/ScrollView&gt;
            &lt;/LinearLayout&gt;
</code></pre>