文章目录
  • anim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8"?>
<!-- oneshot="false" 循环播放 -->
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false" >

<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_1"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_2"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_3"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_4"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_5"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_6"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_7"
android:gravity="left" >
</clip>
</item>
<item android:duration="60">
<clip
android:clipOrientation="horizontal"
android:drawable="@drawable/loading_8"
android:gravity="left" >
</clip>
</item>

</animation-list>
  • layout
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- android:indeterminate="false" 不明确滚动的数值 -->

<ProgressBar
android:id="@+id/progressBar"
android:layout_width="63dp"
android:layout_height="63dp"
android:layout_gravity="center"
android:indeterminate="false"
android:indeterminateDrawable="@anim/progress_bar_anim"
android:scaleType="centerInside" />

</FrameLayout>

例子

文章目录