Button always displays on top in FrameLayout

Update:

in android 21+ after introduction of elevation one can play with elevation attribute of various widgets to put them on top of one another. here is a material design guide for elevation values.

for api < 21 :

This answer

Buttons in Lollipop and higher have a default elevation to them which
causes them to always draw on top. You can change this by overriding
the default StateListAnimator.

Try putting this into your button XML:

android:stateListAnimator="@null"

The FrameLayout should now cover the
button.

Leave a Comment

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