add object to image view, how to keep object locat

2019-02-20 13:48发布

I have an image, my job is how to zoom it to see detail with object. After a lot of searchs, I decided to use Touch Image VIew class

But my problem is when zooming this image, the object i add to this image by called ((ViewGroup)image.getparent).addview(object) have problem.

That is this object can not change it position when I zoomed, you can see my picture here:

enter image description here

You can see the icon Android i added into picture.

Here is the picture when i zoomed it

enter image description here

I can not find the way how to display this object icon to exactly new position when zoom image. Please help me

EDIT: If you use google map app. My job is write app like that but used image with object instead of using google map with marker

I found a solution in IOS, but it's seem not working in android:Multiple images/buttons staying relative to their position on a zoomable image

0条回答
登录 后发表回答