依赖:
dependencies {
...
implementation 'de.hdodenhof:circleimageview:3.1.0'
}
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="96dp"
android:layout_height="96dp"
android:src="@drawable/profile"
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"/>
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"
这两个属性是添加边框的,设置边框2个宽度,设置颜色为某个颜色
看下面效果图:

257



被折叠的 条评论
为什么被折叠?



