5

I want to do a Lollipop shared element transition between a navigation drawer (embedded in parent activity) and a fragment. Specifically, the top of the drawer has a profile picture and if the user clicks on it, I want the the profile image from the top of the drawer to transform to the top of the profile fragment that launches. This drawer is used to switch between a few of fragments.

I've seen how to do Activity to Activity transitions, and Fragment to Fragment transitions, but not Activity to Fragment transitions.

Basically I'm looking for advice or a sample of how to take a component from the drawer in my activity and have it transition to a fragment when the fragment is added or shown.

Has anyone done this or know how to do this?

jt-gilkeson
  • 2,661
  • 1
  • 30
  • 40
  • maybe you could get a clue from here https://stackoverflow.com/questions/28386397/shared-element-transitions-between-views-not-activities-or-fragments – sorianiv Jul 29 '15 at 19:45
  • I have come across the same issue any luck solving it? – pkramaric Aug 19 '15 at 22:19
  • @pkramaric I haven't had time to explore yet, but it sounds like a scene/view transition (as detailed in linked reference from sorianiv) may work from a view in the navigation drawer to a view in the fragment. – jt-gilkeson Aug 19 '15 at 23:42
  • @jt-gilkeson Any luck solving this? – gaurav jain Mar 03 '20 at 11:04

0 Answers0