title: Graphical issue with spinner control in Android
body: <p>My first (old) Android app (<a href="https://market.android.com/details?id=com.synformation.android.forzadroid" rel="nofollow">Suspension Calculator</a>) is showing a problem I cannot find a solution for: the spinner control on <em>some</em> spinners is showing transparent lines in unwanted places. The pattern is this: every other spinner is having this problem, starting with the first spinner control. So while spinners 2, 4, 6, ... have no unwanted lines, spinners 1, 3, 5, ... have them.</p>
  
  <p>The following image (link below) shows the spinner in selected state first, and in unselected state after the red separator. In selected state, the transparent line is at baseline height for the entire control <em>except</em> some places where the button text can be. It's a little different in unselected state.</p>
  
  <p>I cannot provide an image directly:</p>
  
  <blockquote>
    <p>[...] as a spam prevention mechanism, new
    users aren't allowed to post images.</p>
  </blockquote>
  
  <p>But I can give you a link:</p>
  
  <p><a href="http://blog.synformation.com/android/spinner-problem.png" rel="nofollow">Screenshot that illustrated the graphical spinner problem</a></p>
  
  <p>The XML file under <code>res/layout</code> looks like this:</p>
  
  <pre><code>&lt;ScrollView ...&gt;
      &lt;TableLayout ...&gt;
          &lt;TableRow&gt;
              &lt;TextView
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:text="@string/units"
                  android:gravity="center_vertical"
                  android:paddingRight="5dp"
              /&gt;
              &lt;Spinner
                  android:id="@+id/unit_spinner"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:drawSelectorOnTop="true"
              /&gt;
          &lt;/TableRow&gt;
          ...
      &lt;/TableLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>I see this problem at least since Froyo (Android 2.2). In earlier versions (at least Android 1.6), it wasn't there. It's not there in the Graphical Layout editor in Eclipse, but I see it running the application on the phone and in the emulator - that's at least consistent and hints to a problem I'm causing by not doing things right ;-).</p>