Home Shared Element cardview transition
 I am wanting to make a transition identical to this one, which comes from the material design. I followed some tutorials that show how to do this but the vast majority work with Activitys as I have to work with fragments. In the end I got a rough result, but it's still not what I want. The result I got was this one. As you can see, the transition ignores CardView, and only the image comes toward us. Below is my current code. MainFragment public class MainFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment final View v = inflater.inflate(R.layout.fragment_market, container, false); return v; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); final ImageView propertyImage = view.findViewById(R.id.propertyImageView); propertyImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sharedTransition(propertyImage); } }); } public void sharedTransition(ImageView imageView) { SharedMainFragment simpleFragmentB = new SharedMainFragment(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { TransitionSet transitionSet = new TransitionSet(); transitionSet.setOrdering(TransitionSet.ORDERING_TOGETHER); transitionSet.addTransition(new ChangeBounds()) .addTransition(new ChangeTransform()) .addTransition(new ChangeImageTransform()); simpleFragmentB.setSharedElementEnterTransition(transitionSet); simpleFragmentB.setSharedElementReturnTransition(transitionSet); } getActivity().getSupportFragmentManager() .beginTransaction() .addSharedElement(imageView, ViewCompat.getTransitionName(imageView)) .addToBackStack("SHARED") .replace(R.id.fragment_container, simpleFragmentB) .commit(); } }  fragment_main.xml (only the cardview part and its contents)   fragment_shared_main.xml (the fragment that is open)   Thanks for listening.