Created
December 30, 2017 17:08
-
-
Save the-dagger/30d4338fa82bf0a058ed059412e29d8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun startIntent(s : Student){ | |
val intent = Intent(this,HomeActivity::class.java) | |
with(intent){ | |
putExtra(NAME,name) // No need to use intent object anymore | |
putExtra(SUBJECT,subject) | |
putExtra(IMAGE,image) | |
} | |
startActivity(intent) | |
} | |
fun receiveIntent(i : Intent){ | |
with(i){ | |
val name = getStringExtra(NAME) | |
val subject = getStringExtra(SUBJECT) | |
val image = getStringExtra(IMAGE) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment