Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/emre1512/CircleProgressBar

A simple library for creating circular progressbars for Android
https://github.com/emre1512/CircleProgressBar

android android-ui circle circular-progress circular-progress-bar progressbar

Last synced: about 1 month ago
JSON representation

A simple library for creating circular progressbars for Android

Awesome Lists containing this project

README

        

# CircleProgressBar

![https://github.com/emre1512/CircleProgressBar](https://img.shields.io/badge/platform-Android-green.svg?style=flat-square)
![https://github.com/emre1512/CircleProgressBar](https://img.shields.io/badge/API-16+-orange.svg?style=flat-square)
![https://www.apache.org/licenses/LICENSE-2.0](https://img.shields.io/badge/licence-Apache%20v2.0-blue.svg?style=flat-square)
![https://github.com/emre1512/CircleProgressBar](https://img.shields.io/badge/version-v1.0.8-ff69b4.svg?style=flat-square)

A simple library for creating circular progressbars for Android.

## Examples

![](https://media.giphy.com/media/l0EoBe4BwiR8MIKXu/giphy.gif)

## Installation

- Get it via gradle: ``` implementation 'com.emredavarci:CircleProgressBar:1.0.8' ```
## Usage

1) Add CircleProgressBar to your layout

```xml

```

2) Get it from your activity/fragment etc.

```java
CircleProgressBar progressBar = (CircleProgressBar) findViewById(R.id.progressBar);
progressBar.setProgress(progress1);
```

You can modify it programmatically if you want

Setters

```java
progressBar.setProgress(progress); // set progress value
progressBar.setMaxValue(100); // set progress max value
progressBar.setStrokeWidthDimension(10); // set stroke width
progressBar.setBackgroundWidth(10); // set progress background width
progressBar.setProgressColor("#FF6FD99D"); // set progress color
progressBar.setBackgroundColor("#FFF9916B"); // set progress backgorund color
progressBar.setText(String.valueOf(progress)); // set progress text
progressBar.setTextColor("#FF6FD99D"); // set text color
progressBar.setSuffix("%"); // set suffix
progressBar.setPrefix(""); // set prefix
```

Getters

```java
progressBar.getProgress(); // get progress value
progressBar.getProgressPercentage(); // get progress percentage
progressBar.getMaxValue(); // get progress max value
progressBar.getStrokeWidthDimension(); // get stroke width
progressBar.getBackgroundWidth(); // get progress background width
progressBar.getProgressColor(); // get progress color
progressBar.getBackgroundColor(); // get progress backgorund color
progressBar.getText(); // get progress text
progressBar.getTextColor(); // get text color
progressBar.getSuffix(); // get suffix
progressBar.getPrefix(); // get prefix
```

## LICENSE

Copyright 2017 M. Emre Davarci

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.