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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -