divider
fun RecyclerView.divider(block: DefaultDecoration.() -> Unit): RecyclerView
Content copied to clipboard
函数配置分割线 具体配置参数查看DefaultDecoration
fun RecyclerView.divider(@DrawableRes() drawable: Int, orientation: DividerOrientation = DividerOrientation.HORIZONTAL): RecyclerView
Content copied to clipboard
指定Drawable资源为分割线, 分割线的间距和宽度应在资源文件中配置
Parameters
drawable
描述分割线的drawable
orientation
分割线方向, 仅androidx.recyclerview.widget.GridLayoutManager需要使用此参数, 其他LayoutManager都是根据其方向自动推断