效果

依赖
implementation 'com.google.android.material:material:1.2.1'

<com.google.android.material.imageview.ShapeableImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@mipmap/ic_avatar" />
<!--ShapeableImageView 圆角-->
<style name="RoundedStyle">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">10dp</item>
</style>
属性
关于xml属性,我也做了一个整理,属性不多,只有4个。

这位好友的总结(https://www.jianshu.com/p/19e3c3b77e93)
网友评论