An open API service indexing awesome lists of open source software.

https://github.com/atifsayings/circularimageview

Library to show image in Circular Shape
https://github.com/atifsayings/circularimageview

android-library circular-imageview

Last synced: 8 months ago
JSON representation

Library to show image in Circular Shape

Awesome Lists containing this project

README

          

# CircularImageView
[![](https://jitpack.io/v/AtifSayings/CircularImageView.svg)](https://jitpack.io/#AtifSayings/CircularImageView)
[![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/AtifSayings/CircularImageView/blob/master/license.txt)

CircularImageView to show your images in Circular Shape.
* min SDK 16 (Android Jellybean 4.1)
* written in Java

A lightweight and fully customizable library to show your images in Circular Form

## Screenshots




## Installation

Add this into your root build.gradle file:

```java
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

OR. In Newer Versions of Android Studio settings.gradle file:

```java
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
}
```

OR. In Newer Versions of Android Studio with Kotlin DSL settings.gradle.kts file:

```java
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
jcenter()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
jcenter()
}
}
```

Add the dependency to your module build.gradle (Groovy):
```java
dependencies {
implementation 'com.github.AtifSayings:CircularImageView:1.0.2'
}
```
OR. Add the dependency to your module build.gradle (Kotlin):
```java
dependencies {
implementation("com.github.AtifSayings:CircularImageView:1.0.2")
}
```
## Usage
### Using XML Layout
```xml

```
### Programatically
```java
CircularImageView circularImageView = findViewById(R.id.imageView);
circularImageView.setImageResource(R.drawable.profile_pic);
circularImageView.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
circularImageView.setBorderWidth(5);
circularImageView.setBorderWidth(10);
circularImageView.setBorderColor(getResources().getColor(R.color.colorPrimaryDark));
circularImageView.setShadowGravity(CircularImageView.ShadowGravity.BOTTOM);
circularImageView.setShadowRadius(9);
```