Starting a new Activity
suggest changefun startNewActivity(){
val intent: Intent = Intent(context, Activity::class.java)
startActivity(intent)
}
You can add extras to the intent just like in Java.
fun startNewActivityWithIntents(){
val intent: Intent = Intent(context, Activity::class.java)
intent.putExtra(KEY_NAME, KEY_VALUE)
startActivity(intent)
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents