-1

Here image of spinner . i want change spinner default drop down icon color.

Here Image of spinner

Rizwan Ahmed
  • 1,272
  • 2
  • 16
  • 27

3 Answers3

1

create a new XML file in the drawable folder(background.xml)

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true" 
          android:state_pressed="false" 
          android:drawable="@drawable/myspinner_select" />
    <item android:state_focused="true" 
          android:state_pressed="true"
          android:drawable="@drawable/myspinner_press" />
    <item android:state_focused="false" 
          android:state_pressed="true"
      android:drawable="@drawable/myspinner_press" />
    <item android:drawable="@drawable/myspinner_normal" />
</selector>

associate this Spinner drawable in your XML layout file

<Spinner android:id="@+id/spinner_chemical"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:drawSelectorOnTop="true"
         android:background="@drawable/background"/>  

this may help you..

Taryn
  • 242,637
  • 56
  • 362
  • 405
Pragnesh Ghoda シ
  • 8,318
  • 3
  • 25
  • 40
0

see this site is very helpful

http://android-holo-colors.com/

MilapTank
  • 9,988
  • 7
  • 38
  • 53
0

You can set the spinners background color in xml like this:

android:background="YOUR_HEX_COLOR_CODE"

and if you use the drop down menu with you spinner you can set its background color like this:

android:popupBackground="YOUR_HEX_COLOR_CODE"

Reference : https://stackoverflow.com/a/13550512/3492139

Community
  • 1
  • 1
ngrashia
  • 9,869
  • 5
  • 43
  • 58