Skip to content

MostafaGazar/CustomShapeImageView

Repository files navigation

CustomShapeImageView Demo (Play Store Demo)

Custom shape ImageView using PorterDuffXfermode with paint shapes and SVGs

You can also use this gist https://gist.github.com/MostafaGazar/ee345987fa6c8924d61b if you do not want to add this library project to your codebase.

Android Arsenal Android Weekly

Usage

    <com.meg7.widget.CustomShapeImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:src="@drawable/sample"
        app:shape="circle"
        android:scaleType="centerCrop" />

    <com.meg7.widget.CircleImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:src="@drawable/sample"
        android:scaleType="centerCrop" />

    <com.meg7.widget.RectangleImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:src="@drawable/sample"
        android:scaleType="centerCrop" />

    <com.meg7.widget.SvgImageView
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:src="@drawable/sample"
        app:svg_raw_resource="@raw/shape_star"
        android:scaleType="centerCrop" />

Screenshots

main Libraries used

Developed by

Donations

If you'd like to support this library, you could make a donation here:

Gratipay

About

A library for supporting custom shaped ImageView(s) using SVGs and paint shapes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages