Home > database >  Android: How to remove out-of-place semi-transparent layer and pressed effects?
Android: How to remove out-of-place semi-transparent layer and pressed effects?

Time:06-20

Couple years ago I noticed, that on several buttons (Widget.ImageButton) an extra semi-transparent layer was visible. For longest time I paid no attention to it, but lately on some configurations this semi-transparent layers looks quite bad and out of place. Also, when a button is pressed, the shadow effect doesn't match the dimensions of the button: enter image description here

Since I have a background for focused and pressed states, I dont need any extra stuff over my buttons. From what I've read, this is a default android thing: a button attribute colorControlHighlight, introduced with Lollipop version?

Update: Thanks to Mike M. for suggesting android:stateListAnimator="@null". That solved the issue.

CodePudding user response:

Thanks to Mike M. for suggesting android:stateListAnimator="@null". That solved the issue.

  • Related