Skip to content

Commit a109223

Browse files
committed
Refactor AVLoadingIndicatorView init
1 parent 67a9d41 commit a109223

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+958
-932
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add dependencies in build.gradle.
3030
Add the AVLoadingIndicatorView to your layout:
3131
```java
3232
<com.wang.avi.AVLoadingIndicatorView
33-
android:id="@+id/avloadingIndicatorView"
33+
android:id="@+id/avi"
3434
android:layout_width="wrap_content" //or your custom size
3535
android:layout_height="wrap_content" //or your custom size
3636
android:visibility="visible" //visible or gone

app-debug.apk

-1.06 MB
Binary file not shown.

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ android {
66

77
defaultConfig {
88
applicationId "com.wang.avi.sample"
9-
minSdkVersion 9
9+
minSdkVersion 11
1010
targetSdkVersion 23
1111
versionCode 2
1212
versionName "1.0.1"

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:label="@string/app_name"
99
android:theme="@style/AppTheme" >
1010
<activity
11-
android:name=".MainActivity"
11+
android:name=".SampleActivity"
1212
android:label="@string/app_name" >
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />

app/src/main/java/com/wang/avi/sample/AVLoadingIndicatorDialog.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/src/main/java/com/wang/avi/sample/MainActivity.java

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.wang.avi.sample;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.support.v7.app.AppCompatActivity;
6+
7+
/**
8+
* Created by Jack Wang on 2016/8/5.
9+
*/
10+
11+
public class SampleActivity extends AppCompatActivity{
12+
13+
@Override
14+
protected void onCreate(@Nullable Bundle savedInstanceState) {
15+
super.onCreate(savedInstanceState);
16+
setContentView(R.layout.activity_loading);
17+
18+
}
19+
20+
}

app/src/main/res/layout/activity_loading.xml

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
66
android:orientation="vertical"
77
xmlns:app="http://schemas.android.com/apk/res-auto"
88
>
9-
10-
<android.support.v7.widget.Toolbar
11-
android:id="@+id/toolbar"
12-
android:layout_width="match_parent"
13-
android:layout_height="?attr/actionBarSize"
14-
android:layout_alignParentTop="true"
15-
android:background="?attr/colorPrimary"
16-
app:title="AVLoadingIndicatorView"
17-
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
18-
/>
199
<ScrollView
2010
android:layout_width="match_parent"
2111
android:layout_height="match_parent"
@@ -45,7 +35,7 @@
4535
<com.wang.avi.AVLoadingIndicatorView
4636
android:layout_width="wrap_content"
4737
android:layout_height="wrap_content"
48-
app:indicator="BallPulse"
38+
app:indicatorName="BallPulseIndicator"
4939
/>
5040

5141
</LinearLayout>
@@ -59,7 +49,7 @@
5949
<com.wang.avi.AVLoadingIndicatorView
6050
android:layout_width="wrap_content"
6151
android:layout_height="wrap_content"
62-
app:indicator="BallGridPulse"
52+
app:indicatorName="BallGridPulseIndicator"
6353
/>
6454
</LinearLayout>
6555

@@ -73,7 +63,7 @@
7363
<com.wang.avi.AVLoadingIndicatorView
7464
android:layout_width="wrap_content"
7565
android:layout_height="wrap_content"
76-
app:indicator="BallClipRotate"
66+
app:indicatorName="BallClipRotateIndicator"
7767
/>
7868

7969
</LinearLayout>
@@ -87,7 +77,7 @@
8777
<com.wang.avi.AVLoadingIndicatorView
8878
android:layout_width="wrap_content"
8979
android:layout_height="wrap_content"
90-
app:indicator="BallClipRotatePulse"
80+
app:indicatorName="BallClipRotatePulseIndicator"
9181
/>
9282

9383
</LinearLayout>
@@ -109,7 +99,7 @@
10999
<com.wang.avi.AVLoadingIndicatorView
110100
android:layout_width="wrap_content"
111101
android:layout_height="wrap_content"
112-
app:indicator="SquareSpin"
102+
app:indicatorName="SquareSpinIndicator"
113103
/>
114104

115105
</LinearLayout>
@@ -123,7 +113,7 @@
123113
<com.wang.avi.AVLoadingIndicatorView
124114
android:layout_width="wrap_content"
125115
android:layout_height="wrap_content"
126-
app:indicator="BallClipRotateMultiple"
116+
app:indicatorName="BallClipRotateMultipleIndicator"
127117
/>
128118

129119
</LinearLayout>
@@ -138,7 +128,7 @@
138128
<com.wang.avi.AVLoadingIndicatorView
139129
android:layout_width="wrap_content"
140130
android:layout_height="wrap_content"
141-
app:indicator="BallPulseRise"
131+
app:indicatorName="BallPulseRiseIndicator"
142132
/>
143133

144134
</LinearLayout>
@@ -152,7 +142,7 @@
152142
<com.wang.avi.AVLoadingIndicatorView
153143
android:layout_width="wrap_content"
154144
android:layout_height="wrap_content"
155-
app:indicator="BallRotate"
145+
app:indicatorName="BallRotateIndicator"
156146
/>
157147

158148
</LinearLayout>
@@ -174,7 +164,7 @@
174164
<com.wang.avi.AVLoadingIndicatorView
175165
android:layout_width="wrap_content"
176166
android:layout_height="wrap_content"
177-
app:indicator="CubeTransition"
167+
app:indicatorName="CubeTransitionIndicator"
178168
/>
179169

180170
</LinearLayout>
@@ -188,7 +178,7 @@
188178
<com.wang.avi.AVLoadingIndicatorView
189179
android:layout_width="wrap_content"
190180
android:layout_height="wrap_content"
191-
app:indicator="BallZigZag"
181+
app:indicatorName="BallZigZagIndicator"
192182
/>
193183

194184
</LinearLayout>
@@ -203,7 +193,7 @@
203193
<com.wang.avi.AVLoadingIndicatorView
204194
android:layout_width="wrap_content"
205195
android:layout_height="wrap_content"
206-
app:indicator="BallZigZagDeflect"
196+
app:indicatorName="BallZigZagDeflectIndicator"
207197
/>
208198

209199
</LinearLayout>
@@ -217,7 +207,7 @@
217207
<com.wang.avi.AVLoadingIndicatorView
218208
android:layout_width="wrap_content"
219209
android:layout_height="wrap_content"
220-
app:indicator="BallTrianglePath"
210+
app:indicatorName="BallTrianglePathIndicator"
221211
/>
222212

223213
</LinearLayout>
@@ -239,7 +229,7 @@
239229
<com.wang.avi.AVLoadingIndicatorView
240230
android:layout_width="wrap_content"
241231
android:layout_height="wrap_content"
242-
app:indicator="BallScale"
232+
app:indicatorName="BallScaleIndicator"
243233
/>
244234

245235
</LinearLayout>
@@ -253,7 +243,7 @@
253243
<com.wang.avi.AVLoadingIndicatorView
254244
android:layout_width="wrap_content"
255245
android:layout_height="wrap_content"
256-
app:indicator="LineScale"
246+
app:indicatorName="LineScaleIndicator"
257247
/>
258248
</LinearLayout>
259249

@@ -267,7 +257,7 @@
267257
<com.wang.avi.AVLoadingIndicatorView
268258
android:layout_width="wrap_content"
269259
android:layout_height="wrap_content"
270-
app:indicator="LineScaleParty"
260+
app:indicatorName="LineScalePartyIndicator"
271261
/>
272262

273263
</LinearLayout>
@@ -281,7 +271,7 @@
281271
<com.wang.avi.AVLoadingIndicatorView
282272
android:layout_width="wrap_content"
283273
android:layout_height="wrap_content"
284-
app:indicator="BallScaleMultiple"
274+
app:indicatorName="BallScaleMultipleIndicator"
285275
/>
286276

287277
</LinearLayout>
@@ -303,7 +293,7 @@
303293
<com.wang.avi.AVLoadingIndicatorView
304294
android:layout_width="wrap_content"
305295
android:layout_height="wrap_content"
306-
app:indicator="BallPulseSync"
296+
app:indicatorName="BallPulseSyncIndicator"
307297
/>
308298

309299
</LinearLayout>
@@ -317,7 +307,7 @@
317307
<com.wang.avi.AVLoadingIndicatorView
318308
android:layout_width="wrap_content"
319309
android:layout_height="wrap_content"
320-
app:indicator="BallBeat"
310+
app:indicatorName="BallBeatIndicator"
321311
/>
322312
</LinearLayout>
323313

@@ -331,7 +321,7 @@
331321
<com.wang.avi.AVLoadingIndicatorView
332322
android:layout_width="wrap_content"
333323
android:layout_height="wrap_content"
334-
app:indicator="LineScalePulseOut"
324+
app:indicatorName="LineScalePulseOutIndicator"
335325
/>
336326

337327
</LinearLayout>
@@ -345,7 +335,7 @@
345335
<com.wang.avi.AVLoadingIndicatorView
346336
android:layout_width="wrap_content"
347337
android:layout_height="wrap_content"
348-
app:indicator="LineScalePulseOutRapid"
338+
app:indicatorName="LineScalePulseOutRapidIndicator"
349339
/>
350340

351341
</LinearLayout>
@@ -367,7 +357,7 @@
367357
<com.wang.avi.AVLoadingIndicatorView
368358
android:layout_width="wrap_content"
369359
android:layout_height="wrap_content"
370-
app:indicator="BallScaleRipple"
360+
app:indicatorName="BallScaleRippleIndicator"
371361
/>
372362

373363
</LinearLayout>
@@ -381,7 +371,7 @@
381371
<com.wang.avi.AVLoadingIndicatorView
382372
android:layout_width="wrap_content"
383373
android:layout_height="wrap_content"
384-
app:indicator="BallScaleRippleMultiple"
374+
app:indicatorName="BallScaleRippleMultipleIndicator"
385375
/>
386376
</LinearLayout>
387377

@@ -395,7 +385,7 @@
395385
<com.wang.avi.AVLoadingIndicatorView
396386
android:layout_width="wrap_content"
397387
android:layout_height="wrap_content"
398-
app:indicator="BallSpinFadeLoader"
388+
app:indicatorName="BallSpinFadeLoaderIndicator"
399389
/>
400390

401391
</LinearLayout>
@@ -409,7 +399,7 @@
409399
<com.wang.avi.AVLoadingIndicatorView
410400
android:layout_width="wrap_content"
411401
android:layout_height="wrap_content"
412-
app:indicator="LineSpinFadeLoader"
402+
app:indicatorName="LineSpinFadeLoaderIndicator"
413403
/>
414404

415405
</LinearLayout>
@@ -431,7 +421,7 @@
431421
<com.wang.avi.AVLoadingIndicatorView
432422
android:layout_width="wrap_content"
433423
android:layout_height="wrap_content"
434-
app:indicator="TriangleSkewSpin"
424+
app:indicatorName="TriangleSkewSpinIndicator"
435425
/>
436426

437427
</LinearLayout>
@@ -445,7 +435,7 @@
445435
<com.wang.avi.AVLoadingIndicatorView
446436
android:layout_width="wrap_content"
447437
android:layout_height="wrap_content"
448-
app:indicator="Pacman"
438+
app:indicatorName="PacmanIndicator"
449439
/>
450440
</LinearLayout>
451441

@@ -459,7 +449,7 @@
459449
<com.wang.avi.AVLoadingIndicatorView
460450
android:layout_width="wrap_content"
461451
android:layout_height="wrap_content"
462-
app:indicator="BallGridBeat"
452+
app:indicatorName="BallGridBeatIndicator"
463453
/>
464454

465455
</LinearLayout>
@@ -473,7 +463,7 @@
473463
<com.wang.avi.AVLoadingIndicatorView
474464
android:layout_width="wrap_content"
475465
android:layout_height="wrap_content"
476-
app:indicator="SemiCircleSpin"
466+
app:indicatorName="SemiCircleSpinIndicator"
477467
/>
478468

479469
</LinearLayout>

0 commit comments

Comments
 (0)