I have this strange issue. I have an image which I rotate about a fixed point using rotateAnimation
.
I have handled the click event when the user clicks the images as shown below:
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.imageView1:
finish();
Intent i = new Intent(this, Next.class);
startActivity(i);
break;
}
}
The problem I face is that, after I rotate the image, the click event is not triggered when I click the image, but is triggered when I click the position where the image was at first.
I know I must be missing something basic here but I can't figure it out.
Animation
s do not cause the animatingView
to change position or size. They only show such transformations without affecting any of the properties of theView
. Hence the behavior seen by you.In case you want to actually move/resize the
View
object, implementAnimationListener
and perform the operation ononAnimationEnd
.