I have some parameter in the constructor. I need to convert it to something else and give it to the parent constructor. But the problem is that I want to remember the result of the conversion (which I give to the parent constructor) and I don't need to store it in the base class. How initialize value in the parent constructor argument? Like "val" in base constructor?
protected open class BindingViewHolder(binding: ViewDataBinding) : RecyclerView.ViewHolder(binding.root)
protected open class ModelViewHolder<Model : Identifiable<*>?, Binding : ViewDataBinding>(
parent: ViewGroup,
inflateBinding: (LayoutInflater, ViewGroup, Boolean) -> Binding
) : BindingViewHolder(parent.inflateChildBinding(inflateBinding)) {
//some code
}
I have one problem in this code. I cant "val" "parent.inflateChildBinding(inflateBinding)"