initRecyclerViewAdapter

fun <T : RecyclerView.Adapter<*>> RecyclerView.initRecyclerViewAdapter(yourAdapter: T, layoutOrientation: Int = RecyclerView.VERTICAL, fixedSize: Boolean = false, reverseLayout: Boolean = false)

Set adapter of recyclerView

Parameters

yourAdapter

your adapter(must extend RecyclerView.Adapter)

layoutOrientation

LinearLayoutManager orientation of adapter, default is RecyclerView.VERTICAL

fixedSize

isFixed size of recyclerView, default is true


fun <T : RecyclerView.Adapter<*>> RecyclerView.initRecyclerViewAdapter(yourAdapter: T, yourLayoutManager: RecyclerView.LayoutManager, fixedSize: Boolean = false)

Set adapter of recyclerView

Parameters

yourAdapter

your adapter(must extend RecyclerView.Adapter)

yourLayoutManager

Pass your own layout manager

fixedSize

isFixed size of recyclerView, default is true