Android ActionBarActivity and Google Map interacting between tabs -


in actionbar activity got :

    @override     public fragment getitem(int position) {         switch (position) {         case 0:             return new firstactivity();         case 1:             return new mapactivity();         }     } 

and know how can add marker google map in mapactivity tab firstactivity tab ?

would access mapactivity setmarker method firstactivity how achieve ?

public void setmarker(latlng location, string title) {     // create marker     markeroptions marker = new markeroptions().position(location).title(             title);      // changing marker icon     marker.icon(bitmapdescriptorfactory             .defaultmarker(bitmapdescriptorfactory.hue_rose));      // adding marker     googlemap.addmarker(marker); } 

check following links,it you

1)https://github.com/ddewaele/googlemapsv2withactionbarsherlock/blob/master/googlemapsv2withactionbarsherlock/docs/part2.md

2)http://androidcookbook.com/recipe.seamrecipeid=897&title=mapview%20inside%20tabview


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -