If you want to use Canvas, keep in mind that it is a low level drawing mechanism.
Therefore, you need to implement the click logic yourself.
- Catch the coordinates of any incoming TouchEvent.
- If the TouchEvent is a "touch down" (finger pressed) or "touch up" (finger released), depending on your choice, consider it to be a click.
- Compare the click event coordinates to every attached image's bounding box to find which image was touched. Take the z-index into account in case of overlap.
- Trigger an onClickListener.
You also have to keep the coordinates of all images and the corresponding onClickListeners somewhere in memory.
Other solution:
Use a Layout, possibly a RelativeLayout, in which you add the ImageViews as children.