Solution 1 :
You need to set a new AnimationListener, before the startAnimation command. You can use Override methods of AnimationListener and please debug it for a better understanding. You need setAnimationListener before starting your animation.
Problem :
How to get Position of moving view using translate animation.
TranslateAnimation animation = new TranslateAnimation(0.0f, 300.0f,
0.0f, 0.0f);
animation.setDuration(500);
animation.setFillAfter(true);
mainview.startAnimation(animation);