Skip to content

Commit

Permalink
Update README-cn.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CymChad committed Apr 28, 2016
1 parent bd455a5 commit e7ff231
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- **新增分组**
- **自定义item类型**
- **添加setEmptyView方法**
- **新增添加子布局多个控件的点击事件**

![demo](https://github.com/CymChad/BaseRecyclerViewAdapterHelper/blob/master/demo_res/demo.gif)
#如何使用它?
Expand Down Expand Up @@ -164,6 +165,33 @@ public class SectionAdapter extends BaseSectionQuickAdapter<MySection> {
```
mQuickAdapter.setEmptyView(getView());
```
#新增添加子布局多个控件的点击事件
Adapter
```
protected void convert(BaseViewHolder helper, Status item) {
helper.setOnClickListener(R.id.tweetAvatar, new OnItemChildClickListener())
.setOnClickListener(R.id.tweetName, new OnItemChildClickListener());
}
```
Activity
```
mQuickAdapter.setOnRecyclerViewItemChildClickListener(new BaseQuickAdapter.OnRecyclerViewItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
String content = null;
Status status = (Status) adapter.getItem(position);
switch (view.getId()) {
case R.id.tweetAvatar:
content = "img:" + status.getUserAvatar();
break;
case R.id.tweetName:
content = "name:" + status.getUserName();
break;
}
Toast.makeText(AnimationUseActivity.this, content, Toast.LENGTH_LONG).show();
}
});
```

>**持续更新!,所以推荐Star项目**
Expand Down

0 comments on commit e7ff231

Please sign in to comment.