How to remove border/shadow from lollipop buttons

Lollipop has a nasty little feature called stateListAnimator which handles the elevations on Buttons, which leads to shadows.

Remove the stateListAnimator to get rid of the shadows.

You have got multiple options to do that:

Java:

button.setStateListAnimator(null);

Kotlin:

button.stateListAnimator = null

or in your layout xml’s:

<Button
...
android:stateListAnimator="@null" 
....
/> 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)