Android ListView inside RelativeLayout trick
===

I came to the point, where in my RelativeLayout have to be two TextViews and one ExpandableListView. After long conversation I decided to show pictures in order for you to see how layout behaves itself.

There are snapshots. The first one is when ExpandableListView is NOT Expanded: 

![enter image description here][1]


But when I`m trying to expand this ExpandableListView I see the following:

![enter image description here][2]


  [1]: http://i.stack.imgur.com/3UY9W.png
  [2]: http://i.stack.imgur.com/pzEdY.png


We can see only little part of expanded list and the color of it is the same as the color of next TextView. Why is it so? My goal is to see whole expanded ExpandableListView.


The code of xml:

	


     <?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" >
    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:background="#000000" >

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="#00ff00" >

            <TextView
                android:id="@+id/user"
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:paddingLeft="3dp"
                android:text="Top User"
                android:textColor="#111111"
                android:background="#eeeeee"
                android:textSize="22dp" />
            <ExpandableListView
                android:id="@+id/elvMain"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" >
            </ExpandableListView>
            <TextView
                android:id="@+id/about"
                android:layout_width="match_parent"
                android:layout_height="100dp"
                android:text="Bottom About"
                android:textColor="#6f6f6f"
                android:textSize="24dp"
                android:textStyle="bold" />

        </LinearLayout>
    </ScrollView>
</RelativeLayout>

And the code of Activity:

    public class IngredientsActivity extends Activity {
	
	
	private ArrayList<Ingredient> ingredients;
	private Bitmap bitmap;
	private final String TAG = "IngredientsActivity";
	
	public void onCreate (Bundle bundle) {
		super.onCreate(bundle);
		setContentView(R.layout.ingredients_layout);
		//ingredients = (ArrayList)getIntent().getSerializableExtra("ingredients");
		//bitmap = (Bitmap)getIntent().getParcelableExtra("bitmap");
		prepareIngredients();  //preparing ExpandableListView children
		TextView user = (TextView)findViewById(R.id.user);
		TextView about = (TextView)findViewById(R.id.about);
		user.setText("Albert Einstein");
		about.setText("Albert Einstein (play /ˈælbərt ˈaɪnstaɪn/; German: [ˈalbɐt ˈaɪnʃtaɪn] ( listen); 14 March 1879 – 18 April 1955) was a German theoretical physicist who developed the theory of general relativity, effecting a revolution in physics. For thisfor his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect.[5] The latter was pivotal in establishing quantum theory within physics.");
	}



The question is the same. How to force ExpandableListView expand in this layout? Now it is not expanded as it has to be. (See the snapshots at the top).