inflate

fun ViewGroup.inflate(layoutRes: Int): View

USAGE

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val view = parent.inflate(R.layout.view_item) return ViewHolder(view) }