title: How to I access button inside a recycler view?
body: <p>This is my RecyclerView Adaper</p>
  
  <p>class RecyclerAdapter(private val recyclerList: List): RecyclerView.Adapter(){</p>
  
  <pre><code>override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): mainRecyclerViewHolder {
      val itemView = LayoutInflater.from(parent.context).inflate(R.layout.quiz_item_recycler_view,
          parent, false)
  
      return mainRecyclerViewHolder(itemView)
  }
  
  override fun getItemCount() = recyclerList.size
  
  override fun onBindViewHolder(holder: mainRecyclerViewHolder, position: Int) {
  
      val currentItem = recyclerList[position]
      holder.imageView.setImageResource(currentItem.imageResource)
      holder.textView.text = currentItem.recyclerCardText
  
  
  }
  
  class mainRecyclerViewHolder(itemView: View): RecyclerView.ViewHolder(itemView){
  
      val imageView: ImageView = itemView.rec_image
      val textView: TextView = itemView.text_view_1
  
  
  
  
  }
  
  }
  </code></pre>
  
  <p>And this is my data class</p>
  
  <p>data class RecyclerItemMain(val imageResource: Int, val recyclerCardText: String, val button: Button)</p>