Skip to content

Custom shape ImageView using PorterDuffXfermode with paint shapes and SVGs

Notifications You must be signed in to change notification settings

Insthyd/CustomShapeImageView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

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

Custom shape ImageView using PorterDuffXfermode with paint shapes and SVGs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%