Android中的圆角图片

xiaoxiao2021-02-28  74

添加gradle依赖 compile ‘com.makeramen:roundedimageview:2.2.1’ 在布局中引用(代替要显示的imageView)

<com.makeramen.roundedimageview.RoundedImageView android:id="@+id/rivAutoAccessories" android:layout_width="90dp" android:layout_height="90dp" android:scaleType="centerCrop" app:riv_corner_radius="5dp" android:src="@mipmap/ic_chanpin" /> *其中app:riv_corner_radius="5dp"表示圆角的半径大小*
转载请注明原文地址: https://www.6miu.com/read-43667.html

最新回复(0)