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

https://github.com/v-adhithyan/prettyseekbar

Simple, minimalistic circular seekbar library with animation for android, inspired from analog clock.
https://github.com/v-adhithyan/prettyseekbar

Last synced: about 1 month ago
JSON representation

Simple, minimalistic circular seekbar library with animation for android, inspired from analog clock.

Awesome Lists containing this project

README

        

PrettySeekBar


Android library



Simple, minimalistic circular seekbar library with animation for android, inspired from analog clock. It can be used for stopwatches and audio players. Free and Open source.

# Demo

![sample screenshot](https://raw.githubusercontent.com/v-adhithyan/PrettySeekBar/master/screen-capture/demo.gif)

# Usage
This library is currently available only via jitpack. To add this library to your project, do the following changes:

Step 1: Add it in your root build.gradle at the end of repositories.
```groovy
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```

Step 2: Add the dependency.
```groovy
dependencies{
...
compile 'com.github.v-adhithyan:PrettySeekBar:v1.0'
}
```

Step 3: Sync project with gradle files.

Step 4: In your layout file,add a xml namespace () for the PrettySeekBar within the top parent.

```xml
xmlns:pretty="http://schemas.android.com/apk/res-auto"
```

Now add the following code:
```xml

```
Voila, PrettySeekBar is now added to your project.

##Operations

You can avail the following functions of PrettySeeBar activity java file.

* Set maxProgress in seconds. (Default is 100)
```java
prettySeekBar.setMaxProgress(seconds);
```

* The clock starts zooming in and out, once added to layout. To animate clock hand, call the following:
```java
prettySeekBar.makeProgress();
```

* To pause moving clock hand, call:
```java
prettySeekBar.pauseProgress();
```

* Implement an listener and override onProgressChanged method to get the current progress seeked by user.
```java
prettySeekBar.setOnPrettySeekBarChangeListener(new PrettySeekBar.OnPrettySeekBarChangeListener() {
@Override
public void onProgressChanged(PrettySeekBar prettySeekBar, int progress, boolean touched) {
//your logic
}

@Override
public void onStartTrackingTouch(PrettySeekBar seekBar) {
//currently the logic added here is not supported.
}

@Override
public void onStopTrackingTouch(PrettySeekBar seekBar) {
//currently the logic added here is not supported.
}
});
```
# Author
* Adhithyan V

# License

This project is released under MIT license. See [license file](https://github.com/v-adhithyan/PrettySeekBar/blob/master/LICENSE.md) for more info.