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();
}
});
}
Aggregations