How can i get new position of view after animation it ?
if(animationCompeleted == 1)
{
return;
}
if(animationCounter != 0)
{
this.width = this.width + 1.f;
this.heigh = this.heigh + 1.f;
}
final ScaleAnimation scale = new ScaleAnimation(this.width, this.width + 1.0f, this.heigh, this.heigh + 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 1.0f);
scale.setDuration(1000);
scale.setFillAfter(true);
scale.setFillEnabled(true);
scale.setAnimationListener(new Animation.AnimationListener()
{
@Override
public void onAnimationStart(Animation arg0)
{
animationCompeleted = 1;
animationCounter++;
}
@Override
public void onAnimationRepeat(Animation arg0)
{
animationCompeleted = 2;
}
@Override
public void onAnimationEnd(Animation arg0)
{
animationCompeleted = 2;
//I want to get new position of imageView for comparing with another view(detection going-on it)
}
});
imageView.startAnimation(scale);
I want to know when my imageView near to another view.
How can i check it ?
How can i get new X and Y or Height and Width after animation?
I'm tring to get them in onAnimationEnd , but it's static values , it's not change after animation ending ..
Sorry for grammer