title: Android Kotlin New intent on click event from recycler view
body: <p>I've just started learning android development with Kotlin.</p>
  
  <p>I have a recycler view that lists items. </p>
  
  <p>I'm trying to create onClick event for the item and then start a new intent and pass along the item id.</p>
  
  <p>I'm getting an error when trying to instantiate the Intent "None of the following functions can be called with the arguments supplied". I think it's because I cannot access the context of the view?</p>
  
  <pre><code>override fun onBindViewHolder(holder: ViewHolder, position: Int) {
      holder.id = events[position][0]
      holder.title.text = events[position][1]
  
      if (events[position][2] == events[position][3]) {
          holder.date.text = events[position][2]
      } else {
          holder.date.text = events[position][2] + " - " + events[position][3]
      }
  
      holder.itemView.setOnClickListener {
          v: View -&gt; Unit
  
  
          Log.d(TAG, "onItemClick for ID: " + holder.id)
  
          val intent = Intent(this, EventDetail::class.java)
          intent.putExtra("id", holder.id)
          startActivity(intent)
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/4B0Qe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4B0Qe.png" alt="error"></a></p>