Android : How do i get the coordinates of a view during animation android

on Sunday, July 6, 2014


these are just the methods i can override during animationListener. http://developer.android.com/reference/android/view/animation/Animation.AnimationListener.html



animation.setAnimationListener(new AnimationListener(){
@Overridepublic void onAnimationEnd(Animation arg0) {}
@Override public void onAnimationRepeat(Animation animation) {}
@Override public void onAnimationStart(Animation animation) {}});


I think adding a thread in onAnimationStart and stop it on onAnimationEnd and getting the coordinates with a loop inside the thread, this may work. But i think that i could get some problems with buttons because, when animating them in this way, only the background moves, not button area itself


In this case, i have to investigate more with buttons


What do you think about this, is there another way to achieve what i want?

Is this the better way to do it ?


0 comments:

Post a Comment