Why doesn't setVisibility work after a view is animated?

后端 未结 6 1733
别跟我提以往
别跟我提以往 2020-12-04 20:56

Why doesn\'t the textView become invisible?

Here is my layout xml:




        
6条回答
  •  情深已故
    2020-12-04 21:43

    Use this before setVisibility after animation is completed:

    anim.reverse();
    anim.removeAllListeners();
    anim.end();
    anim.cancel();
    

    where anim is your ObjectAnimator

    but if you are using the Animation class, then just do:

    view.clearAnimation();
    

    on the view upon which the animation was performed

提交回复
热议问题