Created
November 24, 2016 10:26
-
-
Save KarthikKumarBA/f03277808b25c1d66d8733193f28a9ee to your computer and use it in GitHub Desktop.
Activity 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
ImageView imageView = (ImageView) findViewById(R.id.image_star); | |
TextView textViewName = (TextView) findViewById(R.id.text_view_name); | |
Pair[] pairs = new Pair[2]; | |
pairs[0] = new Pair<View, String>(imageView, "transition_star"); | |
pairs[1] = new Pair<View, String>(textViewName, "transition_name"); | |
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, pairs); | |
Intent i = new Intent(this, TransitionActivity.class); | |
i.putExtra("KEY_TYPE", "SharedTransition"); | |
startActivity(i, options.toBundle()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment