title: Display onBindViewHolder value in Kotlin Main Class
body: <p>I am trying to get onBindViewHolder variable value in the main class but I am not sure how to call this variable. Any help is appreciated.</p>
  
  <pre><code>override fun onBindViewHolder(p0: TestDetailMenuViewHolder, p1: Int) {
      val Testmenudetail = TestMenudetails.get(p1)
      p0?.customView?.itemname.text = Testmenudetail.price.toString()
  
      var menuname: String = Testmenudetail.menu
      var itemprice: String = Testmenudetail.price.toString()
      //Let's say itemprice=50
  }
  </code></pre>
  
  
  
  <pre><code>class TestMenuDetail() : AppCompatActivity() {
      override fun onCreate(savedInstanceState: Bundle?) {
          var Test1 = itemprice //???
      }
  }
  </code></pre>