Answer the question
In order to leave comments, you need to log in
How to create an adapter for RecycleView?
Why is the ViewHolder highlighted in red (on lines with //###) and it says Unresolved reference? What have I done wrong? In all videos and code examples, it's exactly the same.
class RecyclerAdapter : RecyclerView.Adapter<RecyclerAdapter.ViewHolder>(){ //###
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerAdapter.ViewHolder { //###
TODO("Not yet implemented")
}
override fun getItemCount(): Int {
TODO("Not yet implemented")
}
override fun onBindViewHolder(holder: RecyclerAdapter.ViewHolder, position: Int) { //###
TODO("Not yet implemented")
}
}
Answer the question
In order to leave comments, you need to log in
Recently solved the problem. My project was named RecycleView because I usually name a project the topic I'm learning about. Because of this, there was confusion in the project
(a very stupid mistake, the second time on the same rake)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question