Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jlmd/AnimatedCircleLoadingView

An animated circle loading view
https://github.com/jlmd/AnimatedCircleLoadingView

Last synced: 11 days ago
JSON representation

An animated circle loading view

Awesome Lists containing this project

README

        

Animated Circle Loading View
=========
[![Download](https://api.bintray.com/packages/jlmd/maven/AnimatedCircleLoadingView/images/download.svg) ](https://bintray.com/jlmd/maven/AnimatedCircleLoadingView/_latestVersion)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AnimatedCircleLoadingView-green.svg?style=flat)](https://android-arsenal.com/details/1/2112)

A determiante/indetermiante loading view animation.
Based on [android-watch-loading-animation](http://www.materialup.com/posts/android-watch-loading-animation) by [Nils Banner](http://www.materialup.com/NilsMedia).

How it looks
----
![gif](./art/indeterminate_ok.gif "animation_ok")

![gif](./art/indeterminate_failure.gif "animation_failure")

Usage
----
Add AnimatedCircleLoadingView to your layout and define mainColor and secondaryColor as custom attributes:

```java

```

##### Determinate
Start determinate:

```java
animatedCircleLoadingView.startDeterminate();
```

Modify percent:
```java
animatedCircleLoadingView.setPercent(10);
```

If percent is 100, the animation ends with success animation.
On error you must call stopFailure() method, then the application ends with failure animation.

##### Indeterminate
Start indeterminate:

```java
animatedCircleLoadingView.startIndeterminate();
```

Stop with success:

```java
animatedCircleLoadingView.stopOk();
```

Stop with failure:

```java
animatedCircleLoadingView.stopFailure();
```

Reset loading:

```java
animatedCircleLoadingView.resetLoading();
```

Gradle dependency
----
Add repository to your build.gradle

```groovy
repositories {
maven {
url "http://dl.bintray.com/jlmd/maven"
}
}
```
Add dependency to your build.gradle
```groovy
compile 'com.github.jlmd:AnimatedCircleLoadingView:1.1.5@aar'
```

Developed by
---
José Luis Martín -

* [LinkedIn](https://www.linkedin.com/in/jlmartind)
* [Twitter](https://twitter.com/jlmartind)

License
----
```
Copyright 2015 José Luis Martín

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.
```