版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/BigBingtang/article/details/79025004
开源项目地址:https://github.com/vinc3m1/RoundedImageView
dependencies {
compile 'com.makeramen:roundedimageview:2.3.0'
}
当做正常的inmageview使用即可
<com.makeramen.roundedimageview.RoundedImageView xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/imageView1" android:src="@drawable/photo1" android:scaleType="fitCenter" app:riv_corner_radius="30dip" app:riv_border_width="2dip" app:riv_border_color="#333333" app:riv_mutate_background="true" app:riv_tile_mode="repeat" app:riv_oval="true" />