In android, is it possible to put a listener on the animation you get between activities, so that code can be executed at the end of the animation?
Try this
Transition transition = getWindow().getSharedElementEnterTransition();
transition.addTarget(android.R.transition.slide_top);
transition.addListener(new Transition.TransitionListener() {
@Override
public void onTransitionStart(Transition transition) {
Log.e("transition ","onTransitionStart");
}
@Override
public void onTransitionEnd(Transition transition) {
Log.e("transition ","onTransitionEnd");
}
@Override
public void onTransitionCancel(Transition transition) {
}
@Override
public void onTransitionPause(Transition transition) {
}
@Override
public void onTransitionResume(Transition transition) {
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With