BindingViewHolder

inner class BindingViewHolder : RecyclerView.ViewHolder

Constructors

BindingViewHolder
Link copied to clipboard
fun BindingViewHolder(itemView: View)
BindingViewHolder
Link copied to clipboard
fun BindingViewHolder(viewBinding: ViewDataBinding)

Functions

collapse
Link copied to clipboard
fun collapse(@IntRange(from = -1.toLong()depth: Int = 0): Int
折叠子项
expand
Link copied to clipboard
fun expand(scrollTop: Boolean = false, @IntRange(from = -1.toLong()depth: Int = 0): Int
展开子项
expandOrCollapse
Link copied to clipboard
fun expandOrCollapse(scrollTop: Boolean = false, @IntRange(from = -1.toLong()depth: Int = 0): Int
展开或折叠子项
findParentPosition
Link copied to clipboard
fun findParentPosition(): Int
查找分组中的父项位置
findParentViewHolder
Link copied to clipboard
fun findParentViewHolder(): BindingAdapter.BindingViewHolder?
查找分组中的父项ViewHolder
findView
Link copied to clipboard
fun <V : View?> findView(@IdRes() id: Int): V
查找ItemView上的视图
getBinding
Link copied to clipboard
inline fun <B : ViewBinding> getBinding(): B
返回匹配泛型的数据绑定对象ViewBinding
getBindingOrNull
Link copied to clipboard
inline fun <B : ViewBinding> getBindingOrNull(): B?
返回匹配泛型的数据绑定对象ViewBinding, 如果不匹配则返回null
getModel
Link copied to clipboard
fun <M> getModel(): M
返回数据模型
getModelOrNull
Link copied to clipboard
inline fun <M> getModelOrNull(): M?
返回数据模型, 如果不匹配泛型则返回Null

Properties

_data
Link copied to clipboard
lateinit var _data: Any
adapter
Link copied to clipboard
val adapter: BindingAdapter
context
Link copied to clipboard
var context: Context
modelPosition
Link copied to clipboard
val modelPosition: Int