Kotlin Android Extensions allow us to access views in the layout XML just as if they were properties, with the name of the id you used in the layout definition. It builds a local view cache for this purpose.
But with the RecycleView
adapter we loose this possibility.
I know that with Kotlin Android Extensions 1.1.4 the solution is solved with LayoutContainer
interface. But question is not about this.
My question is why it is not possible for Kotlin Android Extensions plugin to create view cache with ViewHolder
view? What is the reason? I can provide proper synthetic import, for example:
kotlinx.android.synthetic.main.view_item.view.*
Why it's not possible to generate view cache with this imported view?