title: Set max height for listview
body: <p>Something really stupid, but I want to set a maximum height for my listview and I don't seem to find something that works. Some talk of setting a maxheight to the listview, but I am not able to find this option? 
  I now have </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:padding="40dp" &gt;
  
      &lt;ListView
          android:id="@+id/lvSwitch"
          android:layout_width="fill_parent"
          android:layout_height="120dp" &gt;
      &lt;/ListView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>But when there is only one item in the list, it is still has a height of 120dp, which isn't necessary then of course, it just cannot exceed that height...</p>