Skip to content
A library for supporting custom shaped ImageView(s) using SVGs and paint shapes
Java
Branch: master
Clone or download
Latest commit b04b108 Feb 6, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper moved code base to gradle. Added jacoco plugin. Tested: added screenshot Jan 19, 2016
library Remove unused files in library and bump version up Feb 4, 2016
samples v1.0.2 Feb 4, 2016
.gitignore .gitignore updated Jan 22, 2016
.travis.yml Move the run scripts to the travis config file Jan 22, 2016
CODE_COVERAGE.md
LICENSE.txt Update and rename LICENSE to LICENSE.txt Jan 29, 2016
README.md Update README.md Feb 6, 2016
Screenshot_2016-01-19-09-17-37.png moved code base to gradle. Added jacoco plugin. Tested: added screenshot Jan 19, 2016
build.gradle fixes in accordance with comments Jan 28, 2016
gradle.properties Remove unused files in library and bump version up Feb 4, 2016
gradlew permission access for travis Jan 22, 2016
gradlew.bat
settings.gradle Rename module named: customshapeimage-library to library Jan 20, 2016

README.md

CustomShapeImageView Demo (Play Store Demo)

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

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.

Build Status Android Arsenal Android Weekly PayPal Donations Coverage Status

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" />

Download

Add the customshapeimageview dependency to your build.gradle file:

Maven Central

dependencies {
    ...
    compile 'com.mostafagazar:customshapeimageview:1.0.4'
    ...
}

Proguard

If you're using proguard for code shrinking and obfuscation, make sure to add the following:

   -keep class com.meg7.widget.** { *; }

Screenshots

main

Libraries used

Developed by

License

Copyright 2013-2016 Mostafa Gazar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Donations

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

PayPal Donation

You can’t perform that action at this time.