I want to programmatically remove the grey background in ImageButton. I tried many method of removing it like -
imageButton.setBackgroundDrawable(null);
but on implementing them, I don't get the ripple effect on the ImageButton on touch. (No highlighting on touch).
Is there any way to remove the background but preserve the ripple effect or highlight.
If android:background="?attr/selectableItemBackground"
this works than I believe this answer should solve your problem:
https://stackoverflow.com/a/28087443/2534007
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