Last active
June 12, 2020 08:41
-
-
Save KunalChaubal/ad8210da0180382aea4d607fe7b64ac2 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
cardView.setOnClickListener { | |
val intent = Intent(this, DetailActivity::class.java) | |
val pairImage = Pair<View, String>(imageView, resources.getString(R.string.transition_image)) | |
val pairTitle = Pair<View, String>(tv_title, resources.getString(R.string.transition_title)) | |
val pairDesc = Pair<View, String>(tv_desc, resources.getString(R.string.transition_body)) | |
val pairBack = Pair<View, String>(cardView, resources.getString(R.string.transition_container)) | |
val activityOptions = ActivityOptions.makeSceneTransitionAnimation(this, pairImage, pairTitle, pairDesc, pairBack) | |
startActivity(intent, activityOptions.toBundle()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment