recyclerView 实现复杂的item布局(如淘宝、京东、商城类首页) (3)

@Override
public void registerItemProvider() {
//通栏商品大图片
mProviderDelegate.registerProvider(new ImgItemProvider());
//通栏图文
mProviderDelegate.registerProvider(new ImgAndTextItemProvider());
//通栏文本
mProviderDelegate.registerProvider(new TextItemProvider());
//三列图文
mProviderDelegate.registerProvider(new ThreeColumnItemProvider());
//通栏横向滑动
mProviderDelegate.registerProvider(new ScrollItemProvider());
//通栏窄图片
mProviderDelegate.registerProvider(new NarrowImgItemProvider());
//两列图文
mProviderDelegate.registerProvider(new TwoColumnItemProvider());
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
demo地址:

请移步:recyclerView 实现复杂的item布局(如淘宝、京东、商城类首页)


---------------------
作者:吕氏春秋i
来源:CSDN
原文:https://blog.csdn.net/Life_s/article/details/81298823
版权声明:本文为博主原创文章,转载请附上博文链接!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwsgyg.html