Created
April 3, 2021 19:36
-
-
Save ch8n/eab212347cf3b2c4e78297b7ea5b734d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Intent(context, MyActivity::class.java).apply { | |
// scope to configure object | |
putExtra("data", 123) | |
addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) | |
}).also { intent -> | |
// scope to consume the object | |
startActivity(this@FooActivity,intent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment