Android listview inside relative layout
<p>Have somebody implemented ExpandableListView inside layout? I'm trying to do it and I have problems with height. I want to make it "wrap_content" in order to see fully expanded View when it is expanded. But unfortunately with "wrap_content" parameter I cannot achieve this result. Can somebody help?</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="wrap_content"
android:layout_height="fill_parent" &gt;

&lt;ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

&lt;RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="fill_parent" &gt;

&lt;TextView
    android:id="@+id/user"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_alignParentTop="true"
    android:layout_below="@+id/rl"
    android:layout_toRightOf="@+id/user"
    android:paddingLeft="3dp"
    android:text="Top User"
    android:textColor="#000000"
    android:textSize="22dp" /&gt;

&lt;ExpandableListView
    android:id="@+id/elvMain"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/user"
    android:layout_above="@+id/about" &gt;
&lt;/ExpandableListView&gt;

&lt;TextView
    android:id="@+id/about"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_alignParentBottom="true"
    android:text="Bottom About"
    android:textColor="#6f6f6f"
    android:textSize="24dp"
    android:textStyle="bold" /&gt;
&lt;/RelativeLayout&gt;
&lt;/ScrollView&gt;
    &lt;/RelativeLayout&gt;
</code></pre>

<p>Group row in ExpandableListView:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

  &lt;TextView android:id="@+id/groupname"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:textStyle="bold"
  android:textSize="20dp"
  android:paddingLeft="40dp"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:minHeight="?android:attr/listPreferredItemHeight"
  android:textAppearance="?android:attr/textAppearanceLarge"
  android:background="@drawable/expanded_upper_selector"
  android:gravity="center_vertical"/&gt;
</code></pre>

<p>Child Row: </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="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ingredients_selector"&gt;



&lt;TextView android:id="@+id/ingredients_second_layer_text"
     android:textStyle="bold"
     android:textSize="20dp"
     android:paddingLeft="50dp"
     android:paddingRight="50dp"
     android:textColor="@color/dark_orange"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:textAppearance="?android:attr/textAppearanceLarge"
     android:gravity="center_vertical"/&gt;
</code></pre>

<p></p>
