问题描述: 在使用Android Material CardView和ConstraintLayout组合时,发现剪裁子视图的效果不起作用。
解决方法:
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
app:cardPreventCornerOverlap="true"属性,确保子视图不会超出CardView的边界:
通过以上几个步骤,可以解决Android Material CardView与ConstraintLayout剪裁子视图不起作用的问题。