add object to image view, how to keep object location when zoom image

好久不见. 提交于 2019-12-08 04:55:26

问题


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:

You can see the icon Android i added into picture.

Here is the picture when i zoomed it

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

来源:https://stackoverflow.com/questions/43625989/add-object-to-image-view-how-to-keep-object-location-when-zoom-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!