End animation event android

前端 未结 5 955
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 12:34

I have a fadeout animation in a view (which is inside a fragment), and everytime the animation happens, after it finishes the view redraws itself again. I found a work aroun

5条回答
  •  时光说笑
    2020-12-05 12:59

    You can add Animation listener to your animation object like

    anim.setAnimationListener(new Animation.AnimationListener(){
        @Override
        public void onAnimationStart(Animation arg0) {
        }           
        @Override
        public void onAnimationRepeat(Animation arg0) {
        }           
        @Override
        public void onAnimationEnd(Animation arg0) {
        }
    });
    

提交回复
热议问题