title: ListView inside ScrollView is not scrolling on Android
body: <p>I am having trouble with a scrolling <code>ListView</code> inside a <code>ScrollView</code>. I have an Activity which has some EditTexts in the top part and then a tab host with two tabs which have one ListView each. When the EditText views are focused, the soft keyboard comes up and as I  have a ScrollView, the content is scrollable. But the problem comes when there are more items in ListViews (ones in tabs), I am not able to scroll the ListView, even if there are more items.</p>
  
  <p>The following is the layout XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="?backgroundImage"
      android:orientation="vertical"&gt;
  
    &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="50dip"
          android:layout_alignParentBottom="true"
          android:layout_margin="10dip"
          android:id="@+id/buttons"&gt;
      &lt;Button
              android:text="Save"
              android:layout_margin="2dip"
              android:textSize="20dip"
              android:id="@+id/btnSaveorUpdate"
              android:layout_height="wrap_content"
              android:layout_width="145dip"&gt;&lt;/Button&gt;
      &lt;Button
              android:text="Cancel"
              android:layout_margin="2dip"
              android:textSize="20dip"
              android:id="@+id/btnCancelorDelete"
              android:layout_height="wrap_content"
              android:layout_width="145dip"&gt;&lt;/Button&gt;
    &lt;/LinearLayout&gt;
    &lt;ScrollView
          android:layout_above="@id/buttons"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:fillViewport="true"
          android:layout_margin="10dip"&gt;
      &lt;LinearLayout
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_margin="10dip"&gt;
        &lt;TextView
                  android:text="Bill details"
                  android:textColor="?textColorDark"
                  android:layout_alignParentTop="true"
                  android:id="@+id/txtEnterDetails"
                  android:textSize="25dip"
                  android:textStyle="bold"
                  android:layout_height="wrap_content"
                  android:layout_width="fill_parent"
                  android:layout_marginBottom="2dip"&gt;&lt;/TextView&gt;
        &lt;LinearLayout
                  android:focusable="true"
                  android:focusableInTouchMode="true"
                  android:layout_width="0dip"
                  android:layout_height="0dip" /&gt;
        &lt;EditText
                  android:layout_width="fill_parent"
                  android:hint="Enter data"
                  android:inputType="numberDecimal"
                  android:id="@+id/txtSample"
                  android:textSize="@dimen/editText"
                  android:layout_height="@dimen/editTextHeight"
                  android:text=""&gt;&lt;/EditText&gt;
        &lt;EditText
                  android:layout_width="fill_parent"
                  android:id="@+id/txtDescription"
                  android:hint="Enter description"
                  android:textSize="@dimen/editText"
                  android:layout_height="@dimen/editTextHeight"
                  android:inputType="text"
                  android:text=""&gt;&lt;/EditText&gt;
        &lt;EditText
                  android:layout_width="fill_parent"
                  android:id="@+id/txtComment"
                  android:hint="Enter comment (if any)"
                  android:textSize="@dimen/editText"
                  android:layout_height="@dimen/editTextHeight"
                  android:inputType="text"
                  android:text=""&gt;&lt;/EditText&gt;
        &lt;LinearLayout
                  android:orientation="horizontal"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"&gt;
          &lt;TextView
                      android:id="@+id/txtDate"
                      android:layout_width="wrap_content"
                      android:text=""
                      android:textSize="20dip"
                      android:textColor="?textColorDark"
                      android:layout_marginLeft="10dip"
                      android:layout_height="@dimen/editTextHeight"
                      android:layout_gravity="center_vertical" /&gt;
          &lt;Button
                      android:id="@+id/btnPickDate"
                      android:layout_width="wrap_content"
                      android:layout_height="@dimen/editTextHeight"
                      android:text="Select date"
                      android:layout_margin="2dip"
                      android:textSize="15dip"
                      android:layout_gravity="center_vertical" /&gt;
        &lt;/LinearLayout&gt;
        &lt;TabHost
                  android:id="@+id/tabhost"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"&gt;
          &lt;LinearLayout
                      android:id="@+id/linearLayout1"
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"
                      android:orientation="vertical"&gt;
            &lt;TabWidget
                          android:layout_width="fill_parent"
                          android:layout_height="wrap_content"
                          android:id="@android:id/tabs"&gt;&lt;/TabWidget&gt;
            &lt;FrameLayout
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"
                          android:id="@android:id/tabcontent"&gt;
              &lt;ScrollView
                              android:layout_above="@id/buttons"
                              android:layout_width="fill_parent"
                              android:layout_height="fill_parent"
                              android:fillViewport="true"
                              android:id="@+id/tab1"&gt;
                &lt;LinearLayout
                                  android:layout_width="fill_parent"
                                  android:layout_height="wrap_content"
                                  android:orientation="vertical"&gt;
                  &lt;TableLayout
                                      android:layout_height="wrap_content"
                                      android:layout_width="fill_parent"&gt;
                    &lt;TableRow
                                          android:id="@+id/tableRow1"
                                          android:layout_marginLeft="2dip"
                                          android:layout_marginRight="5dip"
                                          android:layout_width="fill_parent"
                                          android:layout_height="wrap_content"&gt;
                      &lt;LinearLayout
                                              android:layout_width="fill_parent"
                                              android:layout_height="wrap_content"
                                              android:orientation="horizontal"&gt;
                        &lt;ImageView
                                                  android:src="@drawable/ic_menu_invite"
                                                  android:layout_width="40dip"
                                                  android:layout_height="40dip"
                                                  android:layout_gravity="center_vertical"&gt;&lt;/ImageView&gt;
                        &lt;TextView
                                                  android:text="Add friend"
                                                  android:layout_height="wrap_content"
                                                  android:layout_width="fill_parent"
                                                  android:layout_centerVertical="true"
                                                  android:textColor="?textColorDark"
                                                  android:textSize="@dimen/editText"
                                                  android:layout_gravity="center_vertical" /&gt;
                      &lt;/LinearLayout&gt;
                    &lt;/TableRow&gt;
                    &lt;TableRow
                                          android:layout_width="fill_parent"
                                          android:layout_height="wrap_content"
                                          android:layout_marginLeft="5dip"
                                          android:layout_marginRight="5dip"&gt;
                      &lt;TextView
                                              android:id="@+id/txtData1"
                                              android:layout_width="170dip"
                                              android:layout_height="wrap_content"
                                              android:text="Data"
                                              android:textSize="14dip"
                                              android:textStyle="bold"
                                              android:textColor="#000000"&gt;
                      &lt;/TextView&gt;
                      &lt;TextView
                                              android:id="@+id/txtData2"
                                              android:layout_width="wrap_content"
                                              android:layout_height="wrap_content"
                                              android:text="Sample"
                                              android:textSize="13dip"
                                              android:textColor="#000000"&gt;&lt;/TextView&gt;
  
                    &lt;/TableRow&gt;
                  &lt;/TableLayout&gt;
                  &lt;ListView
                                      android:cacheColorHint="#00000000"
                                      android:id="@+id/ListView01"
                                      android:layout_height="wrap_content"
                                      android:layout_width="fill_parent" /&gt;
                &lt;/LinearLayout&gt;
              &lt;/ScrollView&gt;
              &lt;LinearLayout
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:gravity="center_horizontal"
                              android:id="@+id/tab2"
                              android:orientation="vertical"&gt;
                &lt;TableLayout
                                  android:layout_height="wrap_content"
                                  android:layout_width="fill_parent"&gt;
                  &lt;TableRow
                                      android:id="@+id/tableRow2"
                                      android:layout_marginLeft="2dip"
                                      android:layout_marginRight="5dip"
                                      android:layout_width="fill_parent"
                                      android:layout_height="wrap_content"&gt;
                    &lt;LinearLayout
                                          android:layout_width="fill_parent"
                                          android:layout_height="wrap_content"
                                          android:orientation="horizontal"&gt;
                      &lt;ImageView
                                              android:src="@drawable/ic_menu_invite"
                                              android:layout_width="40dip"
                                              android:layout_height="40dip"
                                              android:layout_gravity="center_vertical"&gt;&lt;/ImageView&gt;
                      &lt;TextView
                                              android:text="Sample"
                                              android:layout_height="wrap_content"
                                              android:layout_width="fill_parent"
                                              android:layout_centerVertical="true"
                                              android:textColor="?textColorDark"
                                              android:textSize="@dimen/editText"
                                              android:layout_gravity="center_vertical" /&gt;
                    &lt;/LinearLayout&gt;
                  &lt;/TableRow&gt;
                  &lt;TableRow
                                      android:layout_width="fill_parent"
                                      android:layout_height="wrap_content"
                                      android:layout_marginLeft="5dip"
                                      android:layout_marginRight="5dip"&gt;
                    &lt;TextView
                                          android:id="@+id/txtUser1"
                                          android:layout_width="170dip"
                                          android:layout_height="wrap_content"
                                          android:text="User"
                                          android:textSize="14dip"
                                          android:textStyle="bold"
                                          android:textColor="#000000"&gt;
                    &lt;/TextView&gt;
                    &lt;TextView
                                          android:id="@+id/txtUserData"
                                          android:layout_width="wrap_content"
                                          android:layout_height="wrap_content"
                                          android:text="UserData"
                                          android:textSize="13dip"
                                          android:textColor="#000000"&gt;&lt;/TextView&gt;
                  &lt;/TableRow&gt;
                &lt;/TableLayout&gt;
  
                &lt;ListView
                                  android:cacheColorHint="#00000000"
                                  android:id="@+id/ListView02"
                                  android:layout_height="wrap_content"
                                  android:layout_width="fill_parent" /&gt;
  
              &lt;/LinearLayout&gt;
  
  
            &lt;/FrameLayout&gt;
          &lt;/LinearLayout&gt;
        &lt;/TabHost&gt;
      &lt;/LinearLayout&gt;
    &lt;/ScrollView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Please can anyone tell me what the problem is here? I have another post on the ListView inside ScrollView problem, but they were of no use in my case.</p>