Activity Shared Element Transition

Source: https://github.com/codepath/android_guides/wiki/Shared-Element-Activity-Transition
What you need to do is to provide a transition name that both Activites can use to create a transition animation with.
So the ImageView
you click in the first activity needs the attribute android:transitionName="your_shared_transition_name"
and then you need to set the same attribute for the ImageView
in the target Activity too.
To use the shared transition name you need to provide the start intent with a option Bundle like this:
Intent intent = new Intent(this, TargetActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(this, (View)yourImageView, "your_shared_transition_name");
startActivity(intent, options.toBundle());
And to make the Activities support this type of transitions you need to add the attribute android:windowContentTransitions
to your Theme
...
<item name="android:windowContentTransitions">true</item>
...
-follow the linked tutorial above for a more detailed explanation