Displaying Spinner with data items with different typeface
<p>In my app I am displaying a spinner that contains different font styles e.g. if the font name is US DNealian than it should get displayed with the same typeface as well. I know how to set typeface of particular view by view.setTypeface(tf) but I am using an array arr_fonts to fill ArrayList and that ArrayList will fill the adapter for spinner. Below is the code snippet I am using.</p>

<p>-> String array for filling ArrayList</p>

<pre><code>private String arr_fonts[] = {"US: D'Nealian", "US: D'Nealian Cursive", "US: Zaner-Bloser", "US: Zaner-Bloser Cursive",
            "Aus: NSW/ACT", "Aus: NSW/ACT Cursive", "Aus: Qld Beginners", "Aus: Qld Cursive", "Aus: SA Beginners", "Aus: SA Cursive",
            "Aus: Tas Beginners", "Aus: Tas Cursive", "Aus: Vic/NT/WA", "Aus: Vic/NT/WA Cursive", "WA Sassoon", "WA Sassoon Infant",
            "NZ Beginners","UK Beginners", "UK Cursive", "Century Gothic (HWT)"};
</code></pre>

<p>->Arraylist for filling adapter</p>

<pre><code>ARRLIST_FONTS = new ArrayList&lt;String&gt;(Arrays.asList(arr_fonts));
</code></pre>

<p>private void set_font_name_Adapter() {</p>

<pre><code>    sp_fonts = (Spinner)findViewById(R.id.spFont);

     font_name_Adapter= new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,ARRLIST_FONTS)
              {
            public View getView(int position, View convertView,ViewGroup parent) {
                    View v = super.getView(position, convertView, parent);
                    ((TextView) v).setTextSize(12);
                    ((TextView) v).setTextColor(Color.WHITE);
                    return v;
          }
</code></pre>

<p>};</p>

<pre><code>        font_name_Adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        sp_fonts.setAdapter(font_name_Adapter);

        sp_fonts.setOnItemSelectedListener(new OnItemSelectedListener() {

            @Override
            public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,
                    int arg2, long arg3) {

                font = ARRLIST_FONTS.get(arg2);

                }


                System.out.println("Selected item is ................."+font);

            }

            @Override
            public void onNothingSelected(AdapterView&lt;?&gt; arg0) {


            }
        });

}
</code></pre>

<p>I have .ttf for all the font names. But I dont know how to change typeface of each item in spinner individually.</p>

<p>Can anyone suggest any thing or any link or good tutorial for the same.</p>

<p>Thanks.</p>

<p><img src="http://i.stack.imgur.com/ODAAn.png" alt="enter image description here"></p>
