How To Change Color Of Spinner Selected Item In Android

It was a pain to have to look for a way to change the color of the Spinner widget’s selected item because the color displayed in the screen is dark.

Using Theme.AppCompat.Light.DarkActionBar, the problem is that the Spinner blends in with the ActionBar’s dark background (black in my case).

I did not want to have to create another layout just for the Spinner widget alone and use it as the actionLayout attribute value of the MenuItem.

So the only solution left is to do it programmatically.

Here is the code snippet:

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *