I am creating an app which is going to have as a background USA map. I want to click on the map and wherever I click I want to create a small red dot. But it should not be created outside of the map borders. Can I use GridView? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can just create a Linear Layout with a USA map as the background and then set an
onTouchListenerto that Linear Layout, inside theonTouchjust add a red dot on the x and y coordinates that the person clicked. Something like this:and your xml could look something like:
Hope that helps.