Alex Wih Alex Wih - 1 month ago 12
Android Question

How to know when enter transition ended on Fragment?

I have a fragment, which shows enter animation, I set transition by


After that I want to show another animation. But I need to know when transition animation ends to start the second one.

For activity there is a callback like
but it is not called when Fragment's transition ends.

Is there any way to know when enter transition ends for the Fragment?

Answer Source
transition.addListener(new Transition.TransitionListener() {
                    public void onTransitionStart(Transition transition) {}

                    public void onTransitionEnd(Transition transition) {}

                    public void onTransitionCancel(Transition transition) {}

                    public void onTransitionPause(Transition transition) {}

                    public void onTransitionResume(Transition transition) {}