I am trying to achieve the sharedElement to animate an imageView from one activity to another , but my problem is my imageView is inside recyclerView header so it doesn't animate.
So my question is, Is there a way for this to achieve?
I have seen many apps on PlayStore doing it
Code: While starting 2nd activity
String transitionName = getString(R.string.demo);
ActivityOptionsCompat transitionActivityOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(mContext, v, transitionName);
startActivity(intent, transitionActivityOptions.toBundle());
and i have set:
ViewCompat.setTransitionName(icon, convertView.getContext().getString(R.string.demo));
to both my first activity grid and 2nd activity recyclerView
Header