ListView inside ScrollView which is also inside a Scrollview
<p>I have a Listview inside a Scrollview and manually binding its data on the code behind. My main problem is, when I bind my data, my listview isn't expanding its height. I've tried setting it to <code>wrap_content</code>, <code>fill_parent</code> but nothing works. Here is my XML</p>

<pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/parentScrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content" &gt;

&lt;RelativeLayout
&gt;

&lt;LinearLayout &gt;

    &lt;ImageView
        /&gt;

    &lt;LinearLayout
         &gt;

        &lt;TextView /&gt;

        &lt;TextView /&gt;

        &lt;LinearLayout &gt;

            &lt;TextView/&gt;

            &lt;TextView/&gt;
        &lt;/LinearLayout&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" &gt;

            &lt;TextView/&gt;

            &lt;TextView /&gt;
        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;

&lt;View /&gt;

&lt;TextView/&gt;

&lt;ScrollView
    android:id="@+id/childScrollView"
    android:layout_width="match_parent"
    android:layout_height="375dp"
    android:layout_below="@+id/view1"
    android:layout_centerHorizontal="true"
    android:layout_marginLeft="10dip"
    android:layout_marginRight="10dip"
    android:layout_marginTop="18dp"
    android:background="@drawable/scrollviewborder"
    android:scrollbarStyle="insideInset" &gt;

    &lt;ListView
        android:id="@+id/listFriends"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"
        android:paddingLeft="2dip"
        android:paddingRight="2dip"
        android:paddingTop="2dip"
        &gt;
    &lt;/ListView&gt;


&lt;/ScrollView&gt;

&lt;Button /&gt;

&lt;/RelativeLayout&gt;

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

<p>Please see that it is a nested ListView and here is my code behind</p>

<pre><code>    ArrayList&lt;HashMap&lt;String, String&gt;&gt; friendList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
    // adding database values to HashMap key =&gt; value
    for (int i = 0; i &lt; friendName.length; i++) {
        // creating new HashMap
        HashMap&lt;String, String&gt; friend = new HashMap&lt;String, String&gt;();
            //merchant.put(KEY_ID, merchantIdArray[i]); 
            friend.put(KEY_FRIEND_NAME, friendName[i]);
            friend.put(KEY_THUMB_URL,imageIDs[i]);
        friendList.add(friend);
    }

    list=(ListView)findViewById(R.id.listFriends);
     adapter =new LazyAdapter(this, friendList);        
     list.setAdapter(adapter);
</code></pre>

<p>What seems to be the problem?</p>

<p><strong>EDIT</strong>
Ive added this code for validating which scroll should be used</p>

<pre><code>    parentScrollView= (ScrollView) findViewById(R.id.parentScrollview);
    parentScrollView.setOnTouchListener(new View.OnTouchListener() {

        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
             //Log.v(TAG,"PARENT TOUCH");
             findViewById(R.id.childScrollView).getParent().requestDisallowInterceptTouchEvent(false);
            return false;
            }
        });
    childScrollView= (ScrollView) findViewById(R.id.childScrollView);
    childScrollView.setOnTouchListener(new View.OnTouchListener() {

        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
             //Log.v(TAG,"PARENT TOUCH");
             findViewById(R.id.childScrollView).getParent().requestDisallowInterceptTouchEvent(true);
            return false;
        }
    });
</code></pre>

<p>The main reason about this is that I will put my Facebook friendlist inside this Listview that it should be scrollable</p>
