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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -