My app has an Activity that controls the inclusion of Fragments.
Follows:
public static void adicionarFragment(Activity activity, Fragment fragment){
FragmentManager fragMgr = activity.getFragmentManager();
FragmentTransaction fragTrans = fragMgr.beginTransaction();
fragTrans.replace(android.R.id.content, fragment);
fragTrans.addToBackStack(null);
fragTrans.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
fragTrans.commit();
}
I wonder if it's possible to find out which Fragment is being displayed?
Is there any way to unmask using FragmentManager
?
Ps: I've tried this way , but it does not return me the instance of Fragment