File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ allprojects {
27
27
28
28
```
29
29
dependencies {
30
- compile 'com.github.Bakumon:StatusLayoutManager:1.0.0 '
30
+ compile 'com.github.Bakumon:StatusLayoutManager:1.0.1 '
31
31
}
32
32
```
33
33
@@ -40,10 +40,15 @@ dependencies {
40
40
``` java
41
41
statusLayoutManager = new StatusLayoutManager .Builder (recyclerView)
42
42
// 设置重试事件监听器
43
- .setOnRetryListener (new OnRetryListener () {
43
+ .setOnStatusChildClickListener (new DefaultOnStatusChildClickListener () {
44
44
@Override
45
- public void onClick (int state , View view ) {
46
- // 处理点击事件,一般重新加载数据
45
+ public void onEmptyChildClick (View view ) {
46
+
47
+ }
48
+
49
+ @Override
50
+ public void onErrorChildClick (View view ) {
51
+
47
52
}
48
53
})
49
54
.build();
@@ -167,4 +172,23 @@ statusLayoutManager = new StatusLayoutManager.Builder(recyclerView)
167
172
}
168
173
})
169
174
.build();
175
+ ```
176
+
177
+ 也可以使用 ` OnStatusLayoutClickListener ` 默认的实现类,像下面这样:
178
+
179
+ ``` java
180
+ statusLayoutManager = new StatusLayoutManager .Builder (recyclerView)
181
+ // 设置重试事件监听器
182
+ .setOnStatusChildClickListener(new DefaultOnStatusChildClickListener () {
183
+ @Override
184
+ public void onEmptyChildClick (View view ) {
185
+
186
+ }
187
+
188
+ @Override
189
+ public void onErrorChildClick (View view ) {
190
+
191
+ }
192
+ })
193
+ .build();
170
194
```
You can’t perform that action at this time.
0 commit comments