5

I want to change the color of the list selector on a spinner item to something other than the ugly, orange default. From what I read, the way to do this is to set the android:spinnerSelector property. However, in Eclipse, I get this error when I try to set the android:spinnerSelector property

error: No resource identifier found for attribute 'spinnerSelector' in package 'android'

Here is my xml file with the spinner in it;

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/darkgray" >
    <Spinner
        android:id="@+id/timespinner"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:spinnerSelector="@drawable/my_selector"
        android:drawSelectorOnTop="true"
        android:prompt="@string/timeprompt" />
</RelativeLayout>
erin
  • 1,130
  • 3
  • 17
  • 28
  • Similar: http://stackoverflow.com/questions/4535109/android-how-to-set-spinner-selector-to-own-image-icon – MrZander Jun 12 '12 at 00:20

1 Answers1

5

The android:spinnerSelector attribute is no longer part of the API. This post may have a workaround: Android: How to set spinner selector to own image/icon?

Community
  • 1
  • 1
David
  • 98
  • 2
  • 7