I have an WebView that loads a jpg image from a simple HTTP server on my PC. The image is a screen capture of a section of the screen.
The WebView component loads and displays the image without any problem. If I press on the shown image I get the x,y of the location of the press on the view. SO far so good. If I zoom in by outward pinches, the image is enlarged and now the x,y of the view is not the same as the x,y on the image.
If I had the size of the enlarged image and the x,y location of the view on the image, I could compute the x,y of the touch on the image.
There is the problem: How to get the location of the view on the expanded image and the size of the expanded image?
Since most of you like to see code with questions and in a hope of getting a response to this question, here is what I have so far. It works if the image size is adjusted to be the same size asthe view shown in the tablet.
posted 2 months ago
Here is the PC code that communicates with the Android. It has a lot of Q&D code for testing and debugging. A lot was Cut and Pasted from other programs so its a bit messy. Currently mostly working.
Whip out those weird instruments of science and probe away! I think it's a tiny ad: