Skip to content

Commit 48790cd

Browse files
committed
提交MultipleItemRvAdapter相关代码以及demo中添加其使用示例
1 parent ce4aa36 commit 48790cd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.chad.library.adapter.base.util;
2+
3+
/**
4+
* https://github.com/chaychan
5+
*
6+
* @author ChayChan
7+
* @description: AnnotationException
8+
* @date 2018/3/30 17:07
9+
*/
10+
11+
public class ItemProviderAnnotationException extends RuntimeException {
12+
13+
public ItemProviderAnnotationException(String message) {
14+
super(message);
15+
}
16+
17+
}

library/src/main/java/com/chad/library/adapter/base/util/ProviderDelegate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ProviderDelegate {
1818
public void registerProvider(BaseItemProvider provider){
1919
ItemProviderTag tag = provider.getClass().getAnnotation(ItemProviderTag.class);
2020
if (tag == null){
21-
throw new RuntimeException("ItemProviderTag not def layout");
21+
throw new ItemProviderAnnotationException("ItemProviderTag not def layout");
2222
}
2323

2424
int viewType = tag.viewType();

0 commit comments

Comments
 (0)