Possible Duplicate:
ImageButton doesn’t highlight on click with Transparent background
I have made a custom bar where I have buttons with the attribute
android:background="@android:color/transparent"
My problem is that when I click on the buttons the click effect does not trigger(in this case the button should become and blue and fade back in its original color -transparent here-).
How do I enable it or just simulate the effect? Any ideas?
Seems transparent is a bad option. Better have
style="?android:attr/borderlessButtonStyle"
same effect, without needing to go through creating another custom xmls
You need to use selector
check: http://developer.android.com/guide/topics/ui/controls/button.html under "Custom background"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With