CircularImageView

Custom view for circular images in Android while maintaining the best draw performance

  • Owner: Pkmmte/CircularImageView
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

CircularImageView

Custom view for circular images in Android while maintaining the best draw performance

Imgur

Usage

To make a circular ImageView, add this CircularImageView library to your project and add CircularImageView in your layout XML.
You can also grab it via Gradle:

compile 'com.pkmmte.view:circularimageview:1.1'

or Maven:

<dependency>
		<groupId>com.pkmmte.view</groupId>
		<artifactId>circularimageview</artifactId>
		<version>1.1</version>
</dependency>

###XML

    <com.pkmmte.view.CircularImageView
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:src="@drawable/image"
        app:border="true"
        app:border_color="#EEEEEE"
        app:border_width="4dp"
        app:shadow="true" />

You may use the following properties in your XML to customize your CircularImageView.

#####Properties:

  • app:border (boolean) -> default false
  • app:border_color (color) -> default WHITE
  • app:border_width (dimension) -> default 2dp
  • app:selector (boolean) -> default false
  • app:selector_color (color) -> default TRANSPARENT
  • app:selector_stroke_color (color) -> default BLUE
  • app:selector_stroke_width (dimension) -> default 2dp
  • app:shadow (boolean) -> default false

###JAVA

    CircularImageView circularImageView = (CircularImageView)findViewById(R.id.yourCircularImageView);
    circularImageView.setBorderColor(getResources().getColor(R.color.GrayLight));
    circularImageView.setBorderWidth(10);
    circularImageView.setSelectorColor(getResources().getColor(R.color.BlueLightTransparent));
    circularImageView.setSelectorStrokeColor(getResources().getColor(R.color.BlueDark));
    circularImageView.setSelectorStrokeWidth(10);
    circularImageView.addShadow();

Developed By

Pkmmte Xeleon - www.pkmmte.com

License

The MIT License (MIT)

Copyright (c) 2014 Pkmmte Xeleon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Based on a work at https://github.com/lopspower/CircularImageView.

Main metrics

Overview
Name With OwnerPkmmte/CircularImageView
Primary LanguageJava
Program languageJava (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-07-10 04:21:48
Pushed At2017-08-16 11:43:24
Last Commit At2015-01-16 02:02:35
Release Count0
用户参与
Stargazers Count1.2k
Watchers Count47
Fork Count232
Commits Count41
Has Issues Enabled
Issues Count57
Issue Open Count44
Pull Requests Count7
Pull Requests Open Count3
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private