I haven\'t found a simple way to get all currently active (visible, currently in Resumed state) Fragments in an Activity. Is it possible without custom bookkeeping in my Act
I resolved with this:
public ArrayList getAllFragments() { ArrayList lista = new ArrayList(); for (Fragment fragment : getSupportFragmentManager().getFragments()) { try { fragment.getTag(); lista.add(fragment); } catch (NullPointerException e) { } } return lista; }