title: Custom font for spinner in android
body: <p>I want to set the custom font for spinner.</p>
  
  <p>Here is my pojo class, which is used as spinner item.</p>
  
  <pre><code>public class City {
  
  private String cityId;
  private String cityName;
  
  public String getCityId() {
      return cityId;
  }
  public void setCityId(String cityId) {
      this.cityId = cityId;
  }
  public String getCityName() {
      return cityName;
  }
  public void setCityName(String cityName) {
      this.cityName = cityName;
  }
  
  @Override
  public String toString() {
      return cityName;
  }
  
  }
  </code></pre>
  
  <p>This is my spinner drop down custom item 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="wrap_content"
      android:background="#FFF" &gt;
  
  &lt;TextView
      android:id="@+id/league_headr_title"
      android:layout_width="fill_parent"
      android:layout_height="30dp"        
      android:textColor="@color/black"
      android:textSize="15dp"        
      android:text="league"
      android:gravity="left|center_vertical"
      android:layout_marginLeft="5dp"
      android:layout_marginRight="5dp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>In my Activity class i am setting the adapter like this.</p>
  
  <pre><code>  if(null != cities &amp;&amp; cities.size() &gt; 0) {
          ArrayAdapter&lt;City&gt; objectLocationsDataAdapter = new ArrayAdapter&lt;City&gt;    (BloodDonationCenterActivity.this, R.layout.spinnerdroapdown_custom_item,   R.id.league_headr_title, cities);
          Spinner_locations.setAdapter(objectLocationsDataAdapter);
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/TtXQt.png" alt="enter image description here"></p>