setBackground

fun setBackground(@ColorInt() color: Int)

分割线背景色 分割线有时候会存在间距(例如配置setMargin)或属于虚线, 这个时候暴露出来的是RecyclerView的背景色, 所以我们可以设置一个背景色来调整 可以设置背景色解决不统一的问题, 默认为透明Color.TRANSPARENT

fun setBackground(colorString: String)

分割线背景色 分割线有时候会存在间距(例如配置setMargin)或属于虚线, 这个时候暴露出来的是RecyclerView的背景色, 所以我们可以设置一个背景色来调整 可以设置背景色解决不统一的问题, 默认为透明Color.TRANSPARENT

Parameters

colorString

颜色的16进制字符串