Example usage for android.app Fragment setSharedElementReturnTransition

List of usage examples for android.app Fragment setSharedElementReturnTransition

Introduction

In this page you can find the example usage for android.app Fragment setSharedElementReturnTransition.

Prototype

public void setSharedElementReturnTransition(Transition transition) 

Source Link

Document

Sets the Transition that will be used for shared elements transferred back during a pop of the back stack.

Usage

From source file:com.kogitune.activitytransition.fragment.FragmentTransitionLauncher.java

public void prepare(Fragment toFragment) {
    final Bundle transitionBundle = TransitionBundleFactory.createTransitionBundle(context, fromView, bitmap);
    if (Build.VERSION.SDK_INT >= 21) {
        toFragment.setSharedElementEnterTransition(new ChangeBounds());
        toFragment.setSharedElementReturnTransition(new ChangeBounds());
    }/*from  w  w w  .  j a  v  a 2  s.  c  o  m*/
    toFragment.setArguments(transitionBundle);
}

From source file:com.kogitune.activitytransition.fragment.FragmentTransitionLauncher.java

public void prepare(android.support.v4.app.Fragment toFragment) {
    final Bundle transitionBundle = TransitionBundleFactory.createTransitionBundle(context, fromView, bitmap);
    if (Build.VERSION.SDK_INT >= 21) {
        toFragment.setSharedElementEnterTransition(new ChangeBounds());
        toFragment.setSharedElementReturnTransition(new ChangeBounds());
    }//from w  ww  .j a v a2 s.c o  m
    toFragment.setArguments(transitionBundle);
}