hoang8f / android-flat-button

FButton - a flat button library for Android
Apache License 2.0
1.4k stars 325 forks source link

Button animation does not always work correctly #13

Open LeslieAerts opened 10 years ago

LeslieAerts commented 10 years ago

When pushing down the button, it slightly shifts upward from a perspective. Expected behaviour would be the button to be anchored at the height of the shadow and shift downward as if being pushed in.

jaysondc commented 7 years ago

I'm also experiencing this same error. It looks like if the button height is set to wrap_content, the height physically shrinks when the button is pressed, causing everything to shift.

To avoid this you must set the height manually. You can also try programmatically adding an upper margin to the button only while it's pressed.