@@ -29,7 +29,7 @@ Easily reference the library in your Android projects using this dependency in y
2929
3030``` Gradle
3131dependencies {
32- compile 'com.github.greenfrvr:rubber-loader:1.0 .0@aar'
32+ compile 'com.github.greenfrvr:rubber-loader:1.1 .0@aar'
3333}
3434```
3535Library available on both jCenter and Maven Central, but in case of any issues (library can't be resolved) use Bintray repo.
@@ -48,18 +48,30 @@ This will reference Bintray's Maven repository that contains hashtags widget dir
4848## Customizing
4949All attributes can be defined in layout .xml file or programmatically. Below is a list of available attributes.
5050
51+ ##### Loader modes
52+
53+ Different loader modes has different animation behaviour. Default mode is ** normal** .
54+
55+ ``` xml
56+ <attr name =" loaderMode" format =" enum" >
57+ <enum name =" normal" value =" 0" />
58+ <enum name =" equal" value =" 1" />
59+ <enum name =" centered" value =" 2" />
60+ </attr >
61+ ```
62+
5163##### Size
5264
53- Currently 6 pre-defined sizes are available.
65+ Currently 6 pre-defined sizes are available. Loader with ripple need more space.
5466
55- | Value | Sizes |
56- | :------------ | :---------------:|
57- | EXTRA_TINY | 24dp * 12dp |
58- | TINY | 48dp * 24dp |
59- | SMALL (default) | 72dp * 36dp |
60- | NORMAL | 96dp * 48dp |
61- | MEDIUM | 120dp * 60dp |
62- | LARGE | 144dp * 72dp |
67+ | Value | Sizes | Sizes with ripples |
68+ | :------------ | :---------------:| :------: |
69+ | EXTRA_TINY | 27dp * 12dp | 36dp * 36dp |
70+ | TINY | 54dp * 24dp | 72dp * 72dp |
71+ | SMALL (default) | 81dp * 36dp | 108dp * 108dp |
72+ | NORMAL | 108dp * 48dp | 144dp * 144dp |
73+ | MEDIUM | 135dp * 60dp | 180dp * 180dp |
74+ | LARGE | 162dp * 72dp | 216dp * 216dp |
6375
6476
6577``` xml
@@ -80,9 +92,23 @@ Define 2 colors wich will form smooth color transition.
8092``` xml
8193 <attr name =" loaderPrimeColor" format =" color|reference" />
8294 <attr name =" loaderExtraColor" format =" color|reference" />
95+ <attr name =" rippleColor" format =" color|reference" />
8396```
8497If you set only ` loaderPrimeColor ` , its value will be set to ` loaderExtraColor ` , so loader will be filled with solid prime color.
8598
99+ ##### Ripples
100+
101+ Select ` rippleMode ` to add ripple animations effect. Default mode is ` none ` . Loaders with ripple will have bigger sizes than without them.
102+
103+ ``` xml
104+ <attr name =" rippleMode" format =" enum" >
105+ <enum name =" none" value =" 0" />
106+ <enum name =" normal" value =" 1" />
107+ <enum name =" reverse" value =" 2" />
108+ <enum name =" cycle" value =" 3" />
109+ </attr >
110+ ```
111+
86112## Usage
87113
88114There are 2 methods which starts ` RubberLoaderView ` animation: ` RubberLoaderView.startLoading() ` and ` RubberLoaderView.startLoading(long delay) `
0 commit comments