I'm currently experimenting with shared element transitions with fragments and have the basic idea working. I have two very similar screens (see screenshots), and the shared transition works for the form, but the two buttons (login/social) do not gracefully transition, they just disappear when exiting, and reappear when entering. Is it possible to specify to these two view items to fade out and fade in during transitions?
Fragment A
getActivity().getSupportFragmentManager().beginTransaction()
.addSharedElement(btn_next, ViewCompat.getTransitionName(btn_next))
.addSharedElement(et_email, ViewCompat.getTransitionName(et_email))
.addSharedElement(ll_form, ViewCompat.getTransitionName(ll_form))
.replace(R.id.fl_content, new LoginFragment())
.addToBackStack(null)
.commit();
Fragment B
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSharedElementEnterTransition(TransitionInflater.from(getContext()).inflateTransition(android.R.transition.move));