vinc3m1 / RoundedImageView

A fast ImageView that supports rounded corners, ovals, and circles.
Other
6.44k stars 1.25k forks source link

LinearLayout使用layout_weight属性的bug #265

Closed SmithZhenHua closed 3 years ago

SmithZhenHua commented 3 years ago

<LinearLayout android:layout_marginTop="15dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_width="match_parent" android:layout_height="108dp" android:orientation="horizontal">

    <com.makeramen.roundedimageview.RoundedImageView
        android:layout_height="match_parent"
        app:riv_corner_radius_bottom_left="7dp"
        app:riv_corner_radius_top_left="7dp"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:src="@mipmap/saber4" />

    <com.makeramen.roundedimageview.RoundedImageView
        android:layout_marginLeft="3dp"
        android:layout_marginRight="3dp"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="match_parent"
        android:src="@mipmap/saber4"/>

    <com.makeramen.roundedimageview.RoundedImageView
        android:layout_width="0dp"
        android:layout_height="match_parent"
        app:riv_corner_radius_top_right="7dp"
        app:riv_corner_radius_bottom_right="7dp"
        android:src="@mipmap/saber4"
        android:layout_weight="1"/>

</LinearLayout>

aaaaaaa

第一个图片我设置了左上和左下的圆角,但右上也有圆角且图片错位

SmithZhenHua commented 3 years ago

可以通过设置scaleType属性来解决