tags:

views:

38

answers:

0

Folks,

I have an imageView that I am moving around on top of another imageview. It's kind of circle selector. Its working fine, except that when I click a button elsewhere in the activity, the imageview is moving back to where it starts.

Here is the code for when I move it.

int upperLeftCornerX = (int)(mLastXTouchSetOval - mClipOvalWidth/2);
     int upperLeftCornerY = (int)(mLastYTouchSetOval - mClipOvalHeight/2);

     mImageOval.layout(upperLeftCornerX, upperLeftCornerY, upperLeftCornerX+mClipOvalWidth, upperLeftCornerY+mClipOvalHeight);

The mLastXTouchSetOval and mLastYTouchSetOval are set by a touch event. This works, but as I said, as soon as I click a button on the activity, the mImageOval goes back to the top left corner where it started.

Any ideas?

Thanks, -Dave