Salman Khan
Salman Khan

Reputation: 2832

How do I get different click positions in a single ImageView

I am working on an application in which I need to implement Hot Spot kind of thing. Hot Spot is actually an image having different sections in it, when user clicks on different portions of that image it will reflect in different results accordingly, so my problem is that how can I get the click of these different portions which are present in the single Image, also if I get the X-Coordinates and Y-Coordinates of the same Image then how should I maintain it in different screen resolution. I am displaying a demo image with my question enter image description here

Here its a single image, now I just want to get click of the four section displayed here, for e.g. if I click on section no.4 I can show another image etc. Please help me to sort this out, any help would be appreciable. Thank you.

Upvotes: 4

Views: 228

Answers (2)

Pankaj Talaviya
Pankaj Talaviya

Reputation: 3458

Finally I used below library and set some logic and made solution, as of my expectation.

https://github.com/chrisbanes/PhotoView

Upvotes: 0

Salman Khan
Salman Khan

Reputation: 2832

Finally I found a library for this, though it does lot more than what I want to achieve but its good to use this one.

https://github.com/chrisbanes/PhotoView

Upvotes: 0

Related Questions