0

Is there a way to create different clicklisteners on a single ImageView ( big image ) ?

If i put an image whit a car i want to have one click lister if i press on the car hood and another click lister if a press on car door.

Is there a way to do that ?

Abhishek
  • 1,654
  • 2
  • 18
  • 31
Corneliu
  • 421
  • 1
  • 6
  • 12
  • 1
    u need to break the big image to small parts and then set each part as single imageview, there is no such thing – Mohammad Haidar Apr 19 '16 at 11:25
  • what if i put the big image on and then add over some kind of frame define by coords in a relativelayout? is this possible ? – Corneliu Apr 19 '16 at 11:28
  • 1
    you can put different clickable transparent views above each part of the big image that you want to make it clickable and handle the click of the views and not the image, but u have to be careful handling the UI with different screen sizes – Mohammad Haidar Apr 19 '16 at 11:30
  • Can you point me an example of a transparent view define by coords ? Thanks for replay – Corneliu Apr 19 '16 at 11:33
  • 1
    see http://stackoverflow.com/questions/3961071/android-how-to-make-a-clickable-map-image-with-each-country-producing-a-differe – pskink Apr 19 '16 at 11:33
  • thanks :D it's a good point to start – Corneliu Apr 19 '16 at 11:35

0 Answers0