Open paulelpidorou opened 4 years ago
I had same issue, in custom ViewHolder's constuctor you should declare payload parameter as optional object type (Any?).
i think this's same with ur issue, can anyone help? Thanks so much
@fukemy Here is an example:
class CustomViewHolder(itemView: View, payload: Any?) : MessageHolders.BaseOutcomingMessageViewHolder<Message>(itemView, payload)
thanks u so much
I ended up creating my ViewHolders on Java instead of kotlin in order to have a constructor. I'm very disappointed with the solution tbh.
I am currently developing an app with Kotlin and when i declare custom ViewHolder written in kotlin, i get the following exception when trying to inflate them
I am assuming it has to do with how you get the adapter under the hood or something? When i use the same viewholder but written in Java everything works ok