Move imageview after animation (update position)

后端 未结 4 1077
猫巷女王i
猫巷女王i 2020-12-17 06:49

I am trying to to do a translate animation on an image view from the bottom to the middle of the screen. Upon finish of the animation, I want the image view to stay there.

4条回答
  •  长情又很酷
    2020-12-17 07:12

    If you want the actual starting position of the image view you can get it at the time of animationStart And you can use setFillAfter(true). The setFillAfter(true) will update the position after the animation end.

    If you need the new position you can use the setFilter(true). If you are not ready to use setFillAfter(true) (if you need the older position), then you have done the right thing by having two Image Views. But its better to get the position in animationStart and use setFillAfter(true).

提交回复
热议问题