How to set a custom font for a spinner?

Posted by AndrewC on Stack Overflow See other posts from Stack Overflow or by AndrewC
Published on 2010-04-19T04:33:19Z Indexed on 2010/04/19 4:43 UTC
Read the original article Hit count: 158

Filed under:

Is there anyway to set a custom font or color for the selected item in a Spinner? For example, I open the spinner and click a priority of "High". I'm my layout containing the spinner, I would like to see the word "High" in red or a custom font.

I can't seem to obtain the textview to make the necessary change. I always obtain a NullPointerException if I typecast the spinner.getSelectedView() to textview and attempt to set the color. any ideas? thanks in advance!

© Stack Overflow or respective owner

Related posts about android