It tells me there is a mismatch, it requires "AdapterView<*>! but it has found "Int". How do I fix this?
class InstructorViewHolder(itemView: View, listener: OnItemClickListener) : RecyclerView.ViewHolder(itemView){
val firstName: TextView = itemView.findViewById(R.id.tvInstructorName)
val phoneNumber: TextView = itemView.findViewById(R.id.tvInstructorNumber)
val age: TextView = itemView.findViewById(R.id.tvInstructorAge)
init {
itemView.setOnClickListener {
listener.onItemClick(absoluteAdapterPosition)
}
}
}
I tried to use "bindingAdapterPosition" but still got the same error. On this documentation it states that the return type should be Int, that why I am confused as to why it is asking me to provide "AdapterView<*>".
I looked at this link however, it doesn't exactly explain how to implement the feature.