异形图片 - sinothk/ImageHelper GitHub Wiki

xml

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView1"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginTop="10dp"
        android:scaleType="centerCrop"
        android:src="@drawable/photo7"
        app:riv_border_color="#F00"
        app:riv_border_width="2dp"
        app:riv_corner_radius="10dp"
        app:riv_mutate_background="false"
        app:riv_oval="true" />

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView2"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginTop="10dp"
        android:scaleType="center"
        android:src="@drawable/photo7"
        app:riv_border_color="#F00"
        app:riv_border_width="2dp"
        app:riv_corner_radius_bottom_left="20dp"
        app:riv_corner_radius_bottom_right="20dp"
        app:riv_corner_radius_top_left="20dp"
        app:riv_corner_radius_top_right="20dp"
        app:riv_mutate_background="false"
        app:riv_oval="false" />

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView3"
        android:layout_width="200dp"
        android:layout_height="100dp"
        android:layout_marginTop="10dp"
        android:scaleType="centerCrop"
        android:src="@drawable/photo7"
        app:riv_border_color="#F00"
        app:riv_border_width="2dp"
        app:riv_corner_radius_bottom_left="20dp"
        app:riv_corner_radius_top_right="20dp"
        app:riv_mutate_background="false"
        app:riv_oval="false" />

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView4"
        android:layout_width="200dp"
        android:layout_height="100dp"
        android:layout_margin="10dp"
        android:background="@color/colorAccent"
        android:padding="10dip"
        android:scaleType="center"
        android:src="@drawable/photo7"
        app:riv_border_color="@color/colorPrimaryDark"
        app:riv_border_width="3dip"
        app:riv_corner_radius="30dip"
        app:riv_mutate_background="true"
        app:riv_oval="true" />

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView5"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:adjustViewBounds="true"
        android:background="@color/colorAccent"
        android:padding="10dip"
        android:scaleType="centerCrop"
        android:src="@drawable/photo7"
        app:riv_border_color="@color/colorPrimaryDark"
        app:riv_border_width="3dip"
        app:riv_corner_radius="30dip"
        app:riv_mutate_background="true"
        app:riv_oval="false" />

    <com.sinothk.helper.image.widget.roundedImageView.RoundedImageView
        android:id="@+id/imageView6"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:adjustViewBounds="true"
        android:background="@color/colorAccent"
        android:padding="10dip"
        android:scaleType="centerCrop"
        android:src="@drawable/photo7"
        app:riv_border_color="@color/colorPrimaryDark"
        app:riv_border_width="3dip"
        app:riv_corner_radius="30dip"
        app:riv_mutate_background="true"
        app:riv_oval="false" />