From 1be241eda9db20c68c69f314fd296a57df49b33f Mon Sep 17 00:00:00 2001 From: Artsiom Grintsevich Date: Sun, 13 Sep 2015 21:17:29 +0300 Subject: [PATCH] Update README.md --- README.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2da77d7..3c7e42d 100644 --- a/README.md +++ b/README.md @@ -1 +1,98 @@ -# rubber-loader +# RubberLoaderView + +Android indeterminate loader widget with rubber shape and color animations. + +Click picture below to watch it in action. + +[![Demo app](https://github.com/greenfrvr/rubber-loader/blob/master/screenshots/rubber_loader_recommend.png)](http://www.youtube.com/watch?v=ixr83xFCRQ0) + +## Demo +Downlaod latest demo app from Play Market: + + + Get it on Google Play + + +## Gradle Dependency +[ ![Download](https://api.bintray.com/packages/greenfrvr/maven/rubber-loader/images/download.svg) ](https://bintray.com/greenfrvr/maven/rubber-loader/_latestVersion) + +Easily reference the library in your Android projects using this dependency in your module's build.gradle file: + +```Gradle +dependencies { + compile 'com.github.greenfrvr:rubber-loader:1.0.0@aar' +} +``` +Library available on both jCenter and Maven Central, but in case of any issues (library can't be resolved) use Bintray repo. + +Add repository to your app's build.gradle file: + +```Gradle +repositories { + maven { + url 'https://dl.bintray.com/greenfrvr/maven/' + } +} +``` +This will reference Bintray's Maven repository that contains hashtags widget directly, rather than going through jCenter first. + +## Customizing +All attributes can be defined in layout .xml file or programmatically. Below is a list of available attributes. + +##### Size + +Currently 6 pre-defined sizes are available. + +| Value | Sizes | +| :------------ |:---------------:| +| EXTRA_TINY | 24dp * 12dp | +| TINY | 48dp * 24dp | +| SMALL (default) | 72dp * 36dp | +| NORMAL | 96dp * 48dp | +| MEDIUM | 120dp * 60dp | +| LARGE | 144dp * 72dp | + + +```xml + + + + + + + + +``` + +##### Color + +Define 2 colors wich will form smooth color transition. + +```xml + + +``` +If you set only `loaderPrimeColor`, its value will be set to `loaderExtraColor`, so loader will be filled with solid prime color. + +## Usage + +There are 2 methods which starts `RubberLoaderView` animation: `RubberLoaderView.startLoading()` and `RubberLoaderView.startLoading(long delay)` + +Also you can set different interpolation functions by calling `RubberLoaderView.setInterpolator(TimeInterpolator interpolator)`. It's highly recommended to use following interpolators: `PulseInterpolator`, `PulseInverseInterpolator` and `LinearInterpolator`. + +##License + + Copyright 2015 greenfrvr + + 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.