1

enter image description here

Does anyone know how I can change the background color and the item color on the spinner?

    <Spinner
        android:id="@+id/spinner_categoryselect"
        android:background="@drawable/side_nav_bar"
        android:background="#CCC"
        android:layout_weight="4"
        android:layout_width="0dp"
        android:layout_height="wrap_content"></Spinner>

Thanks in advance.

dev.bmax
  • 8,093
  • 3
  • 29
  • 39
Tuan
  • 1,149
  • 6
  • 8

4 Answers4

1

Try this my friend

android:popupBackground="#000000"
Ratilal Chopda
  • 4,113
  • 4
  • 17
  • 29
1
<Spinner android:id="@+id/spinner"
     ...
     android:background="#YOUR_COLOR"/>
0

You can simply use the following attribute in your <spinner> tag

android:background="#000000"

If you want to change the background color for drop-down menu then

android:popupBackground="#000000"
Kvaibhav01
  • 391
  • 1
  • 7
  • 14
0

You can simply change popup background color:

Use android:popupBackground on the Spinner in your XML or setPopupBackgroundResource(int) in code.

Check here Dupllicate question

Maraj Hussain
  • 1,496
  • 9
  • 26