init
View
And
Action
fun initViewAndAction( data: Model, onClickListener: (data: Model) -> Unit? = null, onLongClickListener: (data: Model) -> Unit? = null)
Content copied to clipboard
Method to set click and long click listener, lastly bind data with view
Parameters
data
data model
onClickListener
Action when item clicked, nullable
onLongClickListener
Action when item clicked for long, nullable