android上面圆角,下面直角 ImageView

android 图片上面圆角,下面直角 ImageView

名称 用法
riv_corner_radius_bottom_left 底部左边圆角大小
riv_corner_radius_bottom_right 底部右边圆角大小
riv_corner_radius_top_left 顶部左边圆角大小
riv_corner_radius_top_right 顶部右边圆角大小
riv_border_color 图片边界颜色
riv_border_width 边界的宽度

目前我项目里面只用到这几个属性,其他属性有待你们自己去研究。
研究透彻之后,可以再次分享一下。

<com.zy.makeramen.roundedimageview.RoundedImageView
        android:id="@+id/imageview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/btn2"
        android:layout_gravity="center_horizontal"
        android:layout_marginLeft="17dp"
        android:layout_marginRight="17dp"
        android:layout_marginTop="18dp"
        android:adjustViewBounds="true"
        android:contentDescription="@null"
        android:gravity="center"
        android:padding="1dp"
        android:scaleType="centerCrop"
        android:src="@mipmap/adv3"
        app:riv_border_color="#e6e6e6"
        app:riv_border_width="10dip"
        app:riv_corner_radius_bottom_left="0dp"
        app:riv_corner_radius_bottom_right="0dp"
        app:riv_corner_radius_top_left="10dp"
        app:riv_corner_radius_top_right="10dp"
        app:riv_mutate_background="false" />

android上面圆角,下面直角 ImageView_第1张图片

DEMO链接

下载之后给好评哦。

你可能感兴趣的:(圆角)