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,998
  • 3
  • 30
  • 41
Tuan
  • 2,033
  • 1
  • 9
  • 16

4 Answers4

1

Try this my friend

android:popupBackground="#000000"
Ratilal Chopda
  • 4,162
  • 4
  • 18
  • 31
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
  • 4
  • 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,580
  • 10
  • 26