0

I need to create a Custom view in android which will have dynamic text like price, address etc. and also an ImageView inside it as shown in the image below. I tried to find google some tutorial for custom view but didn't find something satisfactory to do all these things. I also need to use onClick event on this view. Please guys, some code would be of great help. I'm a novice to android. I read google tutorial to create custom view but couldn't implement this. https://lh4.ggpht.com/HmwmRTx3g9ddkHbgvZXpZOB3Am-O9OQARQ2qpxJ16zTDZbG57CmvgxUC75sGFzC3cqrH

Thanks for attention.

1
  • can you please update the link. its dead Commented Oct 19, 2013 at 16:56

2 Answers 2

2

This is called Custom Overlay for MapView.

You can check example and implement as per your requirement - Android MapView Balloons

Sign up to request clarification or add additional context in comments.

3 Comments

What I need is that when user clicks on a particular marker on the map, I need to show this component. And when user clicks on this marker, I need to go to the next activity. Can this be done using these overlays?
@user1559236 Android MapView Ballons is perfect requirement for you... +1 for link
@user1559236 This is the ready code, but i would suggest you to understand it once so that you can customize it anytime.
0

You can use FrameLayouts. It is very simple to use. FrameLayout can add several views on top of each other. It creates a stack of the views. Just add whatever views you want to inside FrameLayout and use the property setVisibility() to control when to show which view.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.