Example usage for android.transition TransitionSet addListener

List of usage examples for android.transition TransitionSet addListener

Introduction

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

Prototype

@Override
    public TransitionSet addListener(TransitionListener listener) 

Source Link

Usage

From source file:com.sociablue.nanodegree_p1.MovieDetailPagerFragment.java

private void setupTransitionListener() {

    final TransitionSet transitionSet = (TransitionSet) getSharedElementEnterTransition();
    transitionSet.addListener(new Transition.TransitionListener() {
        @Override/*from ww w . ja v  a  2 s  . c o m*/
        public void onTransitionStart(Transition transition) {
        }

        @Override
        public void onTransitionEnd(Transition transition) {
            transitionSet.removeListener(this);
            removeTransitionView();
        }

        @Override
        public void onTransitionCancel(Transition transition) {
        }

        @Override
        public void onTransitionPause(Transition transition) {
        }

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