RecyclerView with nested setOnClickListener in a quiz based app
I have an issue with the implementation of a basic functionality of a quiz based application. Briefly, I have "questions" and "answers" in an ArrayList (each Question has its own ArrayList, 3 for this example) that I used to populate an adapter of a RecyclerView in a fragment managed with MVVM.
This is my onBindViewHolder function:
...
override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
...
val curQuest = myDataset[position]
val shuffledAnswers...