CustomShapeImageView在github上的项目主页是:https://github.com/MostafaGazar/CustomShapeImageView 如果仅仅是需要获取圆形、心形、花瓣形头像图片(具体看Demo),那么经过Android Custom ...
CustomShapeImageView在github上的项目主页是:https://github.com/MostafaGazar/CustomShapeImageView
如果仅仅是需要获取圆形、心形、花瓣形头像图片(具体看Demo),那么经过Android CustomShapeImageView简单
改不同的形状去demo中找不同的raw
测试
1 <LinearLayout ="http://schemas.android.com/apk/res/android" 2 ="http://schemas.android.com/tools" 3 ="http://schemas.android.com/apk/res-auto" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent" 6 android:orientation="vertical" 7 tools:context="com.example.testcustomshapeimageview.MainActivity" > 8 9 <com.meg7.widget.CustomShapeImageView10 android:layout_width="100dp"11 android:layout_height="100dp"12 android:layout_gravity="center_horizontal"13 android:scaleType="centerCrop"14 android:src='/images/loading.gif' data-original="@drawable/test_girl"15 app:shape="circle" />16 17 <com.meg7.widget.CustomShapeImageView18 android:layout_width="100dp"19 android:layout_height="100dp"20 android:scaleType="centerCrop"21 android:src='/images/loading.gif' data-original="@drawable/test_girl" />22 23 <com.meg7.widget.RectangleImageView24 android:layout_width="100dp"25 android:layout_height="100dp"26 android:layout_gravity="center_horizontal"27 android:scaleType="centerCrop"28 android:src='/images/loading.gif' data-original="@drawable/test_girl" />29 30 <com.meg7.widget.SvgImageView31 android:layout_width="100dp"32 android:layout_height="100dp"33 android:scaleType="centerCrop"34 android:src='/images/loading.gif' data-original="@drawable/test_girl"35 app:svg_raw_resource="@raw/shape_star" />36 37 </LinearLayout>
原标题:对图片进行各种样式裁对图片进行各种样式裁剪:圆形、星形、心形、花瓣形等剪:圆形、星形、心形、花瓣形等
关键词:图片
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。