title: Listview same height as content
body: <p>I used custom listview . Content comes from dynamic I want to same listview height same as content.</p>
  
  <p>I used wrap_content but this does not help If <strong>I remove scrollview then its work</strong></p>
  
  <p>Code. <strong>"The vertically scrolling ScrollView should not contain another vertically scrolling widget (ListView)"</strong></p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/background_img"
      android:scrollbars="none" &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
  &lt;ListView
              android:id="@+id/lstsemtrack"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
          android:divider="#f2e4e4"
          android:dividerHeight="1dip"
               &gt;
          &lt;/ListView&gt;
  </code></pre>
  
  <p>Item list</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:padding="10dip"
      android:scrollbars="none" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:weightSum="4" &gt;
  
          &lt;TextView
              android:id="@+id/txtBiology"
              style="@style/sem_rowtext"
              android:layout_width="0dip"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:layout_marginRight="5dip"
              android:layout_weight="1"
              android:text="Biology" /&gt;
  
          &lt;TextView
              android:id="@+id/txtClass"
              style="@style/sem_rowtext"
              android:layout_width="0dip"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Biology - 101" /&gt;
  
          &lt;TextView
              android:id="@+id/txtGrade"
              style="@style/sem_rowtext"
              android:layout_width="0dip"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Grade" /&gt;
  
          &lt;TextView
              android:id="@+id/txtGrade"
              style="@style/sem_rowtext"
              android:layout_width="0dip"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Remove" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>output like below I want same as content no scrollview</p>
  
  <p><img src="https://i.stack.imgur.com/MeogY.png" alt="enter image description here"></p>