I have an issue with my ImageButton not changing state. When I click, or rather touch, the button it stays as the same image. Here is the XML I am using as a selector.
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:state_pressed="false"
android:drawable="@drawable/pushed" />
<item
android:state_focused="true"
android:state_pressed="true"
android:drawable="@drawable/pushed" />
<item
android:state_focused="false"
android:state_pressed="true"
android:drawable="@drawable/pushed" />
<item
android:drawable="@drawable/default" />
</selector>
I call this selector from my main.xml as
android:background="@drawable/imagechoice"
imagechoice.xml is the file with the selector
I don't understand why this is not working, unless I have to have some java code, but everything I've seen said this should work.