Find the position of the ImageView relative to the displayed image

So here is the problem. I display a large image in ImageView and must find its position relative to the image. Like this:

╔═══════════════════════════════╗
║ Image                         ║ 
║──>╔═════════════╗             ║
║   ║ ImageView   ║             ║
║   ║             ║             ║
║   ╚═════════════╝             ║
║                               ║
║                               ║
╚═══════════════════════════════╝

Any help?

UPD: Since there were some misunderstandings, I will explain the problem in detail.

I have an image. The bitmap is actually. I show it in ImageView with a scale type CENTER. Suppose the image is larger than ImageView, so only part of the image is displayed. I want to find the position of this part relative to the entire image.

+5
source share
2 answers

getTop(), getLeft() ? -, -

+1

, , , .

0

All Articles