Error404 Error404 - 27 days ago 10
Android Question

Change color of the drop down arrow of Spinner in XML

As I wrote in my question, I want to change the color of the drop down arrow (the default arrow, not a custom arrow or something like that) of a

in XML, but the problem is that I couldn't find anything to make reference to it from the

Is it possible? If yes, how can I change the color?

Thanks in advance.


There are two ways to achieve that.

First Way (Simpler):

In your xml, make sure your spinner has an id. In this example, let's call the id "spinner".

In your code, add the following in your onCreate():

Spinner spinner = (Spinner) findViewById(;
spinner.getBackground().setColorFilter(getResources().getColor(, PorterDuff.Mode.SRC_ATOP);

where red is your defined color in your colors.xml in the values folder.


Spinner spinner = (Spinner) findViewById(;
spinner.getBackground().setColorFilter(Color.parseColor("#AA7744"), PorterDuff.Mode.SRC_ATOP);

Second Way:

You can use this online tool:

It is really great. It will generate custom drawables for you with your preferred color. Make sure you choose the theme as holo (or anything else you want) and select spinner.