Skip to content Skip to sidebar Skip to footer

Teleport The Image In The Touched Position In Canvas

I have tried t create a simple canvas but the image does't appear in the touched position moves only when I drag, I want also that teleports in the touched position if the user cli

Solution 1:

Don't forget to call invalidate(); so your canvas redraws in your ACTION_DOWN case statement. Also it looks like you should be setting the following in ACTION_DOWN.

                mPosX = mLastTouchX;
                mPosY = mLastTouchY;

Post a Comment for "Teleport The Image In The Touched Position In Canvas"