• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Mapview

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a dashboard for my android application. All the activities related to the dashboard feature extend from one base activity class. I have several features within the dashboard. GPS/ Maps is one of them. If user clicks maps I would like to display map with current latitude and longitude. In order to implement map it needs to extend the MapActivity class. In this case the GPS / Maps is already extending the base activity class. Since Java does not support multiple inheritance, how should handle this case? Can anybody provide some help? Or is there any other way to use maps in the application?

Thanks,
 
Rancher
Posts: 43076
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since those are two different Activities, why couldn't they extend two different base classes?

Besides, to show a map, I don't think you need to extend MapActivity - you can just keep a MapView in your layout.
 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I use the map view then I need to choose the target as google API's instead of android while running the application. But for my application I need the target AVD as android. My question is how can I display map with the target set to android?

Thanks,
 
rubbery bacon. crispy tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic