Kotlin: Moving from one activity to another

To move from one Activity to another using say a button click. For the sake of this example lets use the FAB button. It's uber simple

 fab.setOnClickListener { view ->
            val anIntent = Intent(this@MyCurrentActivity, TheActivityIWantToVisit::class.java)
            startActivity(anIntent)
        }

That's it really, job done

0 comments:

My Instagram