android - How to know which of the fragments launched the current fragment -
i launch fragment transition:
fragment fragment = new instalacionesencontradasfragment(); bundle bundle = new bundle(); bundle.putserializable("key", this.instalacionesconcategorias); fragment.setarguments(bundle); fragmentmanager fragmentmanager = getfragmentmanager(); instalacionesencontradasfragment fragmenttransaction mfragmenttransaction = fragmentmanager.begintransaction(); mfragmenttransaction.addtobackstack(null); mfragmenttransaction.replace(r.id.main_frame_container, fragment, "actividades").commit();
the second fragment de object as:
bundle bundle = this.getarguments(); instalacionesconcategorias = (arraylist<instalacion>) getarguments().getserializable("key");
but want "actividades" tag. because, want know of fragments launched current fragment
you use different tags different parents(i assume do). , in child fragment call: this.gettag();
Comments
Post a Comment