Button 一直显示在View的最上层,无法被其他View覆盖

问题

Button一直显示在当前view的最上层,无法被其他view覆盖。

解决方法

  • XML
android:stateListAnimator="@null"
  • Java
 button.setStateListAnimator(null);

此问题从5.0开始,stateListAnimator是用来实现Material Design 效果。

猜你喜欢

转载自blog.csdn.net/qin_shi/article/details/80394828