Skip to content

Commit a35dbe4

Browse files
committed
1.1.0
修复1.0.8的 setAdapter 导致非listView且非RecyclerView的View的refresh不调用
1 parent 58afdb2 commit a35dbe4

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://github.com/LuckyJayce/MVCHelper/releases
1313
## 1.必须导入: ##
1414

1515
//MVCHelper核心类库
16-
compile 'com.shizhefei:MVCHelper-Library:1.0.8'
16+
compile 'com.shizhefei:MVCHelper-Library:1.1.0'
1717
//里面有使用recyclerview,所以需要导入recyclerview
1818
compile 'com.android.support:recyclerview-v7:24.0.0'
1919

@@ -22,42 +22,42 @@ https://github.com/LuckyJayce/MVCHelper/releases
2222
支持任意View的刷新 ,支持自定义Header,支持NestedScrollingParent,NestedScrollingChild的事件分发,嵌套ViewPager不会有事件冲突
2323

2424
//里面包含一个MVCCoolHelper 是适配这个控件的 MVCHelper
25-
compile 'com.shizhefei:MVCHelper-CoolRefresh:1.0.8'
25+
compile 'com.shizhefei:MVCHelper-CoolRefresh:1.1.0'
2626
compile 'com.shizhefei:CoolRefreshView:1.0.1'
2727
compile 'com.android.support:support-v4:24.0.0'
2828

2929
<2> 使用 https://github.com/chrisbanes/Android-PullToRefresh 的刷新控件导入
3030

3131
//里面包含一个MVCPullrefshHelper 是适配这个控件的 MVCHelper
32-
compile 'com.shizhefei:MVCHelper-Pullrefresh:1.0.8'
32+
compile 'com.shizhefei:MVCHelper-Pullrefresh:1.1.0'
3333
//由于没有找到gradle排至,我自己把它上传到jcenter上
3434
compile 'com.shizhefei:pulltorefresh:1.0.1'
3535

3636
<3> 使用 https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh 的刷新控件导入
3737

3838
//里面包含一个MVCUltraHelper 是适配这个控件的 MVCHelper
39-
compile 'com.shizhefei:MVCHelper-UltraRefresh:1.0.8'
39+
compile 'com.shizhefei:MVCHelper-UltraRefresh:1.1.0'
4040
//这里6月29号目前最新的,要实时关注新版本去秋大的网站上去看
4141
compile 'in.srain.cube:ultra-ptr:1.0.11'
4242

4343
<4> 使用android v4的SwipeRefreshLayout的作为刷新控件导入
4444

4545
//里面包含一个MVCSwipeRefreshHelper 是适配这个控件的 MVCHelper
46-
compile 'com.shizhefei:MVCHelper-SwipeRefresh:1.0.8'
46+
compile 'com.shizhefei:MVCHelper-SwipeRefresh:1.1.0'
4747
//v4包应该都有导入吧,v7包里面包含v4包
4848
compile 'com.android.support:support-v4:24.0.0'
4949

5050
<5> 测试用例,可以方便的查看MVCHelper,Task的运行情况和返回数据,还提供了修改接口字段,用于接口测试很方便哦
5151

5252
//MVCHelper的测试用例,继承ABSTestCaseFragment实现List<TestCaseData> getTestCaseDatas()方法
53-
compile 'com.shizhefei:MVCHelper-TestCase:1.0.8'
53+
compile 'com.shizhefei:MVCHelper-TestCase:1.1.0'
5454
//里面用到了gson
5555
compile 'com.google.code.gson:gson:2.2.4'
5656

5757
<6> MVCHelper-OkHttp 对OKHttp的简单封装
5858

5959
//MVCHelper的 OKHttp的简单封装
60-
compile 'com.shizhefei:MVCHelper-OkHttp:1.0.8'
60+
compile 'com.shizhefei:MVCHelper-OkHttp:1.1.0'
6161
//里面用到了okhttp3
6262
compile 'com.squareup.okhttp3:okhttp:3.4.0'
6363
compile 'com.squareup.okio:okio:1.9.0'

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ allprojects {
1919
}
2020

2121
ext {
22-
VERSION_NAME = '1.0.8'
23-
VERSION_CODE = 9
22+
VERSION_NAME = '1.1.0'
23+
VERSION_CODE = 10
2424
}
2525

2626

mvchelper_library/src/main/java/com/shizhefei/mvc/MVCHelper.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,15 @@ public void setAdapter(IDataAdapter<DATA> adapter) {
168168
setAdapter(adapter, listViewHandler);
169169
} else if (contentView instanceof RecyclerView) {
170170
setAdapter(adapter, recyclerViewHandler);
171+
} else {
172+
setAdapter(adapter, null);
171173
}
172174
}
173175

174176
/**
175177
* 设置适配器,用于显示数据
176178
*
177-
* @param adapter 适配器
179+
* @param adapter 适配器
178180
* @param viewHandler 用于处理contentView的添加滚动末尾加载更多,添加底部加载更多布局等操作
179181
*/
180182
public void setAdapter(IDataAdapter<DATA> adapter, ViewHandler viewHandler) {

0 commit comments

Comments
 (0)