贴上代码:
<com.makeramen.roundedimageview.RoundedImageView android:id="@+id/iv_face" android:layout_width="70dp" android:layout_height="70dp" android:src="@drawable/test_picture" app:riv_oval="true"/>
![](https://img.haomeiwen.com/i12678187/0cc75289e62c9f27.png)
增加属性,android:scaleType="centerCrop"
![](https://img.haomeiwen.com/i12678187/f5f9f2bd63f7268b.png)
这过程也就是说,要先通过scaleType来调整(裁剪)原图,然后再进行切圆角、加边框处理,这里用centerCrop才符合要求
附:compile 'com.makeramen:roundedimageview:2.3.0'
网友评论