Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapview

 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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,
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
  • 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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic