Rohith Nandakumar
Rohith Nandakumar

Reputation: 11427

Android: How to set clickable areas of a single image?

I want to create a scrollable map and trigger different actions when the user touches a different areas.

With iPhone, it was easy by putting buttons on top of the image. How do I do it in Android?

I used a custom view to enable scrolling in both directions. Now how do I make different parts of the image trigger different events on click?

Upvotes: 0

Views: 3339

Answers (1)

Mark
Mark

Reputation: 7635

Some idea: You could try to use some ImageButtons. Just chop your picture in four parts. See: http://developer.android.com/reference/android/widget/ImageButton.html

Upvotes: 1

Related Questions