Android error adding spinnerSelector, resource id not found

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

Error: Resource ID not found for spinnerSelector attribute in 'Android' package

Here is my xml file with an expander 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>
+5
source share
1 answer

The attribute is android:spinnerSelectorno longer part of the API. This post may have a workaround: Android: how to set the spinner switch for your own image / icon?

+5

All Articles