2
2
3
3
MaterialRefreshLayout v1.3.0
4
4
==================================
5
- This is a drop-down refresh control, it is more beautiful and powerful than SwipeRefreshLayout.It is easy to use and support API LEVEL >= 11 . I hope you like it !
5
+ 这是一个下拉刷新控件,它比SwipeRefreshLayout更漂亮和强大,使用也比较简单。支持android 3.0 以上。希望你喜欢,呵呵。
6
6
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/11/095859kp297mjmj2php5pm.jpg )
7
7
8
- Now let me talk about MaterialRefreshLayout of function
8
+ 现在让我来说说他有多牛逼的功能吧,其实也就那样......
9
9
---------------------------------------------------------------------------
10
- (1)It can be done like SwipeRefreshLayout drop-down refresh effect,this is a kind of intrusive drop-down refresh.
10
+ (1)如果你喜欢官方的刷新效果,没问题,它也可以做到,这是一种侵入式的下拉刷新
11
11
12
12
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/10/145037bwzigoghgrk414hw.gif )
13
13
14
-
15
- (2)However, there are some people who are not as like invasive drop-down refresh, so, it also has a non-invasive drop-down refresh function.
14
+ (2)然而,有些人并不喜欢侵入刷新,或者说,需求需要的是非侵入刷新,没问题,它同样可以做到......
16
15
17
16
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/10/145142fp1z3fp0hkx0apg3.gif )
18
17
19
-
20
- (3)If you feel too drab, we can add a background of the wave shape.
18
+ (3)如果你觉得上面的效果太单调了,好的,我们可以加个波浪形状的背景,就像下图所示
21
19
22
20
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/10/144913t3beqg3eics1xwwr.gif )
23
21
24
22
25
- (4)If you want to make waveform covering on content, it can be done .
23
+ (4)如果这时候你想要侵入式的刷新,又要有波浪背景,也就是所有效果覆盖在内容之上的话,没问题,它还是可以做到的,呵呵..... .
26
24
27
25
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/10/144736ah8xaeamz155zq54.gif )
28
26
29
27
30
- (5)if you like the most simple effect,You can see the image below .
28
+ (5)现在如果你又在想,还是最简单的效果最好的话,没问题,你可以看看下图所示的效果..... .
31
29
32
30
![ ] ( http://www.apkbus.com/data/attachment/forum/201509/10/145326ttfgttgm3gg68tgf.gif )
33
31
34
- (6)MaterialRefreshLayout Can pull load more, drop-down refresh automatically, pull up refresh automatically .
32
+ (6)听从了很多人的意见,新加了上拉加载更多,自动下拉刷新,自动上拉刷新等效果..... .
35
33
36
- (7)There are a lot of functions, you can see the source code ...
34
+ (7)具体你看源码吧,呵呵... ...
37
35
38
- Usage
36
+ 用法
39
37
=================================================
40
38
41
- Add dependency.
39
+ AS添加依赖库,这样就不用导入整个library库,Eclipse的用户导入library库,慢慢折腾吧!(因为我觉得如果不是环境不允许你用as的话,还是放弃eclipse吧,毕竟github上很多优秀的项目都是用as的,好吧我多嘴了...)
42
40
43
41
```
44
42
dependencies {
45
43
compile 'com.cjj.materialrefeshlayout:library:1.3.0'
46
44
}
47
45
```
48
46
49
- Use it in your layout xml.
47
+ 在你的layout xml.添加下面的代码
50
48
``` xml
51
49
<com .cjj.MaterialRefreshLayout
52
50
xmlns : android =" http://schemas.android.com/apk/res/android"
@@ -59,35 +57,35 @@ Use it in your layout xml.
59
57
60
58
</com .cjj.MaterialRefreshLayout>
61
59
```
62
- Get instance and use it .
60
+ 实例化它并设置监听,onrefresh是必须实现的,其他都是方法可选,为了代码可读性而设计..... .
63
61
``` java
64
62
materialRefreshLayout = (MaterialRefreshLayout ) findViewById(R . id. .. );
65
63
materialRefreshLayout. setMaterialRefreshListener(new MaterialRefreshListener () {
66
64
@Override
67
65
public void onRefresh (final MaterialRefreshLayout materialRefreshLayout ) {
68
- // refreshing ...
66
+ // 下拉刷新 ...
69
67
}
70
68
71
69
@Override
72
70
public void onRefreshLoadMore (MaterialRefreshLayout materialRefreshLayout ) {
73
- // load more refreshing ...
71
+ // 上拉刷新 ...
74
72
}
75
73
}
76
74
77
- // refresh complete
75
+ // 结束下拉刷新...
78
76
materialRefreshLayout. finishRefresh();
79
77
80
- // load more refresh complete
78
+ // 结束上拉刷新...
81
79
materialRefreshLayout. finishRefreshLoadMore();
82
80
```
83
81
84
- Config
82
+ 配置
85
83
============ =
86
- (1 )if you like SwipeRefreshLayout drop - down refresh effect
84
+ (1 )如果你喜欢官方的刷新效果
87
85
88
86
! [](http: // www.apkbus.com/data/attachment/forum/201509/10/171338y8ufsxjrs7k2rxu3.jpg)
89
87
90
- In xml, use attributes.
88
+ 在xml中, 设置以下属性
91
89
```xml
92
90
< com.cjj. MaterialRefreshLayout
93
91
xmlns: android= " http://schemas.android.com/apk/res/android"
@@ -99,17 +97,17 @@ In xml, use attributes.
99
97
app: wave_show= " false"
100
98
>
101
99
```
102
- In java code.
100
+ 在代码中是这样的:
103
101
```java
104
102
materialRefreshLayout. setIsOverLay(true );
105
103
materialRefreshLayout. setWaveShow(false );
106
104
```
107
105
108
- (2 )if you like non - invasive drop - down refresh effect
106
+ (2 )如果你喜欢非侵入刷新
109
107
110
108
! [](http: // www.apkbus.com/data/attachment/forum/201509/10/171336i3x75d7x4tadxezt.jpg)
111
109
112
- In xml, use attributes.
110
+ 在xml中, 设置以下属性
113
111
```xml
114
112
< com.cjj. MaterialRefreshLayout
115
113
xmlns: android= " http://schemas.android.com/apk/res/android"
@@ -121,16 +119,16 @@ In xml, use attributes.
121
119
app: wave_show= " false"
122
120
>
123
121
```
124
- In java code.
122
+ 在代码中是这样的:
125
123
```java
126
124
materialRefreshLayout. setIsOverLay(false );
127
125
materialRefreshLayout. setWaveShow(false );
128
126
```
129
- (3 )if you like add a background of the wave shape.
127
+ (3 )如果你觉得上面的效果太单调了,加个波浪形状的背景,就像下图所示
130
128
131
129
! [](http: // www.apkbus.com/data/attachment/forum/201509/10/171339lvhk3n3h4wkgkgdc.jpg)
132
130
133
- In xml, use attributes.
131
+ 在xml中, 设置以下属性
134
132
```xml
135
133
< com.cjj. MaterialRefreshLayout
136
134
xmlns: android= " http://schemas.android.com/apk/res/android"
@@ -144,13 +142,13 @@ In xml, use attributes.
144
142
app: wave_height_type= " normal" (higher)
145
143
>
146
144
```
147
- In java code.
145
+ 在java代码中是这样的:
148
146
```java
149
147
materialRefreshLayout. setWaveColor(0xffffffff );
150
148
materialRefreshLayout. setIsOverLay(false );
151
149
materialRefreshLayout. setWaveShow(true );
152
150
```
153
- (4 )If you want to make waveform covering on content
151
+ (4 )你想要侵入式的刷新,又要有波浪背景,也就是所有效果覆盖在内容之上
154
152
155
153
! [](http: // www.apkbus.com/data/attachment/forum/201509/10/171334xtd0xphsag4ww4gs.jpg)
156
154
@@ -168,14 +166,14 @@ materialRefreshLayout.setWaveShow(true);
168
166
app: wave_height_type= " higher"
169
167
>
170
168
```
171
- In java code.
169
+ 在java代码中是这样的:
172
170
```java
173
171
materialRefreshLayout. setWaveColor(0xf90fffff );
174
172
materialRefreshLayout. setIsOverLay(true );
175
173
materialRefreshLayout. setWaveShow(true );
176
174
```
177
175
178
- (5 )other . ..
176
+ (5 )其他 ...
179
177
180
178
! [](http: // www.apkbus.com/data/attachment/forum/201509/10/171341xrgamch93mad4pcg.jpg)
181
179
@@ -194,7 +192,7 @@ materialRefreshLayout.setWaveShow(true);
194
192
>
195
193
```
196
194
197
- (6 )add pull up loading more features . ..
195
+ (6 )上拉加载更多 ...
198
196
199
197
! [](http: // www.apkbus.com/data/attachment/forum/201509/16/180340xypx76ypefpdzfrf.png)
200
198
@@ -209,14 +207,14 @@ materialRefreshLayout.setWaveShow(true);
209
207
>
210
208
211
209
```
212
- In java code.
210
+ 在java代码中是这样的:
213
211
```java
214
212
materialRefreshLayout. setLoadMore(true );
215
213
```
216
214
217
- (7 ) It can drop - down refresh automatically and pull up refresh automatically .
215
+ (7 )自动下拉刷新,自动上拉刷新 .
218
216
219
- In java code.
217
+ 在java代码中是这样的:
220
218
```java
221
219
materialRefreshLayout. autoRefresh();// drop-down refresh automatically
222
220
materialRefreshLayout. autoRefreshLoadMore();// pull up refresh automatically
@@ -225,29 +223,33 @@ In java code.
225
223
226
224
V 1.3 . 0
227
225
===========================
228
- add drop - down refresh automatically and pull up refresh automatically
226
+ 添加自动下拉刷新,自动上拉刷新 .
229
227
230
228
V 1.2 . 1
231
229
===========================
232
- add pull up loading more features
230
+ 添加上拉加载更多 ...
233
231
234
232
V 1.2 . 0
235
233
===========================
236
- add progress size type ,you can use xml attr to set app : progress_size_type= " normal" (big) and fix some bugs
234
+ 添加了可设置加载圆圈的大小,有两种模式可以选择,在xml配置属性app : progress_size_type= " normal" (big)和修复一些bug
237
235
238
236
V 1.1 . 0
239
237
===========================
240
- a new way to perform animations with support library, the library size and the amount of libraries decreased .
238
+ 一个全新的动画展示效果,减小了库的大小,很不幸的从支持api 8 升到 api 11 不过,也没多少人用2 . x . x的手机了 ..... .
241
239
240
+ V 1.0 . 0
241
+ ================================================================== =
242
+ 支持api 8 ,第一版本,啊哈哈......
242
243
243
- AT LAST
244
+ 最后
244
245
================================================================== =
245
- If the MaterialRefreshLayout has failed to meet to your requirements, you can go to the [BeautifulRefreshLayout ](https: // github.com/android-cjj/BeautifulRefreshLayout) to find what you need.
246
+ 如果这些都没能满足你的需求的话,没问题,你可以去看看[BeautifulRefreshLayout ](https: // github.com/android-cjj/BeautifulRefreshLayout),我想,你可以找到一个专属于你的人...错了...是下拉刷新......
247
+
246
248
247
- [About me ](http: // android-cjj.github.io/)
249
+ [关于我 ](http: // android-cjj.github.io/)
248
250
------------------------------------
249
251
250
- Thanks
252
+ 感谢
251
253
============================================
252
254
253
255
[lsjwzh/ MaterialLoadingProgressBar ](https: // github.com/lsjwzh/MaterialLoadingProgressBar)
0 commit comments