How to customize style from spinner dropdown CHOICES?

10,108
adapter.setDropDownViewResource(R.layout.custom_spinner);

custom_spinner.xml -

<?xml version="1.0" encoding="utf-8"?>
<TextView
  xmlns:android="http://schemas.android.com/apk/res/android"
  parent="@android:style/TextAppearance_Widget_DropDownItem"
  android:textColor="#988767"
>
</TextView>
Share:
10,108
Paulo Barros
Author by

Paulo Barros

Updated on June 04, 2022

Comments

  • Paulo Barros
    Paulo Barros almost 2 years

    I can customize the background of the selected option on a spinner dropdown using:

    <item name="android:spinnerStyle">@style/customSpinner</item>
    <style name="customSpinner" parent="@android:style/Widget.Holo.Light.Spinner">
    <item name="android:textColor">#000000</item>
    <item name="android:background">#000000</item>
    </style>
    

    But I can't manage to change the background and textcolor of the list of options that the dropdown has. How do I achieve that?