I just tried this example. I saved that code in res/color/hover.xml but I always get this error message and Eclipse won't compile my project with this xml. What am I doing wrong?
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:color="#ffff0000"/> <!-- pressed -->
<item android:state_focused="true"
android:color="#ff0000ff"/> <!-- focused -->
<item android:color="#ff000000"/> <!-- default -->
</selector> <!-- Error Message -->
Error parsing XML: not well-formed (invalid token) hover.xml /MmAndroid/res/color line 8 Android AAPT Problem
The only thing I might not have done is following. I don't know how to do that:
compiled resource datatype: Resource pointer to a ColorStateList.