You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few layers of TouchImageViews, one on top of the other. The bottom TouchImageView contains the basic image. Then, each layer adds information on top of it. The user can choose which layers should be shown - for example when the user clicks on a button, analysis TouchImageView is set to visible, and thus the user can see this layer on top of the image.
In order to allow the user to zoom-in, zoom-out and move the image, I used TouchImageView. This works great when only one TouchImageView is shown. When there are multiple shown TouchImageViews, I set a transparent TouchImageView on top of them, which listens to touch events and updates the other TouchImageViews under it
The problem: the zoom works perfectly, the movement works but not good enough: after zooming in, the movement of the underlying images is limited. They move with the top overlay TouchImageView, but not all the way. They move just a bit, kind of stuck in the middle. I cannot move them all the way to the sides. The top transparent layout moves correctly (I tested it with a background of a ball, and I can move the ball all over the screen).
Following the problem #phillies pointed out, here is a complete (and simple) project that shows the problem. After zooming in the pictures are not synchronized properly.
Help would be very appreciated!
Original question here:
https://stackoverflow.com/questions/71524327/zoom-in-zoom-out-and-move-images-in-layers-of-touchimageviews-one-on-top-of-th
I have a few layers of TouchImageViews, one on top of the other. The bottom TouchImageView contains the basic image. Then, each layer adds information on top of it. The user can choose which layers should be shown - for example when the user clicks on a button, analysis TouchImageView is set to visible, and thus the user can see this layer on top of the image.
In order to allow the user to zoom-in, zoom-out and move the image, I used TouchImageView. This works great when only one TouchImageView is shown. When there are multiple shown TouchImageViews, I set a transparent TouchImageView on top of them, which listens to touch events and updates the other TouchImageViews under it
The problem: the zoom works perfectly, the movement works but not good enough: after zooming in, the movement of the underlying images is limited. They move with the top overlay TouchImageView, but not all the way. They move just a bit, kind of stuck in the middle. I cannot move them all the way to the sides. The top transparent layout moves correctly (I tested it with a background of a ball, and I can move the ball all over the screen).
Here is the layout in xml:
Any ideas?
The text was updated successfully, but these errors were encountered: