Answers for "android studio switch activity kotlin"

0

switch android kotlin

var num = 2
  
  when (num) {
                1 -> {
                Log.e("num is 1")
                }
                2 -> {
                    Log.e("num is 2")
                }
                3 -> {
                  Log.e("num is 3")
                 }
            }
Posted by: Guest on January-27-2022
-2

android studio change activity kotlin

val button: Button = findViewById(R.id.Button)

button.setOnClickListener{

	val intent: intent = Intent(applicationContext, ActivityToBeOpened::class.java){

		startActivity(intent)

	}
}
Posted by: Guest on July-04-2021

Code answers related to "android studio switch activity kotlin"

Browse Popular Code Answers by Language