java - Get animate().translation Callback When Animation Is Complete -
i've been looking around , main ways seem setting animation listener on object. have set animation listener , animation complete callback not fire.
do know how can callback when view.animate().translationy() has finished animation?
root.setlayoutanimationlistener ( new animation.animationlistener() { @override public void onanimationstart(animation animation) { } @override public void onanimationend(animation animation) { closefragmentanimationcomplete(); //is not called } @override public void onanimationrepeat(animation animation) { } } ); root.animate().translationy(100);
please try:
view.animate().translationy(100).setlistener(new animator.animatorlistener() { @override public void onanimationstart(animator animation) {} @override public void onanimationend(animator animation) { closefragmentanimationcomplete(); } @override public void onanimationcancel(animator animation) {} @override public void onanimationrepeat(animator animation) {} });
Comments
Post a Comment