title: Adding ScrollBar in Kotlin class
body: <p>I am having trouble <code>ScrollBar</code> it shows error when I add it in a Kotlin class. Import library is also showing an error. What should I do? Below is the code:</p>
  
  <pre><code>import android.widget.Toast
  import com.github.barteksc.pdfviewer.PDFView
  import com.github.barteksc.pdfviewer.ScrollBar
  import kotlinx.android.synthetic.main.activity_pdf.view.*
  
  
  import java.io.File
  
  class PDF_Activity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_pdf)
  
  
          val pdfView = findViewById(R.id.pdfView) as PDFView
  
          val scrollBar = findViewById&lt;ScrollBar&gt;(R.id.scrollBar)
          pdfView.setScrollBar(scrollBar)
  
          scrollBar.setHorizontal(false)
  
          val i = this.intent
          val path = i.extras!!.getString("PATH")
  
  
          val file = File(path!!)
  
          if (file.canRead()) {
  
  
              pdfView.fromFile(file).defaultPage(1).onLoad { nbPages -&gt; Toast.makeText(this@PDF_Activity, nbPages.toString(), Toast.LENGTH_LONG).show() }.load()
  
          }
  </code></pre>