I try to switch the background of Buttons if they are pressed. I build a Selector like the answer suggested here: Standard Android Button with a different color
finally I want to put GradientDrawables inside, but for debug purposes I only want to set a color, to see it is working. Here is my Selector
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/red"/>
<item
android:state_focused="true"
android:drawable="@color/white"/>
<item
android:state_pressed="true"
android:drawable="@color/white"/>
</selector>
unfortunatly this doesn't work. I set the Selector as Background from my Button, and only see them in red color. What Am I doing wrong (Build Target 2.1)