title: Android: How to change TypeFace in spinner populated by ArrayAdapter.createFromResource?
body: <p>I like to change my spinners typeface to "monospace".</p>
  
  <p>Right now I'm populating my spinner this way:</p>
  
  <pre><code>resourceId = this.getResources().getIdentifier(country+"_umsatzsteuer_view", "array", this.getPackageName());
  resourceId2 = this.getResources().getIdentifier(country+"_umsatzsteuer_werte", "array", this.getPackageName());
  
  
  final ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
            this, resourceId, android.R.layout.simple_spinner_item );
          adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item );
  spinner_steuer = (Spinner) findViewById(R.id.spinner_steuer);
  spinner_steuer.setAdapter(adapter);
  </code></pre>
  
  <p>My question is, how I can set the typeface of every item from this spinner to "monospace"?</p>
  
  <p>UPDATED CODE:</p>
  
  <p>Adaptercode:</p>
  
  <pre><code>public class YourItemAdapter extends ArrayAdapter&lt;String&gt; {
      public YourItemAdapter(Context _context, int _resource,
              List&lt;String&gt; _items) {
  
          super(_context, _resource, _items);
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent){
          //You can use the new tf here.
          View v =super.getDropDownView(position, convertView, parent);
          ((TextView) v).setTypeface(Typeface.MONOSPACE, Typeface.BOLD);
          return v;
          }
      }
  </code></pre>
  
  <p>Spinnerloading:</p>
  
  <pre><code>            final ArrayAdapter&lt;CharSequence&gt; adapter = YourItemAdapter.createFromResource(
                        this, resourceId, android.R.layout.simple_spinner_item );
                      adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item );
  
      spinner_steuer = (Spinner) findViewById(R.id.spinner_steuer);
      spinner_steuer.setAdapter(adapter);
  </code></pre>
  
  <p>Thanks in advance!
  MSeiz5</p>