title: List view - auto modify height
body: <p>I'm learning Android and now I have this tutorial: <a href="http://www.informit.com/articles/article.aspx?p=1928230" rel="nofollow">http://www.informit.com/articles/article.aspx?p=1928230</a></p>
  
  <p>I modify (I want scroll all page) this and i have:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/ScrollView01"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" &gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
  
          &lt;ListView
              android:id="@+id/petList"
              android:layout_width="wrap_content"
              android:layout_height="700dp" //here!!!!
              android:divider="#000"
          /&gt;
  
          &lt;Button
              android:id="@+id/ButtonAddNews"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Add new Pet" &gt;
          &lt;/Button&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Single item:</p>
  
  <pre><code>         &lt;LinearLayout
              android:id="@+id/relative"
              android:layout_height="wrap_content"  
              android:layout_width="fill_parent"
              android:padding="5dp"
              orientation="horizontal"&gt;
                      &lt;TextView
                          android:id="@+id/TextView01"
                          android:layout_width="match_parent"
                          android:layout_weight="1"
                          android:layout_height="?android:attr/listPreferredItemHeight"
                          android:textColor="#f00"
                          android:layout_alignParentLeft="true"
                          android:text="two" &gt;&lt;/TextView&gt;
                      &lt;TextView
                          android:id="@+id/TextView02"
                          android:layout_width="match_parent"
                          android:layout_weight="1"
                          android:layout_height="?android:attr/listPreferredItemHeight"
                          android:textColor="#f00"
                          android:text="three" 
                          android:layout_alignParentRight="true"&gt;&lt;/TextView&gt;
          &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This working ok, but i must modify android:layout_height. </p>
  
  <p>For example if i have 3 item in list then 700dp it is too more. 
  If I use fill_parent, match_parent or wrap_content then this show me only one item (I can scroll it).</p>
  
  <p>What I have to type in the layout_height to automatically expanding, with the number of items?</p>