如何为动画后的视图编写 onclick 监听器?
我已将视图从一个地方动画到另一个地方,动画完成后我编写了这样的代码,
public void onAnimationEnd(Animation animation) {
imageView.setOnClickListener(this);
}
但我无法单击该视图。该观点没有得到回应。
I have animating the view from one place to another, after animation done I have written the code like this,
public void onAnimationEnd(Animation animation) {
imageView.setOnClickListener(this);
}
But I cant able to click that view. No response from that view.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该将动画后的视图移动到新位置。您可以使用布局参数。
You should move the view after the animation to the new position. You can use LayoutParams.
您应该将动画后的视图移动到新位置。您可以使用布局参数。使用这样的代码..
You should move the view after the animation to the new position. You can use LayoutParams. use the code like this..