android - Can not send list of objects into the intents of two activities -
android - Can not send list of objects into the intents of two activities -
in 1 activity using 2 tabs, 1 of them show list of points on map. sec tab show items list. i using next code not work. still not able send the same list of service (servicelst) 2 activity (map , list). using code, bout not working. help me alter or propose else :
private arraylist<service> servicelst; public class maporlist extends tabactivity { protected void oncreate(bundle savedinstancestate) { ... setuptab("liste", "tab1", getonlistintent()); setuptab("carte", "tab2", getonmapintent()); } private intent getonlistintent() { intent in = new intent(getapplicationcontext(), pharmacieproximite.class); bundle bundle = new bundle(); bundle.putparcelablearraylist("services_lst", servicelst); in.putextras(bundle); homecoming in; } private intent getonmapintent() { intent in = new intent(getapplicationcontext(), mainmap.class); bundle bundle = new bundle(); bundle.putparcelablearraylist("services_lst", servicelst); in.putextras(bundle); homecoming in; } private void setuptab(string name, string tag, intent intent) { tabhost = gettabhost(); tabhost.addtab(tabhost.newtabspec(tag).setindicator(createtabview(tabhost.getcontext(), name)).setcontent(intent)); }
android android-intent android-activity bundle
Comments
Post a Comment