Don't bring button to foreground on click
The default button has animations that run when it's touched and uses a StateListAnimator
to do this. The animations that elevate the button changes the android:elevation
and android:translateZ
properties of the view.
To prevent this from animating, simply stop animations from running on this View by setting:
android:stateListAnimator="@null"