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
2)http://androidcookbook.com/recipe.seamrecipeid=897&title=mapview%20inside%20tabview
Comments
Post a Comment