I have designed my own graphics composed of two images for an Image Button - one focused and one unfocused. I have the following button in the layout and XML file for it in drawable folder:
<ImageButton
android:id="@+id/btnPlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/btn_play" />
.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/ic_playfocused" />
<item android:state_focused="true" android:drawable="@drawable/ic_playfocused" />
<item android:state_selected = "true" android:drawable = "@drawable/ic_playfocused" />
<item android:drawable = "@drawable/ic_playdefault" />
</selector>
When I click the button, it switches the two images properly, but the problem is that I also see a partially transparent blue rectangle that normally highlights button clicks. How can I get rid of this blue highlight so that when my button is clicked, the only thing that happens is the switch between the two images?
Thank you in advance :)