If you implement LayoutContainer in ViewHolder of RecyclerView, view could be cached and performance improve.

If you’d like to use LayoutContainer, let’s enable androidExtensions experimental true.

android {
androidExtensions {
experimental = true
}
}

In ViewHolder, implement LayoutContainer and override containerView. Then you can use properties generated by Android Kotlin Extensions.

class RecyclerViewHolder(override val containerView: View): RecyclerView.ViewHolder(containerView), LayoutContainer {
val messageTextView = txtMessage
}