Android的 - 如何以期互动已经动画片之后?互动、动画片、Android

由网友(☆狂舞※天璇☆)分享简介:我有一个使用 TranslateAnimation 动画视图: I have a view that is animated using TranslateAnimation:TranslateAnimation translateAnim = new TranslateAnimation(fromX, toX,...

我有一个使用 TranslateAnimation 动画视图:

I have a view that is animated using TranslateAnimation:

TranslateAnimation translateAnim = new TranslateAnimation(fromX, toX, fromY, toY);
translateAnim.setDuration(SLIDING_SPEED);
translateAnim.setInterpolator(new BounceInterpolator());
translateAnim.setFillAfter(true);
mSlidingView.startAnimation(translateAnim);

动画工作正常,但它完成后,我不能在视图中点击了。相反,我仍然可以点击它的previous位置。

The animation works fine but after it's finished I can't click on the view anymore. Instead I can still click on its previous location.

我已经寻找类似的问题(这里 ,here和here)对计算器,但他们没有提供任何解决办法。我听说了 ObjectAnimator 固定这一点,但有什么我可以用previous API吗?(我不想依赖尚未像的 NineOldAndroids 以支持在pre-蜂窝设备的新的动画API)哦,我已经尝试的无效的看法,但它不会改变任何事情。

I have searched for similar questions (here, here and here) on StackOverflow but none of them provides any solution. I have heard that the ObjectAnimator fixed this, but is there anything I can do using the previous API? (I don't want to rely on yet another third party library like NineOldAndroids to support the new animation API on pre-honeycomb devices). Oh and I have tried to invalidate the view but it doesn't change anything.

你知道吗?

谢谢!

推荐答案

嗯,我想有没有联系,但你尝试过: (setFillAfter前)

Well, I guess there is not link, but have you tried : (before setFillAfter)

translateAnim.setFillEnabled(true);
阅读全文

相关推荐

最新文章