Example usage for android.transition TransitionSet removeListener

List of usage examples for android.transition TransitionSet removeListener

Introduction

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

Prototype

@Override
    public TransitionSet removeListener(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// w  w  w  .j av  a 2  s.  co  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) {
        }
    });
}