title: Spinner height expands to bottom of screen
body: <p>I have a fragment with a spinner in a layout. The spinner xml is:</p>
  
  <pre><code>        &lt;Spinner
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/spCategory"
              android:spinnerMode="dialog"
              android:dropDownWidth="match_parent"
              android:prompt="@string/label_category_select" /&gt;
  </code></pre>
  
  <p>Populating the spinner is done like this:</p>
  
  <pre><code>    List&lt;Category&gt; categories = categoryRepository.getAll();
      CategoryAdapter adapter = new CategoryAdapter(this.getActivity(), categories);
      adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
  
      spCategory= (Spinner)view.findViewById(R.id.spCategory);
      spCategory.setAdapter(adapter);
  </code></pre>
  
  <p><code>CategoryAdapter</code> extends ArrayAdapter and I use ViewHolder pattern. The adapter uses this custom layout:</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="match_parent"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/tvSpinnerRowId"
          android:visibility="gone"&gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/tvSpinnerRowName"&gt;
      &lt;/TextView&gt;  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The problem is that the spinner height in the layout extends to the bottom of the screen.</p>
  
  <p>What am I missing?</p>