I have an image, which can be moved around and scaled with pinch gesture.. All this is done inside onTouch(). I want to restrict this and make it movable(and scalable) only after the user has done a longclick on the image.. How do I do this?
I have an image, which can be moved around and scaled with pinch gesture..
Share
Register a LongCLickListener. If a long click is recognized set a flag to true.
In the OnTouch method allow scaling and moving only if the flag is set to true. After the moving and scaling set the flag to false again.
Here is some pseudocode: