Example usage for android.transition Fade setStartDelay

List of usage examples for android.transition Fade setStartDelay

Introduction

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

Prototype

public Transition setStartDelay(long startDelay) 

Source Link

Document

Sets the startDelay of this transition.

Usage

From source file:com.zertinteractive.wallpaper.MainActivity.java

@SuppressWarnings("NewApi")
private void setupExitAnimations() {
    Fade returnTransition = new Fade();
    getWindow().setReturnTransition(returnTransition);
    returnTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));
    returnTransition.setStartDelay(getResources().getInteger(R.integer.anim_duration_medium));
    returnTransition.addListener(new Transition.TransitionListener() {
        @Override/*w  w  w.j ava 2s  .  c om*/
        public void onTransitionStart(Transition transition) {
            transition.removeListener(this);
            animateButtonsOut();
            animateRevealHide(recyclerView);
        }

        @Override
        public void onTransitionEnd(Transition transition) {
        }

        @Override
        public void onTransitionCancel(Transition transition) {
        }

        @Override
        public void onTransitionPause(Transition transition) {
        }

        @Override
        public void onTransitionResume(Transition transition) {
        }
    });
}