I define my button's states with
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<gradient
android:endColor="@color/orange_light"
android:startColor="@color/orange"
android:angle="270" />
<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:right="10dp" />
</shape>
</item>
<item android:state_focused="true" >
<shape>
<gradient
android:endColor="@color/orange_light"
android:startColor="@color/orange"
android:angle="270" />
<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:right="10dp" />
</shape>
</item>
<item>
<shape>
<gradient
android:endColor="@color/grey_light"
android:startColor="@color/grey"
android:angle="270" />
<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:right="10dp" />
</shape>
</item>
</selector>
and set this as my button's background.
When I press it it change colors properly, but I'd like it to keep the 'pressed' color once released (to show which button is active).
How can I do this? requestFocus() does not work...
Thanks