use of com.hannesdorfmann.mosby3.sample.mail.ui.transition.ExplodeFadeEnterTransition in project mosby by sockeqwe.
the class DetailsFragment method initTransitions.
@TargetApi(21)
private void initTransitions() {
Window window = getActivity().getWindow();
window.setEnterTransition(new ExplodeFadeEnterTransition(senderNameView, senderMailView, separatorLine));
window.setExitTransition(new ExcludedExplodeTransition());
window.setReenterTransition(new ExcludedExplodeTransition());
window.setReturnTransition(new ExcludedExplodeTransition());
TransitionSet textSizeSet = new TransitionSet();
textSizeSet.addTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.move));
TextSizeTransition textSizeTransition = new TextSizeTransition();
textSizeTransition.addTarget(R.id.subject);
textSizeTransition.addTarget(getString(R.string.shared_mail_subject));
textSizeSet.addTransition(textSizeTransition);
textSizeSet.setOrdering(TransitionSet.ORDERING_TOGETHER);
window.setSharedElementEnterTransition(textSizeSet);
getActivity().setEnterSharedElementCallback(new TextSizeEnterSharedElementCallback(getActivity()));
}
Aggregations