This is probably an easy fix, but what do you initalize the ViewHolder class so that i wouldn't have to call it when the function is called in another class.
Here's what I mean
fun registerFragmentState(holder: BaseBindingViewHolder) = object: OnStateChange {// BaseBindingViewHolder = ???
override fun onResumed() {
holder.itemView.cCount1.visibility = View.GONE
}
}
I need to initialize BaseBindingViewHolder so that I don't have to fill it in on the file I am calling it on. Thanks again.
For clarification. I am using the ViewHolder to access the views in the Recycler View, as a parameter to registerFragmentState
since there is no initial value, when calling the function, it going to ask for a value (or this case a view of some sort to fill in).
I'm looking to avoid or solve registerFragmentState() error