Reputation: 800
I am creating an app which is a guide. I have a photograph showing an example, but I need to know, how can I make certain parts of the images clickable, to go to another activity to show more details about that thing.
Or have an image (which will be clicked) on top of the base image?
Thanks
Upvotes: 0
Views: 390
Reputation: 28418
You can split your main image on rectangular parts, then put them as ImageView
s using RelativeLayout
or TableLayout
(which ever fits best in your case) so their combinations looks like a single image.
On each ImageView
you can set a click listener using View.setOnClickListener(View.OnClickListener l)
Upvotes: 0
Reputation: 15701
have an image (which will be clicked) on top of the base image?
1 - Can set the Background of Linear layout and add imageView in center of parent.
or
2- Use relative layout with tow image Views
Upvotes: 2