

In order to get the reverse element transition effect while finishing the second activity, you need to call the Activity.supportFinishAfterTransition() method instead of the Activity.finish() method. Step 4: Close Activity with Reverse Element Transition Please ensure that you do not overdo the transitions, as that can distract the user and degrade the user experience.

While specifying multiple shared elements transitions, make sure that you import 4.util.Pair.

When we specify the source view along with its corresponding transition name, it ensures that even if multiple views exist in the the source view hierarchy with the same transition name, it picks the correct view to start the animation from. StartActivity(intent, options.toBundle()) MakeSceneTransitionAnimation( this, p1, p2) Pair p2 = Pair.create((View)mObjectNameTV, "object_name") ĪctivityOptionsCompat options = ActivityOptionsCompat. Pair p1 = Pair.create((View)mObjectIV, "object_image")
