Last active
November 28, 2017 08:28
-
-
Save gibson-khs/44f0aa0bfa2977b3f67c9f954586ea75 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
| @TargetApi(Build.VERSION_CODES.LOLLIPOP) | |
| public static ActivityOptionsCompat getTransitionOptions(View... views) { | |
| Activity activity = (Activity) views[0].getContext(); | |
| Pair<View, String>[] pairs = new Pair[views.length]; | |
| for (int i = 0; i < views.length; i++) { | |
| View view = views[i]; | |
| pairs[i] = Pair.create(view, view.getTransitionName()); | |
| } | |
| return ActivityOptionsCompat.makeSceneTransitionAnimation(activity, pairs); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment