Skip to content

Custom shape ImageView using PorterDuffXfermode with paint shapes and SVGs

Notifications You must be signed in to change notification settings

azzits/CustomShapeImageView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 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.

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

Bitdeli Badge

About

Custom shape ImageView using PorterDuffXfermode with paint shapes and SVGs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published