title: Adding custom list adapter to a TableLayout
body: <p>I have a custom list adapter inside of a TableLayout. This TableLayout is nested inside a of a LinearLayout.</p>
  
  <p>The list adapter expands if new childviews are added to the list. I want the size of the TableRow to increase dynamically when the size of the list adapter increases. And the buttons pushed down when the list grows.</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_height="match_parent" android:layout_width="match_parent" 
      &gt;
  
          &lt;LinearLayout"&gt;
              &lt;!-- Draw header + sub title --&gt;
              &lt;LinearLayout android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="fill_parent" &gt;
                  &lt;TextView &gt;&lt;/TextView&gt;
                  &lt;TextView &gt;&lt;/TextView&gt;
              &lt;/LinearLayout&gt;
  
              &lt;LinearLayout android:orientation="horizontal"&gt;
                  &lt;ImageView /&gt;
                  &lt;LinearLayout android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="fill_parent" 
                      android:layout_weight="1"&gt;
                      &lt;TableLayout android:layout_height="fill_parent" android:layout_width="fill_parent"  android:layout_weight="1"&gt;
                          &lt;TableRow android:id="@+id/tr1"&gt;
                              &lt;CustomList android:id="@+id/mainview"
                                  ndroid:layout_height="wrap_content" android:layout_width="wrap_content" /&gt;
                          &lt;/TableRow&gt;
                          &lt;TableRow android:layout_height="wrap_content"
                              android:layout_width="match_parent"&gt;
                              &lt;Button android:layout_width="wrap_content" android:id="@+id/button1"
                                  android:text="@string/buttonPrevious" android:layout_height="wrap_content"&gt;
                              &lt;/Button&gt;
                              &lt;Button android:layout_width="wrap_content" android:id="@+id/button2"
                                  android:text="@string/buttonNext" android:layout_height="wrap_content"&gt;&lt;/Button&gt;
                          &lt;/TableRow&gt;
                      &lt;/TableLayout&gt;
                  &lt;/LinearLayout&gt;
                  &lt;ImageView  /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Do I have to do change something like change the way layouts are inflated in my custom list adapter or anything else?</p>