Skip to content

Commit

Permalink
🐍 version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakumon committed Dec 22, 2017
1 parent d07e000 commit 8780899
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ allprojects {

```
dependencies {
compile 'com.github.Bakumon:StatusLayoutManager:1.0.0'
compile 'com.github.Bakumon:StatusLayoutManager:1.0.1'
}
```

Expand All @@ -40,10 +40,15 @@ dependencies {
```java
statusLayoutManager = new StatusLayoutManager.Builder(recyclerView)
// 设置重试事件监听器
.setOnRetryListener(new OnRetryListener() {
.setOnStatusChildClickListener(new DefaultOnStatusChildClickListener() {
@Override
public void onClick(int state, View view) {
// 处理点击事件,一般重新加载数据
public void onEmptyChildClick(View view) {

}

@Override
public void onErrorChildClick(View view) {

}
})
.build();
Expand Down Expand Up @@ -167,4 +172,23 @@ statusLayoutManager = new StatusLayoutManager.Builder(recyclerView)
}
})
.build();
```

也可以使用 `OnStatusLayoutClickListener` 默认的实现类,像下面这样:

```java
statusLayoutManager = new StatusLayoutManager.Builder(recyclerView)
// 设置重试事件监听器
.setOnStatusChildClickListener(new DefaultOnStatusChildClickListener() {
@Override
public void onEmptyChildClick(View view) {

}

@Override
public void onErrorChildClick(View view) {

}
})
.build();
```

0 comments on commit 8780899

Please sign in to comment.