title: Getting a View under a ListView, but not at bottom of screen
body: <p>Trying to get a layout the way I want it. It contains a ListView and a LinearLayout which contains two TextViews.</p>
  
  <p>The problem is with the ListView taking up the entire screen if it has more items then fits in one screen. In that case it doesn't show the View underneath it.</p>
  
  <p>If I set the ListView to layout_weight=1 with layout_height=0dp then the View underneath it goes all the way to the bottom because the ListView fills the screen if not enough items are on it.</p>
  
  <p>So how do I get a ListView with a View directly underneath it, so without setting it to the bottom of the screen?</p>
  
  <p>As requested (but if the listview doesn't fit on one screen you don't get to see the view below listview):</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"&gt;
  
      &lt;ListView
          android:id="@+id/list_bookings"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/expected_cost_linearLayout"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="@dimen/padding_regular"&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:focusable="false"
              android:text="@string/expected_cost_label"
              android:textStyle="bold" /&gt;
  
          &lt;TextView
              android:id="@+id/expected_cost_textView"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="..."
              android:focusable="false" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>