Skip to content Skip to sidebar Skip to footer

Onanimationend() Called Twice

After updating the build sdk 27 from 23 came across this issue of onAnimationEnd firing twice in the code below when called. onAnimationStart is called only once and onAnimationRep

Solution 1:

Removing the old listener on the onAnimationEnd will solve your problem.

@OverridepublicvoidonAnimationEnd(Animation animation) {
            slideOutRightAnimation.setAnimationListener(null);
            // ... //
        }

Solution 2:

Please try it

Before start animation

fragmentToPopView.clearAnimation();

Post a Comment for "Onanimationend() Called Twice"