title: How to customise the TextView inside a Spinner?
body: <p>I have a Spinner with an ArrayAdapter that feeds Values into it. The layout for this views looks something like this:</p>
  
  <pre><code>        &lt;TextView
             android:text="Household Income: "
             android:layout_width="wrap_content"
             android:layout_height="fill_parent"
             android:gravity="center_vertical" /&gt;
  
          &lt;Spinner
             android:id="@+id/incomespinner"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:padding="2dip"  /&gt;
  </code></pre>
  
  <p>The Problem is that the text is to long for the view and the result is a very very ugly spinner. As can be seen in the screenshot: </p>
  
  <p><a href="https://i.stack.imgur.com/EvS8V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EvS8V.png" alt="alt text"></a><br>
  <sub>(source: <a href="http://janusz.de/~janusz/spinner.png" rel="nofollow noreferrer">janusz at janusz.de</a>)</sub>  </p>
  
  <p>I tried to pass the Id of my own TextView into the Adapter but everytime the spinner should be shown I get an Exception that the Id I supplied is not valid:</p>
  
  <pre><code>04-26 17:38:39.695: ERROR/AndroidRuntime(4276): android.content.res.Resources$NotFoundException: Resource ID #0x7f09003a type #0x12 is not valid
  </code></pre>
  
  <p>Where do I have to define the TextView? In a separate xml file? With a surrounding viewgroup? </p>
  
  <p>It would help me a lot if I could see an example of the adapter initialization and the textview definition?</p>