在使用PorterDuffXfermode的Android中,如何绘制心形ImageView
Zas12357386
・1 分钟阅读
使用PorterDuffXfermode和SVGs自定义形状ImageView,
库 https://github.com/MostafaGazar/CustomShapeImageView
要点 https://gist.github.com/MostafaGazar/ee345987fa6c8924d61b
用法:
<com.meg7.widget.SvgImageView
android:layout_width= "64dp"
android:layout_height= "64dp"
android:src= "@drawable/sample"
app:svg_raw_resource= "@raw/shape_heart"
android:scaleType= "centerCrop" />