MyItemDecoration
RecyclerView列表使用分割线.
效果图展示格式
![Image text](/image/view1.png)
![Image text](url)
举例:
![Image text](https://github.com/zhang721688/MyItemDecoration/blob/master/img/common.png)
添加依赖
版本1.0.0
implementation 'com.zxn.divider:dividerlibrary:1.0.3'
简单方式
1横线
rv.addItemDecoration(new ItemDivider.Builder(this)
.bgColor(R.color.colorPrimaryDark)
.widthDp(20)
.createCommon());
2竖线
rv.addItemDecoration(new ItemDivider.Builder(this)
.showLastDiveder(false)
.bgColor(R.color.colorPrimary)
.createVertical());
3纵横交叉
ItemDivider divider = new ItemDivider.Builder(this)
.bgColor(R.color.c_ffffff)
.spanCount(layoutManager.getSpanCount())
.widthDp(5)
.createGrid();
网友评论