title: Android: Custom spinner size problems
body: <p>I've made a custom spinner but the sizing isn't exactly what I want it to be. The spinner become far to large to get the spacing in the list that I need. I want to be able to size the rows of the spinner independently of the size of the spinner button. I want the spinner to be thin and then I want the section rows to be spaced generously. (See image at the bottom):</p>
  
  <p>Currently the xml for the rows of the spinner is this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
      &lt;TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:padding="5dip"&gt;
          &lt;ImageView android:layout_width="32sp" android:src="@drawable/icon"
              android:id="@+id/spinnerimage" android:layout_height="32sp" /&gt;
          &lt;TextView android:textSize="22sp" android:textStyle="bold" android:textColor="#000"
              android:layout_width="fill_parent" android:id="@+id/category"
              android:layout_height="fill_parent" android:paddingLeft="5sp" /&gt;
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>I wanted to use a relative layout but the table layout gave me slightly better spacing. If I try to make the height it will cut off the text and icons in the rows. The spinner in my main.xml is:</p>
  
  <pre><code>        &lt;Spinner android:id="@+id/catspinner"
          android:layout_marginLeft="25dip" android:layout_marginRight="25dip"
          android:layout_width="fill_parent" android:layout_centerHorizontal="true"
          android:layout_height="wrap_content" android:prompt="@string/prompt"
          android:background="@drawable/yellow_btn"
          android:layout_centerVertical="true" android:drawSelectorOnTop="true" /&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ORVek.png" alt="enter image description here"></p>
  
  <p>I would like to have the spinner the sizing to be the same as the standard android spinner (on right.) Mine is currently reversed the spinner is to big and the rows spacing is too small.</p>
  
  <p>Any ideas?? </p>