I have 3 ImageButtons which are animated when Filling to left, like this:
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY
Ana, I think you have already read my answers here
Android TranslateAnimation resets after animation
android animation is not finished in onAnimationEnd
I had also replied to your comment, basically in stead of doing the functionality inside the mAnimation.setAnimationListener method, you need to create custom ImageButtons and put the functionality there
public Class myImageButton extends ImageButton {
@Override
protected void onAnimationEnd() {
super.onAnimationEnd();
//Functionality here
}
I searched for all stackoverflow posts for animation issue (flicker and sluggish). I didnt find any perfect answer. But I have found the solution for the same, which is as below,
onStart of Animation use,
view_you_want_to_animate.setDrawingCacheEnabled(true);
onEnd of Animation use,
view_you_want_to_animate.setDrawingCacheEnabled(false);
Now my view does not have flicker or sluggish behavior when my view is animating. I works well for me.