Skip to content

Commit 65a891d

Browse files
Merge pull request #3 from agrawalsuneet/dev
Merge Dev to master for 0.1 release
2 parents d9169b9 + 07060db commit 65a891d

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed
0 Bytes
Binary file not shown.

README.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,153 @@
11
# SquareLoadersPack-Android
2+
> Android SquareLoadersPack [![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=5a4e8d2fc4d3e1000114ff6d&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/5a4e8d2fc4d3e1000114ff6d/build/latest?branch=master)
3+
4+
> A replacement of default android material progressbar with various Squares and Rectangles Loaders
5+
6+
7+
### ZipZapLoader
8+
![zipzaploader](https://user-images.githubusercontent.com/12999622/32248451-a304a664-be7d-11e7-8c3e-d149c09da599.gif)
9+
10+
11+
### WaveLoader
12+
![waveloader](https://user-images.githubusercontent.com/12999622/34330606-af613dc8-e916-11e7-9965-a686071002b9.gif)
13+
14+
please check a better quality demo [here](https://youtu.be/v0rr80_kAtw)
15+
16+
Other loaders: [SVGLoader](https://github.com/agrawalsuneet/SVGLoadersPack-Android), [ClockLoader](https://github.com/agrawalsuneet/LoadersPack), [RippleLoader](https://github.com/agrawalsuneet/LoadersPack), [RotatingCircularSticksLoader](https://github.com/agrawalsuneet/LoadersPack), [LinearDotsLoader](https://github.com/agrawalsuneet/DotsLoader), [CircularDotsLoader](https://github.com/agrawalsuneet/DotsLoader), [LazyLoader](https://github.com/agrawalsuneet/DotsLoader), [TashieLoader](https://github.com/agrawalsuneet/DotsLoader), [SlidingLoader](https://github.com/agrawalsuneet/DotsLoader), [RotatingCircularDotsLoader](https://github.com/agrawalsuneet/DotsLoader), [FourFoldLoader](https://github.com/agrawalsuneet/FourFoldLoader)
17+
18+
## How To use
19+
include below dependency in build.gradle of application and compile it
20+
```
21+
compile 'com.agrawalsuneet.androidlibs:squareloaderspack:0.1'
22+
```
23+
24+
### ZipZapLoader
25+
##### Through XML
26+
```
27+
<com.agrawalsuneet.squareloaderspack.loaders.ZipZapLoader
28+
android:id="@+id/zipzap"
29+
android:layout_width="wrap_content"
30+
android:layout_height="wrap_content"
31+
app:zipzap_animDuration="200"
32+
app:zipzap_firstSquareColor="@color/blue"
33+
app:zipzap_forthSquareColor="@color/blue"
34+
app:zipzap_fromScale="0.9"
35+
app:zipzap_secondSquareColor="@color/blue"
36+
app:zipzap_squareLength="40dp"
37+
app:zipzap_startLoadingDefault="true"
38+
app:zipzap_thirdSquareColor="@color/blue"
39+
app:zipzap_toScale="0.7" />
40+
```
41+
##### Through Code
42+
* Kotlin
43+
```
44+
zipzap = ZipZapLoader(this, 120,
45+
ContextCompat.getColor(this, R.color.red),
46+
ContextCompat.getColor(this, R.color.red),
47+
ContextCompat.getColor(this, R.color.red),
48+
ContextCompat.getColor(this, R.color.red),
49+
false).apply {
50+
fromScale = 1.0f
51+
toScale = 0.8f
52+
animationDuration = 1000
53+
}
54+
55+
container.addView(zipzap)
56+
```
57+
58+
* Java
59+
```ZipZapLoader zipZapLoader = new ZipZapLoader(this, 40,
60+
ContextCompat.getColor(this, R.color.red),
61+
ContextCompat.getColor(this, R.color.green),
62+
ContextCompat.getColor(this, R.color.blue),
63+
ContextCompat.getColor(this, R.color.colorAccent),
64+
true);
65+
66+
zipZapLoader.setAnimationDuration(500);
67+
zipZapLoader.setFromScale(1.0f);
68+
zipZapLoader.setToScale(0.8f);
69+
70+
container.addView(zipZapLoader);
71+
```
72+
73+
74+
### WaveLoader
75+
##### Through XML
76+
```
77+
<com.agrawalsuneet.squareloaderspack.loaders.WaveLoader
78+
android:layout_width="wrap_content"
79+
android:layout_height="wrap_content"
80+
app:wave_animDuration="500"
81+
app:wave_delayDuration="100"
82+
app:wave_interpolator="@android:anim/linear_interpolator"
83+
app:wave_isSingleColor="true"
84+
app:wave_noOfDots="10"
85+
app:wave_rectColor="@color/blue"
86+
app:wave_rectDistance="8dp"
87+
app:wave_rectHeight="80dp"
88+
app:wave_rectWidth="16dp" />
89+
90+
91+
<com.agrawalsuneet.squareloaderspack.loaders.WaveLoader
92+
android:layout_width="wrap_content"
93+
android:layout_height="wrap_content"
94+
app:wave_animDuration="500"
95+
app:wave_delayDuration="100"
96+
app:wave_interpolator="@android:anim/linear_interpolator"
97+
app:wave_isSingleColor="false"
98+
app:wave_noOfDots="4"
99+
app:wave_rectColorsArray="@array/waveloader_colorsarray"
100+
app:wave_rectDistance="8dp"
101+
app:wave_rectHeight="80dp"
102+
app:wave_rectWidth="16dp" />
103+
```
104+
##### Through Code
105+
* Kotlin
106+
```
107+
val waveLoader = WaveLoader(this, 8, 40,
108+
200, 20, ContextCompat.getColor(baseContext, R.color.blue))
109+
.apply {
110+
//isSingleColor = false
111+
//rectColorsArray = resources.getIntArray(R.array.waveloader_colorsarray)
112+
interpolator = LinearInterpolator()
113+
animDuration = 1000
114+
delayDuration = 100
115+
}
116+
117+
container.addView(waveLoader)
118+
```
119+
120+
* Java
121+
```
122+
WaveLoader waveLoader = new WaveLoader(this, 8, 40,
123+
200, 20, ContextCompat.getColor(getBaseContext(), R.color.blue));
124+
125+
//waveLoader.setSingleColor(false);
126+
//waveLoader.setRectColorsArray(getResources().getIntArray(R.array.waveloader_colorsarray));
127+
waveLoader.setInterpolator(new LinearInterpolator());
128+
waveLoader.setAnimDuration(1000);
129+
waveLoader.setDelayDuration(100);
130+
131+
132+
container.addView(waveLoader);
133+
```
134+
135+
136+
137+
Please take a 2 mins survey to make this library better [here](https://goo.gl/forms/2Iluao9HV9CAMLx63).
138+
It won't take more than 2 mins I promise :) or feel free to drop an email at agrawalsuneet@gmail.com if face any issue or require any additional functionality in it.
139+
```
140+
Copyright 2017 Suneet Agrawal
141+
142+
Licensed under the Apache License, Version 2.0 (the "License");
143+
you may not use this file except in compliance with the License.
144+
You may obtain a copy of the License at
145+
146+
http://www.apache.org/licenses/LICENSE-2.0
147+
148+
Unless required by applicable law or agreed to in writing, software
149+
distributed under the License is distributed on an "AS IS" BASIS,
150+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
151+
See the License for the specific language governing permissions and
152+
limitations under the License.
153+
```

0 commit comments

Comments
 (0)