角为专题

只设置视图的一个或几个角为圆角

可以使用 CAShapeLayer *styleLayer = [CAShapeLayerlayer]; UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRoundedRect:cardStyleView.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRig

CardView设置任意角为圆角

注意:material:1.1.0以上版本在RadiusCardView节点下一定要添加 android:theme=“@style/Theme.MaterialComponents”,不然会报错,另外,由于是重写自MaterialCardView,所以一定要导入material包: implementation 'com.google.android.material:material:1.