Android Flicker when using Animation and onAnimationEnd Listener

后端 未结 2 1185
青春惊慌失措
青春惊慌失措 2021-01-26 18:11

I have 3 ImageButtons which are animated when Filling to left, like this:

public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY         


        
2条回答
  •  耶瑟儿~
    2021-01-26 18:21

    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
        }
    

提交回复
热议问题