Q:

how to fill the empty space with ListView after hiding a button

I have a simple vertical LinearLayout in which there is a button on the top and a Listview below it.  What I want is that when the button is pressed, it hides (using View. GONE) and the empty space generated by it is filled by ListView.  But after all the efforts, I have not been able to implement it. 
I tried invalidate() and onDraw(), I tried giving layout_weight=1 to the ListView, I tried forceLayout(), requestLayout() methods as well but none of them worked.  
The strange thing is that if there is EditText or TextView or any other component instead of ListView, its working fine i.e. Edittext etc.  go and grab the empty space generated by hiding the Button.  But in case of ListView , its not happening. 

A:

This thing is perfectly working in my emulator
    btn1 = (Button) findViewById(R.id.button1);

    btn1.setOnClickListener( new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
            new ProgressTask().execute();
            btn1.setVisibility(8);
        }
    })

XML code
<? xml version="1.0" encoding="utf-8"? >
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />

    <ListView
        android:id="@+id/itemlist"
        android:layout_below="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</RelativeLayout>

