是否可以为MaterialCardView的每个角半径设置不同的值?如果是这样怎么办?我试过类似下面的代码,但似乎没有任何效果floatradius=getContext().getResources().getDimension(R.dimen.default_corner_radius);ShapePathModelleftShapePathModel=newShapePathModel();leftShapePathModel.setTopLeftCorner(newRoundedCornerTreatment(radius));leftShapePathModel.setTop
我正在尝试测试我在新的GoogleMaterial组件上的技能。但是现在我遇到了MaterialCardView的问题构建过程告诉我ThestyleonthiscomponentrequiresyourappthemetobeTheme.AppCompat[..]atcom.google.android.material.card.MaterialCardView.有了这个线索,我添加了style="@style/Theme.AppCompat"&android:theme="@style/Theme.AppCompat"到MaterialCardView也到我在list中的Activ
新的MaterialCardView上没有涟漪吗?我将CardView与android:clickable="true"和android:foreground="?android:attr/selectableItemBackground"一起使用,效果很好很好,但是使用新的MaterialCardView根本没有涟漪?。其他View等继续工作,但我希望我的卡片可以点击(以涟漪作为反馈)。 最佳答案 这是MaterialCardView的错误。它在创建后覆盖前景。我已经填补了一个错误。如果卡片在无需设置前景的情况下可点击,则应修复它