Reputation: 140
How to create multiple click listeners for one image in android? I have one body image. When I click head it should go to head click listener and if I click legs it should go to leg click listener. How to differentiate like this?
Upvotes: 1
Views: 494
Reputation: 20132
how system comes to no you click head or anythin other?
i think you can do a hack
Upvotes: 1
Reputation: 59268
You need to create a Image map, something like this::
<map name="map-name">
<area shape="rect" coords="135,180,200,185" href="webpage1.html">
<area shape="circle" coords="49,300,42" href="webpage2.html">
<area shape="poly" coords="24,35,55,20,90,42,91,80,60,105" href="webpage3.html">
</map>
<img src="image.gif" usemap="#map-name">
Upvotes: 3