Package com.drake.brv.utils

Types

BRV
Link copied to clipboard
object BRV

Functions

addModels
Link copied to clipboard
fun RecyclerView.addModels(models: List<Any?>?, animation: Boolean = true)
添加数据
divider
Link copied to clipboard
fun RecyclerView.divider(block: DefaultDecoration.() -> Unit): RecyclerView
函数配置分割线 具体配置参数查看DefaultDecoration
fun RecyclerView.divider(@DrawableRes() drawable: Int, orientation: DividerOrientation = DividerOrientation.HORIZONTAL): RecyclerView
指定Drawable资源为分割线, 分割线的间距和宽度应在资源文件中配置
grid
Link copied to clipboard
fun RecyclerView.grid(spanCount: Int = 1, orientation: Int = VERTICAL, reverseLayout: Boolean = false, scrollEnabled: Boolean = true): RecyclerView
创建HoverGridLayoutManager 网格列表
linear
Link copied to clipboard
fun RecyclerView.linear(orientation: Int = VERTICAL, reverseLayout: Boolean = false, scrollEnabled: Boolean = true): RecyclerView
创建HoverLinearLayoutManager 线性列表
page
Link copied to clipboard
fun View.page(loadMoreEnabled: Boolean = true, stateEnabled: Boolean = true): PageRefreshLayout
PageRefreshLayout 包裹当前 view
setup
Link copied to clipboard
fun Dialog.setup(block: BindingAdapter.(RecyclerView) -> Unit): Dialog
快速为对话框创建一个列表
fun RecyclerView.setup(block: BindingAdapter.(RecyclerView) -> Unit): BindingAdapter
设置适配器
staggered
Link copied to clipboard
fun RecyclerView.staggered(spanCount: Int, orientation: Int = VERTICAL, scrollEnabled: Boolean = true): RecyclerView

Properties

bindingAdapter
Link copied to clipboard
val RecyclerView.bindingAdapter: BindingAdapter
如果Adapter是BindingAdapter则返回对象, 否则抛出异常
models
Link copied to clipboard
var RecyclerView.models: List<Any?>?
数据模型集合
mutable
Link copied to clipboard
var RecyclerView.mutable: ArrayList<Any?>
可增删的models数据模型集合