onAnimationEnd is not getting called, onAnimationStart works fine

后端 未结 14 1699
情书的邮戳
情书的邮戳 2020-12-23 19:51

I\'ve a ScrollView in the PopupWindow. I\'m animating ScrollView contents using TranslateAnimation.

When animation starts, the onAnimationStart listener is called bu

14条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 20:17

    Also, when using animations, don't forget the setFillAfter() to true.

    http://developer.android.com/reference/android/view/animation/Animation.html#setFillAfter(boolean)

    If fillAfter is true, the transformation that this animation performed will persist when it is finished. Defaults to false if not set. Note that this applies when using an AnimationSet to chain animations. The transformation is not applied before the AnimationSet itself starts.

    anim.setFillAfter(true);
    mToolbar.startAnimation(anim);
    

提交回复
热议问题