fun createBirthdayCard(view: View) {
val name = nameInput.editableText.toString()
val intent = Intent(this, BirthdayGreeting::class.java)
intent.putExtra(name:"name", name)
startActivity(intent)
}
}
CodePudding user response:
remove name: you don't need to mention it . just write like this
intent.putExtra("name", name)
CodePudding user response:
remove name:
from putExtra
i.e
val intent = Intent(this, BirthdayGreeting::class.java)
intent.putExtra("name", name)
startActivity(intent)