Android error when adding a spinnerSelector, no resource identifier found

android, android-spinner, eclipse

Solution

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?

Problem

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> ```

Original source

Related problems