What is the proper way to make an intent to an new Activity using the setOnclickListener method? (Because I know they always make new ways to do the same thing)
I know we can call the id of the button ex. if the buttons id was helloButtonId we would explicitly call it like:
val newPage = Intent(this,Main2Activity::class.java)
My App always forecloses when I putt code in the setOnclickListener?
Can some smart nice person please post some simple code of an OnlickListner starting a new Acitvity so I can see what I’m doing wrong?