I need to make this clickable image similar to an imageMap in HTML. I also need to put an icon over the clickable area (in the center, sort of like a map marker), but how do I account for image resizing?
i.e. my image might be 800×600 and the clickable area might be the rectangle covered by 20,20 and 60,40, but these pixels don’t actually refer to the same position in the image anymore when it isn’t displayed on a pixel perfect fashion.
EDIT: my images are taken from sdcard, not from drawable folders
This is what i found in this link
The resulting code:
Hope this will help.