Reputation: 467
I have an ImageView and I want to translate it to a random spot on the screen:
TranslateAnimation anim = new TranslateAnimation(0,100,0,100);
anim.setDuration(2000);
img.startAnimation(anim);
This works fine. But I want to have a clickable ImageView during the whole animation. At this moment it only works at the beginning and at the end.
Upvotes: 0
Views: 150
Reputation: 46
I think you have to use Animator class and not Animation class because when using TranslateAnimation, you are animating a image of a view and not a View it self.
I think this is explained somewhere there http://android-developers.blogspot.com/2011/02/animation-in-honeycomb.html
And on the next page
Upvotes: 1