[英]Cancel animation if ACTION_UP
I have onTouchListener on my gridView and if ACTION_DOWN is pressed the animation(scale) starts. 我在gridView上具有onTouchListener,如果按下ACTION_DOWN,则动画(缩放)开始。 How do following things:
如何做以下事情:
In order to get the Animation's final state to stick after it is complete, you need to call Animation.setFillAfter(true)
为了使动画的最终状态在完成后保持不变,您需要调用
Animation.setFillAfter(true)
You can reset a running animation at any time with Animation.cancel()
and Animation.reset()
to put the view transformation back to its initial state. 您可以随时使用
Animation.cancel()
和Animation.reset()
重置正在运行的动画,以将视图转换恢复为其初始状态。
HTH 高温超导
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.