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
- Host: GitHub
- URL: https://github.com/atifsayings/circularimageview
- Owner: AtifSayings
- License: mit
- Created: 2019-04-06T03:38:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T12:17:03.000Z (over 2 years ago)
- Last Synced: 2025-04-30T22:01:44.218Z (about 1 year ago)
- Topics: android-library, circular-imageview
- Language: Java
- Homepage: https://technifysoft.com/
- Size: 2.05 MB
- Stars: 23
- Watchers: 3
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# CircularImageView
[](https://jitpack.io/#AtifSayings/CircularImageView)
[](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);
```