美文网首页
github中README.md模板

github中README.md模板

作者: CarlosLynn | 来源:发表于2019-03-28 17:07 被阅读0次

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();

相关文章

网友评论

      本文标题:github中README.md模板

      本文链接:https://www.haomeiwen.com/subject/ecrcbqtx.html