Search in sources :

Example 1 with TransitionAdapter

use of com.sample.andremion.musicplayer.view.TransitionAdapter in project Music-Player by andremion.

the class DetailActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.content_detail);
    mCoverView = (MusicCoverView) findViewById(R.id.cover);
    mCoverView.setCallbacks(new MusicCoverView.Callbacks() {

        @Override
        public void onMorphEnd(MusicCoverView coverView) {
        // Nothing to do
        }

        @Override
        public void onRotateEnd(MusicCoverView coverView) {
            supportFinishAfterTransition();
        }
    });
    getWindow().getSharedElementEnterTransition().addListener(new TransitionAdapter() {

        @Override
        public void onTransitionEnd(Transition transition) {
            play();
            mCoverView.start();
        }
    });
}
Also used : TransitionAdapter(com.sample.andremion.musicplayer.view.TransitionAdapter) Transition(android.transition.Transition) MusicCoverView(com.andremion.music.MusicCoverView)

Aggregations

Transition (android.transition.Transition)1 MusicCoverView (com.andremion.music.MusicCoverView)1 TransitionAdapter (com.sample.andremion.musicplayer.view.TransitionAdapter)1