The precedent answer did not work for me. Here is the code I found somewhere else:
<selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/refresh_pushed" android:state_pressed="true" /> <item android:drawable="@drawable/refresh" /> </selector>
You can also add state for objects with focus by adding a line and using:
Android: state_focused = "true"
Loic O.
source share