Giter Site home page Giter Site logo

nikhil-z / customshapeimageview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mostafagazar/customshapeimageview

0.0 2.0 0.0 1.21 MB

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

Home Page: http://mostafagazar.github.io/CustomShapeImageView

License: Apache License 2.0

Java 100.00%

customshapeimageview's Introduction

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

customshapeimageview's People

Contributors

mostafagazar avatar cyburs avatar ayman-abdelghany avatar bitdeli-chef avatar

Watchers

James Cloos avatar Nikhil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.