📜  kotlin android 意图传递数据 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:05.005000             🧑  作者: Mango

代码示例1
//Send value from HomeActivity

val intent = Intent(this@HomeActivity,ProfileActivity::class.java)
intent.putExtra("Username","John Doe")
startActivity(intent)

//Get values in ProfileActivity

val profileName=intent.getStringExtra("Username")