Created
April 5, 2018 10:30
-
-
Save Nonda95/53e7b976e77c7adcba53f1c3ca19a174 to your computer and use it in GitHub Desktop.
Start Activity with Shared Element Transition
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 goToDetails(url: String, imageView: View) { | |
val options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, imageView, imageView.transitionName).toBundle() | |
Intent(this, DetailActivity::class.java) | |
.putExtra(IMAGE_URL_KEY, url) | |
.let { | |
startActivity(it, options) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment