Skip to content

Commit

Permalink
docs(0.9.6): 增加注释和更新README中版本号
Browse files Browse the repository at this point in the history
Signed-off-by: free46000 <[email protected]>
  • Loading branch information
free46000 committed Apr 24, 2017
1 parent 0200924 commit d15ca69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@
- `RecyclerView Adapter`零编码,解放了复杂的`Adapter`
- 支持`DataBinding`,让你清爽的编写列表代码
- 支持Form表单录入,懒加载易复用,支持`DataBinding`、隐藏域、输入内容验证及是否变化
- 支持业务详情页展示
- 支持空白、错误等状态页的展示

## 系列文章
- **用法与详解(详见下文)**
- **[MultiItem进阶 实现Head Foot和加载更多](https://juejin.im/post/58da77ed1b69e6006bc7fffa)**
- **[MultiItem进阶 使用DataBinding让RecyclerView代码更简洁清爽](https://juejin.im/post/58ea5e88b123db1ad0636295)**
- **[MultiItem进阶 用RecyclerView实现Form表单](https://juejin.im/post/58ea5e88b123db1ad0636295)**
- **[MultiItem进阶 用RecyclerView实现错误和空白状态页 附加详情实践](https://juejin.im/post/58fe298d8d6d810058a0f2a5)**
- **[仿任务面板 跨RecyclerView的Item拖动 支持缩小后拖动](https://juejin.im/post/58e37dae0ce46300583b4ab0)**

![chat](https://github.com/free46000/cloud/raw/master/multiitem/chat.png)
![headfoot](https://user-gold-cdn.xitu.io/2017/3/29/1846a3cd1a81b9b0bb516402d1cee6aa.png )
![fullspan](https://user-gold-cdn.xitu.io/2017/3/29/59b465977da7c11b455a9998143e5e2a.png )
![loadmore](https://user-gold-cdn.xitu.io/2017/3/29/7b50786340f253d2f8e5f7966cfd7fc1.png )
![数据绑定效果](https://user-gold-cdn.xitu.io/2017/4/8/909aaf58179acc6abb55d79ae188f09e.png)
![详情页效果](https://github.com/free46000/cloud/raw/master/multiitem/user_info.png)
![空白错误页](https://github.com/free46000/cloud/raw/master/multiitem/empty_error.gif)
![跨Recycler拖动](https://github.com/free46000/cloud/raw/master/multiitem/panel_drag.gif )
![缩放后跨Recycler拖动](https://github.com/free46000/cloud/raw/master/multiitem/panel_drag_scale.gif)

Expand All @@ -40,7 +45,7 @@ allprojects {
`Module`中添加:
```
dependencies {
compile 'com.github.free46000:MultiItem:0.9.5'
compile 'com.github.free46000:MultiItem:0.9.6'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ protected void initViews() {
* @return StateViewHelper
*/
private StateViewHelper newStateViewHelper(String message) {
//初始化状态Item
BaseItemState stateItem = new ItemEmptyAndError(message);
//初始化辅助类,需要一个BaseItemState
StateViewHelper stateViewHelper = new StateViewHelper(recyclerView, stateItem);
//设置状态页按钮的点击事件监听,处理状态页隐藏
stateItem.setOnStateClickListener(() -> errorViewHelper.hide());
return stateViewHelper;
}
Expand All @@ -84,9 +87,11 @@ private void setOnItemClickListener(BaseItemAdapter adapter) {
public void onItemClick(BaseViewHolder viewHolder) {
switch (viewHolder.getItemPosition()) {
case 0:
//展示空白页
emptyViewHelper.show();
break;
case 1:
//展示错误页
errorViewHelper.show();
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
package com.freelib.multiitem.demo;

import android.content.Context;
import android.databinding.ViewDataBinding;
import android.icu.text.UnicodeSet;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.freelib.multiitem.adapter.BaseItemAdapter;
import com.freelib.multiitem.adapter.holder.DataBindViewHolderManager;
import com.freelib.multiitem.demo.bean.ImageBean;
import com.freelib.multiitem.demo.bean.ImageTextBean;
import com.freelib.multiitem.demo.bean.ItemInfo;
import com.freelib.multiitem.demo.bean.TextBean;
import com.freelib.multiitem.demo.bean.UserBean;
import com.freelib.multiitem.demo.viewholder.ImageAndTextManager;
import com.freelib.multiitem.demo.viewholder.ImageViewManager;
import com.freelib.multiitem.demo.viewholder.TextViewManager;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
Expand Down

0 comments on commit d15ca69

Please sign in to comment.