android - TabFragments FragmentPageAdapter Parcelable Bundle -


i'm developing xamarin android application, i've got main activity , tab fragment holds 4 fragments. mainactivity sent parcelable object tab fragment, through arguments (which said holds 4 fragments). thing object needs sent fragment 1, fragment sent object fragment 2 , on. each 1 of these fragments needs change different properties of same object. it's wizard form, each tab step. how can approach that? how can send object fragment next fragment?

i hope made clear. in advance.

here lines of code:

//in mainactivity private void listitemclicked(int position) {  //this way don't load twice, might want modify bit.    if (position == oldposition)       return;    oldposition = position;   android.support.v4.app.fragment fragment = null;  switch (position)  {     case 0:     fragment = fragmenthome.newinstance();     break;     case 1:     sheet = new hoja();     bundle = new bundle();     pa = parcel.obtain();     bundle.putparcelable("sheet", sheet);     pa.writebundle(bundle);     pa.setdataposition(0);                         fragment = tabfragment.newinstance();     fragment.arguments = bundle;     break;  }               supportfragmentmanager.begintransaction()    .replace(resource.id.content_frame, fragment)    .commit(); }  //in tabfragments class receive object public override view oncreateview(layoutinflater inflater, viewgroup     container, bundle savedinstancestate) {    //var ignored = base.oncreateview(inflater, container, savedinstancestate);     parcelable_sheet = (hoja)arguments.getparcelable(parcel_key); } 


Comments