How can you make the transition between the Shared Element and Lollipop between the drawer and the fragment?

I want to make a general transition of the Lollipop element between the navigation box (embedded in parent activity) and the fragment. In particular, the top of the drawer has a profile image, and if the user clicks on it, I want the profile image from the top of the drawer to be transformed to the beginning of the profile fragment that starts. This box is used to switch between multiple fragments.

I saw how to do Activity to Activity and Fragment to Fragment transitions, but not Activity to Fragment transitions.

Basically I am looking for advice or a sample on how to extract a component from a box into my activity and translate it into a fragment when the fragment is added or shown.

Has anyone done this or knows how to do this?

+4
source share

Source: https://habr.com/ru/post/1598984/


All Articles