title: Limit number of rows of listview
body: <p>I am developing an application that needs to pair with other devices through Bluetooth. I was having trouble in order to show the list of paired devices in correct manner. I had also viewed the example in the android api (Bluetooth Chat), but i was having the same problem.</p>
  
  <p>The list of paired devices are to big and then hides a search button that are at the bottom of the list.</p>
  
  <p>My xml code is very the same of the example:</p>
  
  <pre><code>&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    &gt;
    &lt;TextView android:id="@+id/listpaired_devices"
          android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/title_paired_devices"
      android:visibility="gone"
      android:background="#666"
      android:textColor="#fff"
      android:paddingLeft="5dp" 
    /&gt; 
    &lt;ListView android:id="@+id/paired_devices"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:stackFromBottom="true"
      android:layout_weight="1"
    /&gt;
    &lt;TextView android:id="@+id/list_new_devices"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/title_other_devices"
      android:visibility="gone"
    /&gt; 
    &lt;ListView android:id="@+id/new_devices"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:stackFromBottom="true"
      android:layout_weight="2" 
    /&gt;  
    &lt;Button android:id="@+id/btscan"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/btscan"
    /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>But and i can't show the search button at the bottom.
  Here my screen:
  <a href="http://imageshack.us/photo/my-images/23/problemfs.png/" rel="nofollow">My Screen</a></p>
  
  <p>You could see a bit of the button at the bottom of the dialog window.</p>
  
  <p>It's possible to limit the number of rows shown at the listview ? Can anyone tell me how i can fix this problem</p>