Example usage for android.transition CircularPropagation CircularPropagation

List of usage examples for android.transition CircularPropagation CircularPropagation

Introduction

In this page you can find the example usage for android.transition CircularPropagation CircularPropagation.

Prototype

CircularPropagation

Source Link

Usage

From source file:by.gdgminsk.animationguide.ContactDetailsActivity.java

private void exit() {
    if (mInitialOrientation != mCurrentOrientation || mCurrentCollapsingRate > 0.9f) {
        // remove tranistion name on exit to let activity explode insted of playing
        // reverse shared element animation. Better override return transition and
        // not to play shared element back because if returning activity recreated
        // there is a glitch because the end coordinate of shared element may not exist
        ViewCompat.setTransitionName(mPhotoView, null);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Explode transition = new Explode();
            transition.setPropagation(new CircularPropagation());
            transition.setDuration(getResources().getInteger(R.integer.duration_explode));
            transition.setInterpolator(AnimUtils.EASE_OUT_INTERPOLATOR);
            getWindow().setReturnTransition(transition);
        }//from  w ww . j a  va  2s.c  o m
    }
    supportFinishAfterTransition();
}