前文实现了利用RecyclerView实现ListView,并可以任意添加分割线,在这里主要讨论一下用RecyclerView实现GridView并实现添加分割线。
这里要提到的是RecyclerView.LayoutManager这个类。
通过查阅Android API我们可以看到如下:
A RecyclerView.LayoutManager继承自Object,提供了三个子类: LinearLayoutManager:A |
前文实现了利用RecyclerView实现ListView,并可以任意添加分割线,在这里主要讨论一下用RecyclerView实现GridView并实现添加分割线。
这里要提到的是RecyclerView.LayoutManager这个类。
通过查阅Android API我们可以看到如下:
A RecyclerView.LayoutManager继承自Object,提供了三个子类: LinearLayoutManager:A |